Questions tagged [wcsession]

The WCSession class facilitates communication between a WatchKit extension and its companion iOS app. Please only use this tag for questions directly directed at the WCSession class and the WCSessionDelegate protocol. For other questions consider the 'watchconnectivity' or 'watchkit' tags.

121 questions
22
votes
13 answers

WCSession sendMessage:replyHandler error code 7014 (WCErrorCodeDeliveryFailed)

I have a Watch OS 2 application that communicates with the iOS app via WCSession method sendMessage:replyHandler:errorHandler: The iOS application reply correctly but time to time I get the error with code 7014 of domain WCErrorDomain: "Payload…
gsempe
  • 5,216
  • 2
  • 23
  • 28
18
votes
2 answers

WCErrorCodeDeliveryFailed: Payload could not be delivered

I'm working on an app that share data between iPhone and Apple Watch, using WCSession method sendMessage:replyHandler:errorHandler: After implementing that method I get the error like: WCSession _onqueue_notifyOfMessageError:withErrorHandler:…
SahyadriChava
  • 259
  • 3
  • 14
13
votes
1 answer

How big can the payload be when sending data via WatchConnectivity?

When sending data using the WatchConnectivity framework, either from the phone to the watch or vice-versa, how big can the payload be before the framework gives me the WCErrorCodePayloadTooLarge error? I couldn't find the answer on Apple's…
Andy Ibanez
  • 11,317
  • 8
  • 63
  • 94
12
votes
2 answers

How to start main iOS app from companion watch app in background?

Situation: Since our users have updated their iOS to 11 and/or WatchOS to 4, our iOS app doesn't seem to fire any scheduled timers when the app gets started by our WatchOS app. Maybe we are doing something wrong when starting our main app from the…
Thermometer
  • 2,368
  • 3
  • 15
  • 39
10
votes
0 answers

What's the best way to sync authentication data between iOS and watchOS?

I've having issues synchronizing user credentials between iOS and watchOS. My basic set up is that my iOS app and watchOS app both need to talk to a backend server, and they both need an access token to do so. However, the user can only sign in on…
9
votes
2 answers

WCSession's transferUserInfo no longer reliably working in watchOS 2.2 with iOS 9.3

I have an existing iOS 9.2 and watchOS 2.1 app that uses sendMessage and transferUserInfo to send data from the iPhone to the Apple Watch. If sendMessage fails, I am using transferUserInfo to queue the data for later delivery: // *** In the iOS app…
lehn0058
  • 19,077
  • 14
  • 65
  • 107
8
votes
1 answer

WC WCSession counterpart app not installed

Making a connection between iOS and iWatch devices, xCode writes [WC] WCSession counterpart app not installed. After a lot of research, I've found a solution, maybe it will be helpful for someone. - Check your WatchKit Extention target. - Uncheck…
doZer
  • 115
  • 7
8
votes
1 answer

WCSessionDelegate: sessionDidBecomeInactive and sessionDidDeactivate have been marked unavailable, but are required

I just converted a Swift 2 app to Swift 3, using the convert function of Xcode 8. My code has a class marked as WCSessionDelegate. In Swift 2 it compiled without the methods sessionDidBecomeInactive and sessionDidDeactivate. If I compile the…
Reinhard Männer
  • 11,202
  • 4
  • 45
  • 85
6
votes
2 answers

Error: "Message reply took too long" - WCSession Watch OS2

So I am using Watch Connectivity to request an array from the iPhone to the Watch. The idea was to sendMessage from the watch, and the iPhone will reply with the array within the didReceiveMessage method. However the iPhone does not seem to be…
RileyDev
  • 3,110
  • 3
  • 18
  • 49
5
votes
1 answer

sessionReachabilityDidChange not called on watch

I would like to have my watch app respond to the parent app on the phone being killed. When the watch app is running and the phone app is killed I get no callback from either sessionReachabilityDidChange or sessionWatchStateDidChange. Based on apple…
Bryan Boyko
  • 141
  • 1
  • 7
5
votes
2 answers

Is transferCurrentComplicationUserInfo more suitable for complication update?

What is the difference between transferCurrentComplicationUserInfo and transferUserInfo? I want to send data from my AppDelegate to a clock kit complication. transferCurrentComplicationUserInfo seems to do exactly the same thing as…
4
votes
1 answer

How can I diagnose and resolve a crash on WCSession sendMessage(_:replyHandler:errorHandler:)?

I'm building a watchOS app that needs to periodically request information from a companion iPhone app to refresh a complication. To achieve this, I have a WKApplicationRefreshBackgroundTask that runs periodically. It uses…
gohnjanotis
  • 3,921
  • 3
  • 31
  • 45
4
votes
2 answers

Data is not being transferred from iphone to iWatch (AppleWatch) on real devices

I have an iOS app and I programmed a extension for it on appleWatch. I'm sending data (NSDictionary) to the appleWatch extension using transferUserInfo method. Everything works in the simulator but when I'm trying to run the application on real…
Rudy.kh
  • 76
  • 1
  • 3
4
votes
1 answer

WCSession File Transfer Issue

I am having an issue sending files to the Apple Watch from the parent device. Sometimes the file goes through and is parsed completely. Other times it begins the file transfer, but it fails and never even rens the method session:(WCSession *)session…
S. Stark
  • 169
  • 1
  • 1
  • 9
4
votes
1 answer

When to call activateSession() on WCSession object

I wonder at what point one would call activateSession() on a WCSession object on the watch and on the iOS device. In the documentation it says: Always assign a delegate and activate your session before calling any session-related methods. The…
David Schmoecker
  • 487
  • 2
  • 9
  • 16
1
2 3
8 9