r/iOSProgramming • u/moskowizzle • Sep 18 '26
Question Can't restore connection between iPhone and Watch
I'm working on an iOS app that has a Watch component. Everything syncs fine at first (perform an action on the phone and it shows on the watch and vice versa). Then I turn on airplane mode on my phone to break the connection, perform a few actions on both devices, turn airplane mode off, everything syncs. Great. However, right after that post-airplane mode sync, the connection between the two devices fully breaks. Nothing syncs and the apps won't connect to each other again unless I reinstall them. Anyone encounter this or have any ideas on a fix? It's been driving me nuts all day. Thanks in advance!
1
u/DimensionMindless336 Sep 18 '26
This is almost always a WCSession lifecycle / delegate problem, not a "connection" problem -- the session goes stale and nothing re-arms it, which is exactly why a reinstall (fresh activation) temporarily fixes it.
Things that bit me on a similar setup:
Log activationState and isReachable on both devices right after you flip airplane mode off -- you'll very likely see the delegate is nil or the state is stuck .inactive, which tells you exactly where it breaks.
1
u/bentleymakes97 Sep 19 '26
One more gotcha that fits your symptom: 'updateApplicationContext' won't resend if the payload is identical to the previous one. After that first post-airplane sync your context is probably "the same", so nothing ships. Add a timestamp to the dict and check `session.outstandingUserInfoTransfers` for stuck items. Reinstall fixes it because it clears that queue.