Questions tagged [watchconnectivity]

The WatchConnectivity framework provides a two-way channel for an iOS app to talk to its counterpart WatchKit app and vice-versa. Use this tag when asking for help with Apple's WatchConnectivity Framework.

The WatchConnectivity framework provides a two-way channel for an iOS app to talk to its counterpart WatchKit app and vice-versa. This framework provides classes that allow both components (the iOS app and the WatchKit) to share data with each other.

The WCSession class, the heart of this framework, provides communication methods that can allow simple transfers like messages, to full-blown file transfers.

WatchConnectivity Framework Reference

249 questions
0
votes
1 answer

Transferring several dictionaries ApplicationContext ( from iPhone to Apple Watch )

I've got a function, named didReceiveApplicationContext and I need to transfer several dictionaries there. Now, I'm using this code: guard let transferData = applicationContext["dataFromAnotherDevice"] as? Int else { return } When I'm trying to do…
0
votes
4 answers

Apple Watch not receiving didReceiveUserInfo on device, but does in the simulator

I am trying to make an Apple Watch app for the first time, and I'm having some problems testing it on the devices themselves. I have followed a tutorial: https://www.natashatherobot.com/watchconnectivity-application-context/ When I sent data from…
Cynexz
  • 187
  • 1
  • 9
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
2 answers

WatchConnectivity works occasionally

I'm having troubles using the WatchConnectivity framework on WatchOS 2.1 and iOS 9. I'm using transferUserInfo() to send datas from the iOS app to the Watch and It works. The problem is on the way back: when I try to send an update after the user…
0
votes
1 answer

WatchConnectivity not sending data

I'm using WatchConnectivity to send a simple dictionary from an iPhone to Apple Watch. On the Apple Watch side, to get around the fact that contexts may not be queued when the app is opened, the last received data is saved to UserDefaults and…
Alex Wulff
  • 2,039
  • 3
  • 18
  • 29
0
votes
1 answer

replyHandler not received for sendMessage when Apple Watch is in background

I am making my app for Apple Watch OS2, in which I use sendMessage:replyHandler for communication b/w iPhone and Watch. Now the problem is that when I send a message to iPhone from my watch and goes to background in watch, I do not receive any…
Amish
  • 31
  • 3
0
votes
1 answer

Multi watch interface with WatchConnectivity Context

I create an iPhone application (with a view) / Watch (with interface) that displays speed, distance and a timer with a Play / Pause, Stop and Clear. I used to share WatchConnectivity Application Context data between (Send and receipt of Context).…
Arno.R
  • 71
  • 1
  • 6
0
votes
1 answer

WatchConnectivity - detect Application Context change in all controllers

I am attempting to send data from iOS -> Watch and this works fine when the active controller has didReceiveApplicationContext implemented. I can receive the context object and everything works well. However, I'm not clear how I can implement…
GivP
  • 2,634
  • 6
  • 32
  • 34
0
votes
1 answer

Sending Core Data objects to "read only" Apple Watch App

I am trying to develop a watchOS 2 app to go along with my iOS app. The iOS app utilizes Core Data, and the Apple Watch app is simply going to be a "read only" client and display the data from the iOS app. I have read a few things regarding…
kschins
  • 1,054
  • 1
  • 13
  • 26
0
votes
2 answers

WatchConnectivity send message of watch with the launch of a timer on the iphone

I created a timer app that runs on the iphone. I wish we could control it iPhone and Watch The controls (Play, Stop, Restart) with the iPhone works fine, my meter is displayed on the Watch. Watch on the Stop works well, for against the Start does…
Arno.R
  • 71
  • 1
  • 6
0
votes
1 answer

WatchConnectivity Framework : WKSession is maintain the queue which I requested To Watch

I have create an application which is sending data to watch for showing. When the watch is screen is active then it sending data perfectly, but when watch sleeps then an error occurred that device is not active. My question is that when the watch is…
0
votes
1 answer

transfer array of custom objects with WatchConnectivity / encoding in Swift

Am trying to transfer an array of custom objects from iOS to watchkitextension. Understood that in order to do so, data needs to be encoded. Am though getting error when decoding. Here we go: The custom object: final class Person: NSObject { …
TPeter
  • 463
  • 3
  • 15
0
votes
1 answer

How to update WKInterfaceController / UIViewControllers after receiving data via WatchConnectivity

I read in some posts to setup WCWatchConnectivity Session in delegate rather than controller. How do you transfer the data received in delegate then to the controller for further processing (in Swift)?
TPeter
  • 463
  • 3
  • 15
0
votes
4 answers

Connecting to external URL from WatchKit 2.0

I would like to load some information in the WatchKit interface from a REST backoffice. Is there some fast way to execute a URL request passing by the host iOS app or I must concoct a specific protocol taking advantage of the bare WatchConnectivity…
Fabrizio Bartolomucci
  • 4,948
  • 8
  • 43
  • 75
-1
votes
2 answers

WatchConnectivity on Xcode 14

I made a "todo" app, using core data, and want to extend it to apple watch. The main problem is that when I run the simulator, the watch seems to be not connected with iPhone. I tried to import WatchConnectivity, use WCSession, delegate, and they…
1 2 3
16
17