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.

120 questions
0
votes
1 answer

Sending a huge dictionary via sendMessage - WatchKit

My goal is to send a huge dictionary (containing about 10 arrays) from the iOS app to the watchKit app, but I'm not getting any output on the watchKit's end. If I send a string, the following example works fine: let message = [ "fromParent": "some…
David Robertson
  • 1,561
  • 4
  • 19
  • 41
0
votes
2 answers

iOS WatchOS2 WatchConnectivity [WCSession defaultSession] activateSession] failure

I have XCode 7.3, iPhone5 with iOS 9.3, Apple Watch with WatchOS 2.2 I have a company project which wants to support Watch App. Firstly, I built an empty project to make sure the watchkit and watchkit extension is working, and it does work. I can…
Alien
  • 31
  • 1
  • 5
0
votes
1 answer

Is it possible to make an iOS app process WatchKit connectivity requests while closed?

I've been reading through the documentation on the WatchKit connectivity framework to try and figure out if I can delegate all of the intensive processing needs over to my parent iOS app. All of the code already exists in the parent app for doing…
user843337
0
votes
1 answer

What is maximum size of dictionary can I send through watchconnectivity

I was sending .5 mb size dictionary through iPhone to watch os2, however every time it is giving message reply failed. It is working correctly in watchos1. There are 700 objects in that dictionary. Please help.
0
votes
0 answers

Delivering WCSession messages using NSNotifications on Apple Watch

I have NSNotifications using Kugel that are working great on the watch simulator and both the iPhone and iPhone simulator to deliver messages to update the UI/state but these are failing to deliver on the watch side when testing on the devices. The…
0
votes
1 answer

WCSession sendMessage not working

I'm calling this code in my Watch extension (and it does run, checked with a breakpoint): [[WCSession defaultSession] sendMessage:@{ @"load": @"main" } replyHandler:^(NSDictionary * _Nonnull replyMessage)…
Can Poyrazoğlu
  • 33,241
  • 48
  • 191
  • 389
0
votes
1 answer

check if WCSession has data

I am using WCSession to pass data between my iWatch and iPhone app. I need a way to see if the phone has already sent data when the watch opens up. I have tried didReceiveApplicationContext, didReceiveUserInfo and didReceiveMessage but they only get…
user1079052
  • 3,803
  • 4
  • 30
  • 55
0
votes
2 answers

WCSession activateSession exc_bad_access crash

I have trouble with WCSession activateSession. I added this code in my viewDidLoad method, and it's crashing at activateSession call. sendMessage is also crashing. if ([WCSession isSupported]) { [WCSession defaultSession].delegate = self; …
toxicsun
  • 397
  • 3
  • 12
0
votes
1 answer

Calling func session didReceiveMessage in AppDelegate

The user can already tweet (the text that was dictated on watch) in foreground if a specific vc is active on the iPhone. But now I want to go a step forward and send this tweet in Background. So the user dictate a text in the watch app and the text…
Devhess
  • 289
  • 4
  • 16
0
votes
1 answer

WatchOS2 connectivity framework doesn't work

I want to pass data from Iphone to Apple Watch. I tried everything but when I am using the didReceiveUserInfo function, nothing happens I check if WCSession is compatible and it is. Code on my Iphone: if(ipField.text != ""){ do { …
fredsco
  • 313
  • 4
  • 19
0
votes
1 answer

WCErrorDomain Code=7007 when adding localized InfoPlist.strings

I have developed iPhone app with watchOS 2 app, but I met a strange problem. Everything is ok before I localize InfoPlist.strings of watchOS 2 target (not watchOS 2 extension target). If I localize InfoPlist.strings, the app will get the error…
scottphc
  • 954
  • 7
  • 16
0
votes
2 answers

Apple Watch WCSession return watchAppInstalled false

I have an Apple Watch app and works perfect on simulators (watch simulator and iPhone simulator). When I run the app on real devices, the WCSession watchAppInstalled property is false, but I have the application on a watch, so I can't start it from…
-1
votes
1 answer

WatchOS WCSession won't activate / WCsession missing its delegate

Im trying to simply connect an iOS app to a watchOS app with Xcode emulators and using watch connectivity WCSession. The watch isn't reachable and session won't activate even though I tried every possible change to the code. I use the same Sync…
-1
votes
1 answer

Apple Watch WCConnectionDelegate, sending message in activationDidComplete fails occasionally?

I am having an issue where, when sending a message through WCConnection, the session.sendMessage fails sometimes if called in the delegate method activationDidCompleteWith. The issue is not repeatable every time (in fact, it works most of the…
ccrama
  • 724
  • 1
  • 8
  • 23
-1
votes
1 answer

Fatal error: swift 2.3 when unwrapping value

I'm trying to send a saved string to the apple watch with WCsession methode. But when I do this I get an error in swift 2.3: fatal error: unexpectedly found nil while unwrapping an optional value !! func Reloadip() { let ip = …
1 2 3 4 5 6 7
8