SPB Git

Repository Public

IOS-LIMITS.md 4.1 KB

# What iOS allows, and what this app does with it

iOS does not let an app run permanently in the background, and this app does not try to get around that. No audio, location, VoIP or other background mode is misused to stay alive. An iPhone is therefore an opportunistic node: fully available while the app is on screen, intermittently otherwise. The cluster is designed for that (every fragment keeps a stable copy elsewhere).

# Modes

Mode When What works
Active app on screen everything: heartbeat every 30 s, long-poll for work, 3 parallel transfers, local network path, possession proofs, scrub
Station app on screen in station mode (dimmed status screen), meant for a device left plugged in same, 4 parallel transfers on power; the screen is kept awake only if the option is on and the device is on external power; brightness restored on exit
Background app not on screen transfers already handed to the background URLSession continue and can finish while the app is suspended or terminated by iOS; when they finish iOS relaunches the app briefly, which verifies, commits, acknowledges and asks for the next fragments. BGAppRefreshTask (short) and BGProcessingTask (longer, usually at night on power) send a heartbeat, take work and scrub — if and when iOS schedules them
Offline no network, or policy forbids the current network fragments stay on the device; the coordinator marks the node offline after 100 s without contact and keeps its placements; other copies serve

# Facts to keep in mind

  • iOS decides when background tasks run. It may be minutes or many hours; with Background App Refresh off, in Low Power Mode, or for an app the user rarely opens, it may be never. The dashboard shows the measured availability, not a promise.
  • Force-quitting the app (swiping it away) cancels its background transfers and stops background launches until the user opens it again. This is iOS behaviour for every app.
  • After a reboot, nothing runs until the first unlock: fragments and the device key are protected "until first user authentication". After that first unlock, background work is possible again.
  • The local network path is foreground-only. A background URLSession is run by the system outside the app and is used through the public gateway; when the app leaves the foreground, local transfers in progress are re-issued through the gateway.
  • Background uploads restart from zero if the system retries them; foreground uploads resume from the coordinator's offset.
  • Storage pressure: iOS reports the space an app may really use (volumeAvailableCapacityForImportantUsage). The app keeps a reserve (larger of 20 GB and 10 % of the device) and stops accepting fragments when free space reaches it. iOS does not purge Application Support, where fragments live.
  • Deleting the app deletes its fragments at once, without telling anyone. The device key stays in the Keychain; if the app is installed again it reports an empty inventory and the coordinator re-replicates. Otherwise the node simply stays offline until it is revoked from the dashboard.
  • No silent push in 1.0: the cluster cannot wake the app. It would only be a hint anyway (iOS throttles silent pushes).
  • Thermal and power: new fragments are paused when the thermal state is serious or critical, under 20 % battery when not charging, and in Low Power Mode; parallelism drops when the device is warm. Transfers never run in Low Data Mode, and on cellular only if the user allowed it.
  • Pairing camera: used only to read the QR code. A typed code works without it.

# What needs a person

  • Install from TestFlight, pair (scan the QR code shown by the dashboard), choose the capacity.
  • Allow the local-network prompt on first use if direct LAN transfers are wanted (otherwise the gateway is used).
  • For a dedicated node: leave the device plugged in, app open, station mode on, Auto-Lock as you prefer (station mode only holds the screen awake on power).
Files main
Menu

Theme