The tunnel reconnect in the previous commit only fires while StikDebug is
actually executing. In the real handoff scenario the user has switched to the
JIT-enabled app, so StikDebug is backgrounded — and upstream lets iOS suspend
it, which means the path-change notification is never delivered and the
tunnel stays dropped.
Two upstream behaviours cause that suspension:
- Keep-alive only ran if the user had the "Silent Audio"/"Background Location"
toggles on. DebugKeepAliveLease now takes forced holds (force: true) that
bypass those toggles for the duration of a debug session, released when the
session ends. Both managers keep separate forced/unforced counters.
- The background-task expiration handler called invalidate(), tearing down
audio and location the moment the ~30s assertion elapsed. It now renews the
assertion (re-checking isActive) while silent audio sustains execution.
Also play an inaudible non-zero signal (~-80 dBFS, DC-free) instead of digital
silence, which some iOS versions treat as idle and reclaim. SettingsView calls
refreshFromSettings() rather than stop(), so toggling the setting off no longer
kills a forced session hold.
This is the minimal slice of the PR's keep-alive work that the cellular
reconnect depends on. Drop this commit for a foreground-only cellular fix.
Ported from StephenDev0/StikDebug#432 commit 656ec6d (keep-alive slice).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
StikDebug assumed Wi-Fi even though the tunnel rides LocalDevVPN and works
equally well on cellular. On a Wi-Fi<->cellular handoff the loopback tunnel
dropped silently and the JIT/debug session died with no recovery.
- Add NetworkPathMonitor (NWPathMonitor) reporting reachability, interface
type (Wi-Fi/cellular/VPN) and expensiveness, posting .networkPathDidChange
on real transitions (deduplicated by signature).
- TunnelManager retries connect 3x with 1s/2s backoff so transient cellular
failures recover, short-circuiting on permanent, user-actionable errors
(missing/invalid pairing -9/-17, bad target IP -18).
- TunnelManager reconnects on a debounced (1.5s) path change when the tunnel
is down, instead of staying dropped.
- Drop the false "Wi-Fi required" wording from connection alerts and README.
Ported from StephenDev0/StikDebug#432 commit 656ec6d (cellular slice only).
The keep-alive half of that commit follows as a separate commit.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
* Change default UPLOAD_IPA value to 'false'
* Part 1 of the great debloat
* Remove Mini Tools, adopt native alerts in StikJITApp, and update HomeView UI
* Refactor views to use native SwiftUI alerts instead of CustomErrorView
* Update ProfileView to use minimal List UI style with native alerts
* Fix up homeview
* Squash: Redesign HomeView, remove Feature Flags, enable all tabs, refactor alerts, and updates
- Redesign HomeView to a simpler style with 'Enable JIT' action.
- Remove 'Help & Info' and 'Quick Launch' from Home.
- Fix DDI false positive by starting heartbeat on HomeView appear.
- Restore robust DDI checks and update app name to 'StikDebug'.
- Remove FeatureFlags and Beta tags; enable 'profiles', 'processes', 'location' tabs by default.
- Remove 'Devices' tab; add 'Target Device IP' field in Settings.
- Hardcode 'Settings' tab to 4th position.
- Refactor 'SettingsView' tab customization to be reorder-only.
- Remove 'Appearance' theme section from Settings.
- Refactor custom error cards to use native SwiftUI/UIKit alerts across the app (HomeView, ConsoleLogsView, ProfileView, etc).
- Restore JS callback support and script execution logic in HomeView.
- Add necessary Color extensions.
- Update project version to 3.0.0.
* Clean up: Remove In-App Purchases, update checker, and unused IPA installer code
* delete more bloat
* fix build issue
* Remove widget to save on App IDs
* Attempt heartbeat restart when Enable JIT button is pressed
* Get rid of PIP
* Update Tab Naming
* remove more bloat
* final changes for today
* Remove unused packages
* UX Improvements
* revert bundle id
* Update README.md
* remove old idevice
* add updated idevice
* Fix ddi false positive errors and add templates for GitHub stuff
* Remove more unused stuff.
* Fix links and update README content
* Update compatibility table in README.md
* Improve performance of console logs
* Remove old code
* Change default UPLOAD_IPA value to 'true'
* remove the welcome sheet
* import support for .mobiledevicepair
* Add back LC JIT stuff
* Fix heartbeat issues with LC JIT
* update the build yml for nightly stuff
* Update README.md
* Update README.md
* Update GitHub Actions workflow for IPA build
* Update GitHub Actions workflow for nightly builds
* Add URL scheme to kill tasks stikjit://kill-process?pid=1234
* fix build issues
* Added App Intents
* Unify the error handling style across the app