Companion demo app for reliable data uploading on iOS across four levels.
FakeTwitter/FakeTwitter/SharedFakeTwitter/FakeTwitter/Level1FakeTwitter/FakeTwitter/Level2FakeTwitter/FakeTwitter/Level3FakeTwitter/FakeTwitter/Level4FakeTwitter/ServerFakeTwitter/Server/src/levels/level1.jsFakeTwitter/Server/src/levels/level2.jsFakeTwitter/Server/src/levels/level3.jsFakeTwitter/Server/src/levels/level4.js
Each tab reuses the same timeline/composer UI and injects a different upload service.
cd FakeTwitter/Server
npm install
npm start- Open
FakeTwitter/FakeTwitter.xcodeproj. - Run on iOS Simulator.
- Ensure the server is running at
http://localhost:8080.
If testing on a physical device, update FakeTwitter/FakeTwitter/Shared/Config/AppEnvironment.swift to your Mac's LAN IP, e.g. http://192.168.1.50:8080.
- Level 1: one-shot fire-and-forget upload.
- Level 2:
AutomaticvsManualmode with optional toggles for retry caps and idempotency key. - Level 3: resumable video upload with persisted offset + background URLSession chunk uploads.
- In this sample, each chunk can continue in the background, but scheduling the next chunk happens when app code runs again.
- Level 4: durable SwiftData queue and state machine (
pending/uploading/failed/succeeded) retried on launch.