SPB Git

Repository Public

IOS-LIMITS.md 4.1 KB 52 lines markdown

1<!--2MacLustr Storage Node3File: docs/IOS-LIMITS.md4Author: Simon-Pierre Boucher5Contact: contact@spboucher.ai6-->7# What iOS allows, and what this app does with it89iOS does not let an app run permanently in the background, and this app does not try to get around that. No audio,10location, VoIP or other background mode is misused to stay alive. An iPhone is therefore an **opportunistic** node: fully11available while the app is on screen, intermittently otherwise. The cluster is designed for that (every fragment keeps a12stable copy elsewhere).1314## Modes1516| Mode | When | What works |17|---|---|---|18| **Active** | app on screen | everything: heartbeat every 30 s, long-poll for work, 3 parallel transfers, local network path, possession proofs, scrub |19| **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 |20| **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 |21| **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 |2223## Facts to keep in mind2425- **iOS decides** when background tasks run. It may be minutes or many hours; with Background App Refresh off, in Low Power26  Mode, or for an app the user rarely opens, it may be never. The dashboard shows the measured availability, not a promise.27- **Force-quitting the app** (swiping it away) cancels its background transfers and stops background launches until the28  user opens it again. This is iOS behaviour for every app.29- **After a reboot**, nothing runs until the first unlock: fragments and the device key are protected "until first user30  authentication". After that first unlock, background work is possible again.31- **The local network path is foreground-only.** A background `URLSession` is run by the system outside the app and is used32  through the public gateway; when the app leaves the foreground, local transfers in progress are re-issued through the gateway.33- **Background uploads restart from zero** if the system retries them; foreground uploads resume from the coordinator's offset.34- **Storage pressure**: iOS reports the space an app may really use (`volumeAvailableCapacityForImportantUsage`). The app35  keeps a reserve (larger of 20 GB and 10 % of the device) and stops accepting fragments when free space reaches it. iOS36  does not purge Application Support, where fragments live.37- **Deleting the app** deletes its fragments at once, without telling anyone. The device key stays in the Keychain; if the38  app is installed again it reports an empty inventory and the coordinator re-replicates. Otherwise the node simply stays39  offline until it is revoked from the dashboard.40- **No silent push in 1.0**: the cluster cannot wake the app. It would only be a hint anyway (iOS throttles silent pushes).41- **Thermal and power**: new fragments are paused when the thermal state is serious or critical, under 20 % battery when42  not charging, and in Low Power Mode; parallelism drops when the device is warm. Transfers never run in Low Data Mode,43  and on cellular only if the user allowed it.44- **Pairing camera**: used only to read the QR code. A typed code works without it.4546## What needs a person4748- Install from TestFlight, pair (scan the QR code shown by the dashboard), choose the capacity.49- Allow the local-network prompt on first use if direct LAN transfers are wanted (otherwise the gateway is used).50- For a dedicated node: leave the device plugged in, app open, station mode on, Auto-Lock as you prefer (station mode only51  holds the screen awake on power).52
Files main
Menu

Theme