Watch Connectivity

RSS for tag

Implement two-way communication between an iOS app and its paired watchOS app using Watch Connectivity.

Posts under Watch Connectivity tag

195 Posts

Post

Replies

Boosts

Views

Activity

Real Bluetooth Range(Distance) from watch to watch ?
Hi, I'm trying to make a watch app that transfer data watch to watch(or iOS). (Not for backup) So, I looked up for core bluetooth feature. It was a nice and kind document. However, I bumped in to a problem that might cause a severe flaw in my project, which is.. the distance (range) that the apple watch can reach to another one. I googled it and found out 33 feet would be the limit range of bluetooth 4.0 (or 5.0 whatever). BUT, when I google just "bluetooth 4.0 and 5.0 range", the range was way over the distance mentioned, like 10 times way further. Some say up to 100m (330 feet), other say 60m (200feet). So If is there anyone who tested the real range of bluetooth working via watch to watch?? Well.. thank you for reading my post, and I hope anyone can answer me! :)
1
0
2.1k
Jun ’23
watch app crashes when permissions for microphone and bluetooth are changed on iPhone
My watchOS app crashes when I accept/change the microphone or Bluetooth permission from its companion iOS app. It crashes with the following message in the console. Message from debugger: Terminated due to signal 9 Please let me know a way to identify and fix the exact problem. here are my device logs: Device logs and crash report
4
1
2.9k
May ’23
Share data between multiple Watches paired to the same iphone?
Is it possible to share data between multiple Watches paired to the same iphone? Background: We are developing an app that collects sensor data from Apple Watch and uploads it to the cloud via iphone. Problem: We aim to upload sensor data files from all Apple Watches to the cloud, even when multiple watches are paired to a single iPhone. However, in reality, only the files from the currently active Watch are sent. If we could share data among multiple Watches, we could solve this problem. Please let me know if you have any other good solutions.
1
0
1.1k
May ’23
Is there a way to get extra time to finish tasks in the WatchOS background?
In the Watch app, press the digital crown to go to the home screen, or the app enters the background state and tries to save the current data to iCloud. However, in this case, you may not be able to save to iCloud. In my opinion, the Watch app doesn't seem to be given any extra time to finish tasks once it enters the background. Is there any way I can do a little bit of extra background work to get things done? In the case of a background session, the system starts the app at an unspecified time after the app enters the background, so I decided that it was not particularly necessary in my case. It would be nice to be able to finish the work within 30 minutes while entering the background state, but I can't find a suitable way.
0
0
1.1k
Apr ’23
Is there a way to know if an App is supported on the paired Apple Watch?
We would like to tell a user that we have an Apple Watch app in our iOS app but we don't want to uses that have an Apple Watch paired that is not supported. We can look at WCSession.default.isPaired to know that some kind of watch is paired, and we can use WCSession.default.isWatchAppInstalled to know that our app is not installed on the watch. Although we want to know if the watch is even supported. Example: A user has an Apple Watch Series 3 paired, but our app only supports watchOS 9. How do we avoid telling that user about an our app that they are not even able to install on that watch?
0
0
803
Apr ’23
WatchOs check user login status phone app
I am developing WatchOs version of my iOS (flutter) application. Everything is fine but my phone application has a membership feature and unauthenticated users can't use the app features. So I have to check if the user logged in to the phone app while opening my watch app. The problem is that I couldn't figure out what is the correct way of doing this check. Should I do it via WatchSession or is updateApplicationContext enough? Or is there any other way? The user can log out from the phone application while the watch is not reachable so when the user opens the watch app later, there can be an asynchronous situation.
0
0
978
Mar ’23
Best sync option for watchOS / SwiftUI?
I have an app where ideally I have sync between web, mobile, and watchos. Firestore (firebase) works well for sync between web and mobile. But I'm a bit stuck as to the best option for watchOS. WatchOS doesn't support firestore, but even if it does, I think many apple watches don't have internet support so I want an option based on watchconnectivity. I use watchconnectivity to send the data, but just store it in @State. When I kill the watchOS app, the state goes away, even though I'd rather it persist. What is the best option to persist it ? Is it CoreData, AppStore, or some other option? CoreData seems like the most reliable option, but also a lot of extra code to keep the watchOS coreData synced with the firestore app. Wanted to post here in case anyone has any insights. I have some apps on my watch that seem to sync with their iOS companion apps without much problems, even if I turn off the iphone and kill the watchOS app, when I restart the watchOS app, the basic state persists. So these devs are doing something - is it just coredata? appstorage? or something else. Wanted to post here in case any good ideas.
1
0
2.1k
Jan ’23
Moving user from a notification on a watch extension to the app on the phone
Hello! We're currently trying to improve the user experience for the users who are receiving notifications on their watch. We don't have a watch app, just a phone app. On the phone, we are able to allow the user to tap on the notification, which then leads to a particular screen on the phone. However, we are struggling to find a solution for this regarding notifications on the watch. The problem we're trying to solve is that a user might get a notification on their watch. However, we don't have a way of leading them from the watch to the right screen on the app. Some of the ideas we were playing around with that we were unable to figure out: Trying to directly open the app from the watch notification Sending a local notification only to the phone Blocking local notifications on the watch Handling an action on a notification differently depending on if it was tapped on the watch or on the phone Has anyone else had a similar issue or found a solution? Thanks in advance!
1
0
753
Jan ’23
URLSessionWebSocketTask + WatchConnectivity on Background task
Hello, I am facing a technical issue which is not cover by iOS Background Execution exemples, and I am looking for some help. Context I am doing a WatchOS App which allow to display websocket text messages for entertainment purpose. An average of 3000 can be connected to the same channel, the message rate may be high. Process The IOS (Iphone) app create a websocket connection with wss://irc-ws.chat.twitch.tv:443and transfer all those message to the WatchOS (Apple Watch) app. Issues When the IOS app is put in background, everything stops. This is logical because the application works as a proxy. The IOS app only allows searching and connect to channels, and it seems normal to put it in background. Knowledges I already did some researches about background task. I already understand many concepts like : stop the process as soon as possible, save battery life, optimization ect ... But I can't see my situation in any of the examples cover by documentations. Background tasks (Question) Is it possible to continue my websocket connection and the watch connectivity in background ? This question leads to others : Is the websocket (for text messages) can be considered as an URLSession background transfer ? Describe here Is Watch Connectivity can be consider as a Background Processing Task or another task ? And which API to use ? How long can the proxy process continue in background? What I expect for my user The perfect userflow which merge Apple Background restriction and user expectation could be : 1- the user opens the app on the watch and the phone. 2- the user does some stuff like search and connect to a channel. 3- he put the IOS app in background to do other stuff on his phone 4- the watchOS continue to receive and display messages (for maybe 1–2 hours) 5- If the user close or leave the Watch app for more than (approximately) 2 min, the background process stops itself by a success. 6- the user needs to reopen the Phone app to restart the process.
0
0
1.5k
Jan ’23
Trigger Watch measurements and get real time data on mobile app
Hi iOS developers, We as a company are creating a healthcare product, and on mobile side we integrated HealthKit to get measurements. Now we are trying to integrate the app on apple watch to get Heart Rate, Blood oxygen, and other measurements that user can measure with watch. My question is, is there any clear way to trigger Apple watch sensors to make a measurement and pass them real time on the mobile app? Thank you in advance, Solaborate
1
3
862
Jan ’23
IOS background Websocket task and WatchOS protocol
Hi, I made an Apple Watch App which use Websocket communication with wss://irc-ws.chat.twitch.tv:443. Unfortunately, WatchOS prevent Websocket for my usage. https://developer.apple.com/documentation/technotes/tn3135-low-level-networking-on-watchos. So my app doesn't work. A workaround is to do the Websocket task on the IPhone and send messages to the Watch. It works perfectly as long as the app is open on the Phone, but it's really inconvenient for users. I want to know if it's possible to continue this process till the phone app is in background ? If yes, how to do it ? The process could be long and must continue until the Watch App or the Phone app closed (this part is easy to detect). I have already read documentations and tutorials about background processes, but none of them talk about long time process like Websocket communication or WatchConnectivity. I think I looked at the wrong place, or didn't use the right vocabulary.
1
0
1.9k
Jan ’23
WCSession not reachable despite active WKExtendedRuntimeSession
Hello. I'm developing an app that necessitates the Watch counterpart being available for Watch Connectivity live messages for periods of time, even when the screen is turned off. So what I did, is set up a WKExtendedRuntimeSession. I tried both "Self Care" and "Mindfulness" types, as those are supposed to keep the app running in foreground. WKExtendedRuntimeSessionDelegate.extendedRuntimeSessionDidStart confirms the session has started. According to documentation on WCSession.isReachable the Watch app should now be reachable, as long as the user doesn't close it: WatchKit extension. The iOS device is within range, so communication can occur and the WatchKit extension is running in the foreground, or is running with a high priority in the background (for example, during a workout session or when a complication is loading its initial timeline data). Still, as soon as I turn my wrist away, isReachable flips to false and messages aren't delivered. Any clues on this? Thanks!
1
0
2.1k
Jan ’23
Problem while trying to pair apple watch series 2 to iPhone 13 mini
hello, i’m trying to pair my Apple Watch 2 with my iPhone 13 but it does not Wolk (watch Waze originally not mine and was paired with another phone). The watch was reseted to factory then everytime i try to pair it with my phone i receive an error message while searching for update saying that the device is not connected to the internet. my phone is updated to the latest software version, both devices are charged i’ve set up my wifi to 2.4ghz but nothing worked so far… would you Have any solution to solve this issue ? thanks in advance, Nathan
0
0
697
Jan ’23
Make Apple Watch vibrate from button on iOS App
I'm trying to find a way to have a simple button on the iOS app to make the apple watch vibrate. Is this possible using SwiftUI? I've seen the WatchConnectivity documentation, but I need access to the WKInterfaceDevice API to make the Apple watch vibrate. I'm barely learning app development; unfortunately, things like this aren't well-documented. Thank you!
0
0
969
Jan ’23
How do you detect an Apple Watch's distance from the Mac?
Has anyone been able to successfully create a connection between watchOS and macOS, such as using an Apple Watch to unlock a Mac? I know there's WC Session between iOS and WatchOS and then there's nearby interaction between two iOS devices. However, I want to know if any of you have been successfully able to do any kind fo interaction between watchOS and macOS. For instance, here it says that Apple uses Wifi technology to approximate the distance between the mac and the watch: https://security.stackexchange.com/questions/158100/how-does-unlock-your-mac-with-apple-watch-work-what-should-i-consider-in-the But I cannot find any concrete SwiftUI approach on it. Would appreciate if you know if any kits or methods to achieve any sort of interaction between the watch and the computer.
1
0
842
Dec ’22
Apple standards for Entitlement Server
Hello! I’m developing Entitlement Server for mobile operators. The server will make possibility connect customer’s eSIM in Apple Watch with they iPhone. I have to make integration of the Entitlement Server according with the following Apple’s documents. Where I can find the last versions of the documents?  1)  Apple Watch Entitlements Provisioning Specification 2) Wi-Fi Calling iPhone Entitlements 3) Sweetgum specification 4) E&FR: Volte entitlement 5) VoWiFi for iCloud devices 6) Apple Watch Standalone (tremblant) 7) EandFR EAPAKA Whitepaper
3
0
5.2k
Dec ’22
Real Bluetooth Range(Distance) from watch to watch ?
Hi, I'm trying to make a watch app that transfer data watch to watch(or iOS). (Not for backup) So, I looked up for core bluetooth feature. It was a nice and kind document. However, I bumped in to a problem that might cause a severe flaw in my project, which is.. the distance (range) that the apple watch can reach to another one. I googled it and found out 33 feet would be the limit range of bluetooth 4.0 (or 5.0 whatever). BUT, when I google just "bluetooth 4.0 and 5.0 range", the range was way over the distance mentioned, like 10 times way further. Some say up to 100m (330 feet), other say 60m (200feet). So If is there anyone who tested the real range of bluetooth working via watch to watch?? Well.. thank you for reading my post, and I hope anyone can answer me! :)
Replies
1
Boosts
0
Views
2.1k
Activity
Jun ’23
watch app crashes when permissions for microphone and bluetooth are changed on iPhone
My watchOS app crashes when I accept/change the microphone or Bluetooth permission from its companion iOS app. It crashes with the following message in the console. Message from debugger: Terminated due to signal 9 Please let me know a way to identify and fix the exact problem. here are my device logs: Device logs and crash report
Replies
4
Boosts
1
Views
2.9k
Activity
May ’23
Share data between multiple Watches paired to the same iphone?
Is it possible to share data between multiple Watches paired to the same iphone? Background: We are developing an app that collects sensor data from Apple Watch and uploads it to the cloud via iphone. Problem: We aim to upload sensor data files from all Apple Watches to the cloud, even when multiple watches are paired to a single iPhone. However, in reality, only the files from the currently active Watch are sent. If we could share data among multiple Watches, we could solve this problem. Please let me know if you have any other good solutions.
Replies
1
Boosts
0
Views
1.1k
Activity
May ’23
Is there a way to get extra time to finish tasks in the WatchOS background?
In the Watch app, press the digital crown to go to the home screen, or the app enters the background state and tries to save the current data to iCloud. However, in this case, you may not be able to save to iCloud. In my opinion, the Watch app doesn't seem to be given any extra time to finish tasks once it enters the background. Is there any way I can do a little bit of extra background work to get things done? In the case of a background session, the system starts the app at an unspecified time after the app enters the background, so I decided that it was not particularly necessary in my case. It would be nice to be able to finish the work within 30 minutes while entering the background state, but I can't find a suitable way.
Replies
0
Boosts
0
Views
1.1k
Activity
Apr ’23
Is there a way to know if an App is supported on the paired Apple Watch?
We would like to tell a user that we have an Apple Watch app in our iOS app but we don't want to uses that have an Apple Watch paired that is not supported. We can look at WCSession.default.isPaired to know that some kind of watch is paired, and we can use WCSession.default.isWatchAppInstalled to know that our app is not installed on the watch. Although we want to know if the watch is even supported. Example: A user has an Apple Watch Series 3 paired, but our app only supports watchOS 9. How do we avoid telling that user about an our app that they are not even able to install on that watch?
Replies
0
Boosts
0
Views
803
Activity
Apr ’23
WatchOs check user login status phone app
I am developing WatchOs version of my iOS (flutter) application. Everything is fine but my phone application has a membership feature and unauthenticated users can't use the app features. So I have to check if the user logged in to the phone app while opening my watch app. The problem is that I couldn't figure out what is the correct way of doing this check. Should I do it via WatchSession or is updateApplicationContext enough? Or is there any other way? The user can log out from the phone application while the watch is not reachable so when the user opens the watch app later, there can be an asynchronous situation.
Replies
0
Boosts
0
Views
978
Activity
Mar ’23
Best sync option for watchOS / SwiftUI?
I have an app where ideally I have sync between web, mobile, and watchos. Firestore (firebase) works well for sync between web and mobile. But I'm a bit stuck as to the best option for watchOS. WatchOS doesn't support firestore, but even if it does, I think many apple watches don't have internet support so I want an option based on watchconnectivity. I use watchconnectivity to send the data, but just store it in @State. When I kill the watchOS app, the state goes away, even though I'd rather it persist. What is the best option to persist it ? Is it CoreData, AppStore, or some other option? CoreData seems like the most reliable option, but also a lot of extra code to keep the watchOS coreData synced with the firestore app. Wanted to post here in case anyone has any insights. I have some apps on my watch that seem to sync with their iOS companion apps without much problems, even if I turn off the iphone and kill the watchOS app, when I restart the watchOS app, the basic state persists. So these devs are doing something - is it just coredata? appstorage? or something else. Wanted to post here in case any good ideas.
Replies
1
Boosts
0
Views
2.1k
Activity
Jan ’23
Moving user from a notification on a watch extension to the app on the phone
Hello! We're currently trying to improve the user experience for the users who are receiving notifications on their watch. We don't have a watch app, just a phone app. On the phone, we are able to allow the user to tap on the notification, which then leads to a particular screen on the phone. However, we are struggling to find a solution for this regarding notifications on the watch. The problem we're trying to solve is that a user might get a notification on their watch. However, we don't have a way of leading them from the watch to the right screen on the app. Some of the ideas we were playing around with that we were unable to figure out: Trying to directly open the app from the watch notification Sending a local notification only to the phone Blocking local notifications on the watch Handling an action on a notification differently depending on if it was tapped on the watch or on the phone Has anyone else had a similar issue or found a solution? Thanks in advance!
Replies
1
Boosts
0
Views
753
Activity
Jan ’23
URLSessionWebSocketTask + WatchConnectivity on Background task
Hello, I am facing a technical issue which is not cover by iOS Background Execution exemples, and I am looking for some help. Context I am doing a WatchOS App which allow to display websocket text messages for entertainment purpose. An average of 3000 can be connected to the same channel, the message rate may be high. Process The IOS (Iphone) app create a websocket connection with wss://irc-ws.chat.twitch.tv:443and transfer all those message to the WatchOS (Apple Watch) app. Issues When the IOS app is put in background, everything stops. This is logical because the application works as a proxy. The IOS app only allows searching and connect to channels, and it seems normal to put it in background. Knowledges I already did some researches about background task. I already understand many concepts like : stop the process as soon as possible, save battery life, optimization ect ... But I can't see my situation in any of the examples cover by documentations. Background tasks (Question) Is it possible to continue my websocket connection and the watch connectivity in background ? This question leads to others : Is the websocket (for text messages) can be considered as an URLSession background transfer ? Describe here Is Watch Connectivity can be consider as a Background Processing Task or another task ? And which API to use ? How long can the proxy process continue in background? What I expect for my user The perfect userflow which merge Apple Background restriction and user expectation could be : 1- the user opens the app on the watch and the phone. 2- the user does some stuff like search and connect to a channel. 3- he put the IOS app in background to do other stuff on his phone 4- the watchOS continue to receive and display messages (for maybe 1–2 hours) 5- If the user close or leave the Watch app for more than (approximately) 2 min, the background process stops itself by a success. 6- the user needs to reopen the Phone app to restart the process.
Replies
0
Boosts
0
Views
1.5k
Activity
Jan ’23
Trigger Watch measurements and get real time data on mobile app
Hi iOS developers, We as a company are creating a healthcare product, and on mobile side we integrated HealthKit to get measurements. Now we are trying to integrate the app on apple watch to get Heart Rate, Blood oxygen, and other measurements that user can measure with watch. My question is, is there any clear way to trigger Apple watch sensors to make a measurement and pass them real time on the mobile app? Thank you in advance, Solaborate
Replies
1
Boosts
3
Views
862
Activity
Jan ’23
IOS background Websocket task and WatchOS protocol
Hi, I made an Apple Watch App which use Websocket communication with wss://irc-ws.chat.twitch.tv:443. Unfortunately, WatchOS prevent Websocket for my usage. https://developer.apple.com/documentation/technotes/tn3135-low-level-networking-on-watchos. So my app doesn't work. A workaround is to do the Websocket task on the IPhone and send messages to the Watch. It works perfectly as long as the app is open on the Phone, but it's really inconvenient for users. I want to know if it's possible to continue this process till the phone app is in background ? If yes, how to do it ? The process could be long and must continue until the Watch App or the Phone app closed (this part is easy to detect). I have already read documentations and tutorials about background processes, but none of them talk about long time process like Websocket communication or WatchConnectivity. I think I looked at the wrong place, or didn't use the right vocabulary.
Replies
1
Boosts
0
Views
1.9k
Activity
Jan ’23
WCSession not reachable despite active WKExtendedRuntimeSession
Hello. I'm developing an app that necessitates the Watch counterpart being available for Watch Connectivity live messages for periods of time, even when the screen is turned off. So what I did, is set up a WKExtendedRuntimeSession. I tried both "Self Care" and "Mindfulness" types, as those are supposed to keep the app running in foreground. WKExtendedRuntimeSessionDelegate.extendedRuntimeSessionDidStart confirms the session has started. According to documentation on WCSession.isReachable the Watch app should now be reachable, as long as the user doesn't close it: WatchKit extension. The iOS device is within range, so communication can occur and the WatchKit extension is running in the foreground, or is running with a high priority in the background (for example, during a workout session or when a complication is loading its initial timeline data). Still, as soon as I turn my wrist away, isReachable flips to false and messages aren't delivered. Any clues on this? Thanks!
Replies
1
Boosts
0
Views
2.1k
Activity
Jan ’23
Call a function from WatchOS App in iOS App
I'm brand new to Swift and I'm struggling to figure out how I can call a function from the watchOS app in my iOS app. All I'm trying to do is have a button in the iOS app that makes the watch vibrate:
Replies
1
Boosts
0
Views
1.2k
Activity
Jan ’23
Problem while trying to pair apple watch series 2 to iPhone 13 mini
hello, i’m trying to pair my Apple Watch 2 with my iPhone 13 but it does not Wolk (watch Waze originally not mine and was paired with another phone). The watch was reseted to factory then everytime i try to pair it with my phone i receive an error message while searching for update saying that the device is not connected to the internet. my phone is updated to the latest software version, both devices are charged i’ve set up my wifi to 2.4ghz but nothing worked so far… would you Have any solution to solve this issue ? thanks in advance, Nathan
Replies
0
Boosts
0
Views
697
Activity
Jan ’23
Make Apple Watch vibrate from button on iOS App
I'm trying to find a way to have a simple button on the iOS app to make the apple watch vibrate. Is this possible using SwiftUI? I've seen the WatchConnectivity documentation, but I need access to the WKInterfaceDevice API to make the Apple watch vibrate. I'm barely learning app development; unfortunately, things like this aren't well-documented. Thank you!
Replies
0
Boosts
0
Views
969
Activity
Jan ’23
How do you detect an Apple Watch's distance from the Mac?
Has anyone been able to successfully create a connection between watchOS and macOS, such as using an Apple Watch to unlock a Mac? I know there's WC Session between iOS and WatchOS and then there's nearby interaction between two iOS devices. However, I want to know if any of you have been successfully able to do any kind fo interaction between watchOS and macOS. For instance, here it says that Apple uses Wifi technology to approximate the distance between the mac and the watch: https://security.stackexchange.com/questions/158100/how-does-unlock-your-mac-with-apple-watch-work-what-should-i-consider-in-the But I cannot find any concrete SwiftUI approach on it. Would appreciate if you know if any kits or methods to achieve any sort of interaction between the watch and the computer.
Replies
1
Boosts
0
Views
842
Activity
Dec ’22
Apple Watch Series 4 Can’t connect to iPhone SE
Every time I try to pair my Apple Watch Series 4 to my iPhone SE. It comes up with the message that it needs to update and it can’t connect to the Internet to update. Apple hasn’t been that much of a help. Wondering if anyone has any fixes I have been resetting everything and I kept trying, and it still popped up as that message
Replies
1
Boosts
0
Views
768
Activity
Dec ’22
[APPLE WATCH 1ST GENERATION] Can't pair it, can't update
Hello, My iphone fins the apple watch and i can start the pairing, but then it checks for updates and finds none, so its impossible to continue pairing. Any help? Thanks!
Replies
0
Boosts
0
Views
845
Activity
Dec ’22
sendMessageData is it secured to send sensitive data between watch and iOS app?
in order to communicate sensitive data between iOS and watch app for banking application, i ask if the sendMessageData is secure? and the communication based on wifi, Bluetooth ? and what’s the protocol of communication ?
Replies
0
Boosts
0
Views
1.2k
Activity
Dec ’22
Apple standards for Entitlement Server
Hello! I’m developing Entitlement Server for mobile operators. The server will make possibility connect customer’s eSIM in Apple Watch with they iPhone. I have to make integration of the Entitlement Server according with the following Apple’s documents. Where I can find the last versions of the documents?  1)  Apple Watch Entitlements Provisioning Specification 2) Wi-Fi Calling iPhone Entitlements 3) Sweetgum specification 4) E&FR: Volte entitlement 5) VoWiFi for iCloud devices 6) Apple Watch Standalone (tremblant) 7) EandFR EAPAKA Whitepaper
Replies
3
Boosts
0
Views
5.2k
Activity
Dec ’22