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.
Questions tagged [wcsession]
120 questions
0
votes
1 answer
How to fix [WC] denying activation due to missing delegate Swift
Hi I have this function
extension UIViewController: WCSessionDelegate {
public func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
}
public func sessionDidBecomeInactive(_…

TheCesco1988
- 280
- 1
- 2
- 10
0
votes
1 answer
WCSession is not reachable for sending messages
I want to trigger few events to my watch extension app from the iOS app but I'm getting the error saying WCSession is not reachable. All my events are time-sensitive, So I can't wait for the user to turn on the watch display to trigger the events.…

Krishna Kirana
- 438
- 4
- 10
0
votes
1 answer
Websphere Commerce Custom REST service for Login using social sign in not generating valid WC Tokens and CTXMGMT table not getting updated
In the current website, social login is implemented using the mapping in struts and it will call the custom controller command "XYZThirdPartyLoginCmdImpl" which will authenticate the details passed and it will call the out of the box "LogonCmd" for…

Akhil B S
- 19
- 3
0
votes
2 answers
Trouble sending data from iPhone to WatchOS using Application Context
I am trying to send data from my iOS app to a companion WatchOS app using WCSession. The iOS app was created with NativeScript, thus the need for Objective-C.
When running the apps on both simulators and real devices I receive the following error…

Reece Reynolds
- 56
- 1
- 7
0
votes
1 answer
is possible send data from an existing iOS App to a Watch OS 6 Independent App member of an app group?
I have an iOS app without their companion watch app, I tried to read data stored in the iOS app from my new watchOS 6 independent app.
Is there any option like:
var userDefaults = NSUserDefaults(suiteName: "group.com.myApp")!
but with WCSession or…

Fernando Valenzuela
- 39
- 6
0
votes
2 answers
setting delegate of WCSession to nil
I'm using 'WCSession' for the connection between my app and apple watch. I preferred singleton approach. So, I made a shared session:
static Shared_WCSession *sharedInstance = nil;
+(Shared_WCSession*)getSharedInstance {
@synchronized(self) {
…

tara tandel
- 538
- 5
- 25
0
votes
2 answers
iPhone not receiving applicationContext from AppleWatch
I have created a program to test sending data back and forth from iPhone and AppleWatch, and visa versa. I've set it up so there is a button on the AppleWatch and a button on the iPhone. When the iPhone one is pressed, it will send data and rename…

chriscrutt
- 500
- 3
- 5
- 17
0
votes
1 answer
How early can session didReceiveApplicationContext be called on the iPhone app as it launches
In my phone app, the WCSession is activated within the AppDelegate's didFinishLaunchingWithOptions method. The watch app is sending an applicationContext to the phone app. Suppose the phone app is not running at the time of this transfer, and when…

programmist
- 564
- 1
- 7
- 24
0
votes
1 answer
WKInterfaceTable is not getting populated with Codable data
My JSON object is not getting sent to my WKInterfaceTable.
UITableView is populating correctly. Last step is to populate the WKInterfaceTable. The code is not throwing an errors in Xcode but there is a runtime crash because the cast is failing.…

TokyoToo
- 926
- 2
- 10
- 21
0
votes
1 answer
Watchkit - didReceiveApplicationContext works only for the first time
When I run an watch connectivity app with iOS and watchOS simulators in Xcode, WCSession delegate method didReceiveApplicationContext works only for the first time, but then it is not called and nothing changes in the Interface controller. Can…

iAnkit
- 1,940
- 19
- 25
0
votes
1 answer
Whats the best way to share real time data from an apple watch app to iphone app in watchOS4?
I have been having trouble with the WCSession, it does get a message across but it is really slow it can take up to 10 seconds for me to receive the message on the iPhone app. So I was wondering if there is a better way these days to do this (I'm…

Ilias
- 1
0
votes
1 answer
Send data from iWatch to iPhone in background
I want to send data from iWatch to iPhone if my watch is in the background and iPhone app is in the foreground. I transferring data by timer method. It is calling each second. WCSessionDelegate methods implemented both files iPhone app file and…

Yogendra Solanki
- 201
- 1
- 6
0
votes
1 answer
watchkit sendmessage errorHandler not called
I was trying to send message from watch to phone. If phone is not connected, to send the message at a later time. However, when testing on actual watch, it seems like error handler not called. My sentFlag is not false.
func…

simon thismyvoice
- 48
- 5
0
votes
1 answer
Unable to read WCSession singleton instance of WatchConnectivity framework
I m trying to work on WCSession default instance. But it gives the following complier issue.
Defination of default Instance

sant05
- 418
- 7
- 21
0
votes
1 answer
For Apple Watch OS in Swift, how can I have a function run after WCSession activation is complete?
I have a method in my main interface controller class that I wish to run when the WCSession between the phone and watch has finished activating. I know there is a didFinishActivation function in the WCSession class. However, how do I communicate the…

bigreddawg
- 723
- 1
- 5
- 10