Reputation: 625
Watch app's Info.plist
// ...
<key>WKRunsIndependentlyOfCompanionApp</key>
<false/>
// ...
My code:
session.delegate = self
session.activate()
public func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
// ...
if (session.activationState == .activated) {
let log = Log(isPaired: session.isPaired, isWatchAppInstalled: session.isWatchAppInstalled)
uploadLogToServer(log)
}
// ...
}
When I query the logs on the server's database, I see that there's a substantial amount (compared to the other cases) in which the isPaired = false
and the isWatchAppInstalled = true
.
How can this be possible ? Could it be connection issues at the moment of checking the isPaired
property ? So far I haven't been able to replicate this locally.
Upvotes: 1
Views: 38