Apple Watch

RSS for tag

Discuss hardware-specific topics related to Apple Watch.

Posts under Apple Watch tag

200 Posts

Post

Replies

Boosts

Views

Activity

Getting not entitled error with WaterSubmersionManager
Hi I just got my Apple Watch Ultra and I am trying to access depth and water temperature with the new CMWaterSubmersion api and I am getting CMErrorDomain 110 (which is CMErrorNotEntitled). Not sure exactly what this means, I am guessing I there is an entitlement missing? https://developer.apple.com/documentation/coremotion/cmwatersubmersionmeasurement
9
3
3.4k
Jul ’23
RAW IMU Data stops logging on wrist down
Hello, I'm having a problem on my watchOS app where even though I have instantiated a WKExtendedRuntimeSession the app stops logging IMU data a few seconds after the watch has gone to sleep. This happens on my Apple Watch Series 6, but does not happen on the latest Apple Watch Series 8. CPU usage in both cases does not exceed 70%, so I doubt my app is exceeding the limits thus cancelling the WKExtendedRuntimeSession. To back that up, I am not getting the WKExtendedRuntimeSessionInvalidationReason trigger I was suggested to put in place form the documentation. I have tested a couple of different sample rates, this does not seem to happen with a sample rate as low as 1, but does happen already with a sample rate of 30. Could it be a watch limitation, or am I forgetting something? P.S. I have also set the background mode to physical therapy and ticket the workout processing box.
0
0
1.2k
Jun ’23
Apple Watch (waiting for first unlock) in Xcode
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
28
13
17k
Jun ’23
How to wake to the last activity on apple watch
Hi there, I'm trying to figure out how to make my app always on top when waking the apple watch, just like the native Workout app does. I've noticed the official guidance for users to enable this behavior, but how can I introduce it into my own app? Any answers will be appreciated! Reference to apple support: https://support.apple.com/en-sg/guide/watch/apd748b87e2a/watchos -> Wake to your last activity
0
0
631
Jun ’23
Independent Apple Watch app can't connect to Internet.
My device is Apple Watch Series 5. It only support wifi. When I was debug in real machine. It can't connect to internet. The app is independent. But the system app can connect to internet. Why? Why? Why? And How to solve. code : let session = URLSession.shared     let task: URLSessionDataTask = session.dataTask(with: URLRequest(url: URL(string: "https://www.baidu.com/s?wd=iOS")!)) { [self] (data, response, error) in       if data == nil {                   print(error.debugDescription)       }     }     task.resume() error message : Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <FD086BDC-3051-469F-9280-0054CC8F0488>.<1>, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorCodeKey=50, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalDataTask <FD086BDC-3051-469F-9280-0054CC8F0488>.<1>",   "LocalDataPDTask <FD086BDC-3051-469F-9280-0054CC8F0488>.<1>",   "LocalDataTask <FD086BDC-3051-469F-9280-0054CC8F0488>.<1>" ), NSErrorFailingURLStringKey=https://www.baidu.com/s?wd=iOS, _kCFStreamErrorDomainKey=1, NSErrorFailingURLKey=https://www.baidu.com/s?wd=iOS})
3
0
1.7k
Jun ’23
Device selection on Apple Pay in-app provisioning
Hi, I work in a fintech company that offers support to Apple Pay in our cards, i.e. our users have the option add their cards to Apple Pay using our app (in-app provisioning). Our company already got the proper In-App provisioning entitlements from Apple and the entire in-app provisioning process is working as expected. When an user taps on the button "Add to Apple Wallet" in our app to provision his card, we call the following code below: let config = PKAddPaymentPassRequestConfiguration() config.cardholderName = "\(firstName) \(lastName)" config.localizedDescription = "MyApp Card" config.primaryAccountSuffix = String(cardSuffix) config.paymentNetwork = .visa /* Present the Apple Pay ViewController */ let controller = PKAddPaymentPassViewController(requestConfiguration: config, delegate: self) UIApplication.shared.delegate?.window??.rootViewController?.present(controller!, animated: true) If the user has an Apple Watch paired, he is greeted with a screen asking him to select on which device he wants to add the card: on his iPhone or on the Apple Watch (please see the following screenshot: imgur.com/a/MSQPnt8 - After the user selects the device, the provisioning process continues successfully as expected. However, if the user taps on the "Add to Apple Wallet" button and he already has the card added to one of the devices (the Apple Watch, for example), then the code above is called again, but he is once again greeted with the same screen asking him to select on which devices he wants to add the card, on his iPhone or on his Apple Watch, even though the card is already added on the Apple Watch. The way I understand it, since the card is already added on the Apple Watch, only iPhone should appear as a valid option to have the card added. Is there anything else that I need to do in the code above to make sure only the available devices (I mean, only the devices that don't have the card added on Apple Pay yet) are listed in the device selection? Thanks
6
1
4.3k
Jun ’23
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.3k
Jun ’23
How can independent App make URL session requests through iPhone Proxy?
I have tried URL session requests in the following three ways: Proxy through iPhone: Request failure "ErrorDomain =NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." Connecting to a known network: Request successful Connecting using cellular data: Request successful These tests were all conducted on the Apple Watch Series 6 watchOS 9.4. Does "watch-only App "not support URL session request through iPhone Proxy? Here is my current URL session request handler: let config = URLSessionConfiguration.ephemeral config.waitsForConnectivity = true config.requestCachePolicy = .reloadIgnoringLocalCacheData config.urlCache = nil config.allowsCellularAccess = true config.allowsConstrainedNetworkAccess = true config.allowsExpensiveNetworkAccess = true let session = URLSession(configuration: config, delegate: nil, delegateQueue: .main) let task = session.dataTask(with: url) { (data, response, error) in guard error == nil else { print(error!) self.error = "\(error!)" return } } task.resume() Info.plist <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsLocalNetworking</key> <true/> </dict>
1
1
945
May ’23
waiting for first unlock in Xcode
I have tried several times to restart all the devices or turn off turn on developer mode, but continuing getting "waiting for first unlock" in Xcode. The Xcode version is 14.2 with ios 16.0. I tried to work with the older version of iOS 15 and Xcode13, but it failed with "new watch new ios version at 16.0". Does anyone know how can I get this working? Thanks
2
2
1.6k
May ’23
Networking error on Independent Apple Watch Apps
I created a project with "watch-only App" template in XCode, running on Apple Watch Series 6, the console output network error: ErrorDomain =NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." However, It works fine on the Apple watch Ultra. I try the following: I added the following code, but doesn't work. configuration.allowsCellularAccess = true configuration.waitsForConnectivity = true Tried using the Alamofire framework, but it didn't work. import Alamofire var body: some View { VStack { Text("hello world") .task { URLCache.shared.removeAllCachedResponses() AF.request("https://api.thecatapi.com/v1/images/search?limit=1").response { response in print( response) } } } } Turn off the Wi-Fi and Bluetooth of the mobile phone. The Watch Series 6 can successfully request through Wi-Fi. But that's not an option. I can't ask my users to turn off Wi-Fi and Bluetooth before using my app. Here is my code: VStack { Text("hello world") } .onAppear { guard let url = URL(string: "https://api.thecatapi.com/v1/images/search?limit=1") else { print("Invalid URL") self.error = "Invalid URL" return } let dataTask = URLSession.shared.dataTask(with: url) {(data, response, error) in guard error == nil else { print(error) return } print(data) } dataTask.resume() } What can I do? My Apple Watch Series 6 version is watchOS 9.0. I noticed when lauching my app first time on the Apple Watch Series 6. It doesn't ask for 'allow "Settings" to use wireless data’.But I was asked about it on the Apple Watch Ultra.
4
1
1.6k
May ’23
Accelerometer in Apple Watch, WatchOS
Hello 👋🏼 I would like to create my own Apple Watch app for workouts. I would like to count the number of repetitions of the exercise that I do for example (squat). But my watch is going to sleep. And when the device goes into sleep mode, the counter stops counting, and I wanted to ask. Does the accelerometer run in the background so that it counts the number of squats in the background? What can you recommend ?
0
0
808
May ’23
Getting not entitled error with WaterSubmersionManager
Hi I just got my Apple Watch Ultra and I am trying to access depth and water temperature with the new CMWaterSubmersion api and I am getting CMErrorDomain 110 (which is CMErrorNotEntitled). Not sure exactly what this means, I am guessing I there is an entitlement missing? https://developer.apple.com/documentation/coremotion/cmwatersubmersionmeasurement
Replies
9
Boosts
3
Views
3.4k
Activity
Jul ’23
RAW IMU Data stops logging on wrist down
Hello, I'm having a problem on my watchOS app where even though I have instantiated a WKExtendedRuntimeSession the app stops logging IMU data a few seconds after the watch has gone to sleep. This happens on my Apple Watch Series 6, but does not happen on the latest Apple Watch Series 8. CPU usage in both cases does not exceed 70%, so I doubt my app is exceeding the limits thus cancelling the WKExtendedRuntimeSession. To back that up, I am not getting the WKExtendedRuntimeSessionInvalidationReason trigger I was suggested to put in place form the documentation. I have tested a couple of different sample rates, this does not seem to happen with a sample rate as low as 1, but does happen already with a sample rate of 30. Could it be a watch limitation, or am I forgetting something? P.S. I have also set the background mode to physical therapy and ticket the workout processing box.
Replies
0
Boosts
0
Views
1.2k
Activity
Jun ’23
Apple Watch (waiting for first unlock) in Xcode
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
Replies
28
Boosts
13
Views
17k
Activity
Jun ’23
How to wake to the last activity on apple watch
Hi there, I'm trying to figure out how to make my app always on top when waking the apple watch, just like the native Workout app does. I've noticed the official guidance for users to enable this behavior, but how can I introduce it into my own app? Any answers will be appreciated! Reference to apple support: https://support.apple.com/en-sg/guide/watch/apd748b87e2a/watchos -> Wake to your last activity
Replies
0
Boosts
0
Views
631
Activity
Jun ’23
Independent Apple Watch app can't connect to Internet.
My device is Apple Watch Series 5. It only support wifi. When I was debug in real machine. It can't connect to internet. The app is independent. But the system app can connect to internet. Why? Why? Why? And How to solve. code : let session = URLSession.shared     let task: URLSessionDataTask = session.dataTask(with: URLRequest(url: URL(string: "https://www.baidu.com/s?wd=iOS")!)) { [self] (data, response, error) in       if data == nil {                   print(error.debugDescription)       }     }     task.resume() error message : Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask &lt;FD086BDC-3051-469F-9280-0054CC8F0488&gt;.&lt;1&gt;, NSLocalizedDescription=The Internet connection appears to be offline., _kCFStreamErrorCodeKey=50, _NSURLErrorRelatedURLSessionTaskErrorKey=(   "LocalDataTask &lt;FD086BDC-3051-469F-9280-0054CC8F0488&gt;.&lt;1&gt;",   "LocalDataPDTask &lt;FD086BDC-3051-469F-9280-0054CC8F0488&gt;.&lt;1&gt;",   "LocalDataTask &lt;FD086BDC-3051-469F-9280-0054CC8F0488&gt;.&lt;1&gt;" ), NSErrorFailingURLStringKey=https://www.baidu.com/s?wd=iOS, _kCFStreamErrorDomainKey=1, NSErrorFailingURLKey=https://www.baidu.com/s?wd=iOS})
Replies
3
Boosts
0
Views
1.7k
Activity
Jun ’23
Device selection on Apple Pay in-app provisioning
Hi, I work in a fintech company that offers support to Apple Pay in our cards, i.e. our users have the option add their cards to Apple Pay using our app (in-app provisioning). Our company already got the proper In-App provisioning entitlements from Apple and the entire in-app provisioning process is working as expected. When an user taps on the button "Add to Apple Wallet" in our app to provision his card, we call the following code below: let config = PKAddPaymentPassRequestConfiguration() config.cardholderName = "\(firstName) \(lastName)" config.localizedDescription = "MyApp Card" config.primaryAccountSuffix = String(cardSuffix) config.paymentNetwork = .visa /* Present the Apple Pay ViewController */ let controller = PKAddPaymentPassViewController(requestConfiguration: config, delegate: self) UIApplication.shared.delegate?.window??.rootViewController?.present(controller!, animated: true) If the user has an Apple Watch paired, he is greeted with a screen asking him to select on which device he wants to add the card: on his iPhone or on the Apple Watch (please see the following screenshot: imgur.com/a/MSQPnt8 - After the user selects the device, the provisioning process continues successfully as expected. However, if the user taps on the "Add to Apple Wallet" button and he already has the card added to one of the devices (the Apple Watch, for example), then the code above is called again, but he is once again greeted with the same screen asking him to select on which devices he wants to add the card, on his iPhone or on his Apple Watch, even though the card is already added on the Apple Watch. The way I understand it, since the card is already added on the Apple Watch, only iPhone should appear as a valid option to have the card added. Is there anything else that I need to do in the code above to make sure only the available devices (I mean, only the devices that don't have the card added on Apple Pay yet) are listed in the device selection? Thanks
Replies
6
Boosts
1
Views
4.3k
Activity
Jun ’23
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.3k
Activity
Jun ’23
How can independent App make URL session requests through iPhone Proxy?
I have tried URL session requests in the following three ways: Proxy through iPhone: Request failure "ErrorDomain =NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." Connecting to a known network: Request successful Connecting using cellular data: Request successful These tests were all conducted on the Apple Watch Series 6 watchOS 9.4. Does "watch-only App "not support URL session request through iPhone Proxy? Here is my current URL session request handler: let config = URLSessionConfiguration.ephemeral config.waitsForConnectivity = true config.requestCachePolicy = .reloadIgnoringLocalCacheData config.urlCache = nil config.allowsCellularAccess = true config.allowsConstrainedNetworkAccess = true config.allowsExpensiveNetworkAccess = true let session = URLSession(configuration: config, delegate: nil, delegateQueue: .main) let task = session.dataTask(with: url) { (data, response, error) in guard error == nil else { print(error!) self.error = "\(error!)" return } } task.resume() Info.plist <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSAllowsLocalNetworking</key> <true/> </dict>
Replies
1
Boosts
1
Views
945
Activity
May ’23
waiting for first unlock in Xcode
I have tried several times to restart all the devices or turn off turn on developer mode, but continuing getting "waiting for first unlock" in Xcode. The Xcode version is 14.2 with ios 16.0. I tried to work with the older version of iOS 15 and Xcode13, but it failed with "new watch new ios version at 16.0". Does anyone know how can I get this working? Thanks
Replies
2
Boosts
2
Views
1.6k
Activity
May ’23
Networking error on Independent Apple Watch Apps
I created a project with "watch-only App" template in XCode, running on Apple Watch Series 6, the console output network error: ErrorDomain =NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." However, It works fine on the Apple watch Ultra. I try the following: I added the following code, but doesn't work. configuration.allowsCellularAccess = true configuration.waitsForConnectivity = true Tried using the Alamofire framework, but it didn't work. import Alamofire var body: some View { VStack { Text("hello world") .task { URLCache.shared.removeAllCachedResponses() AF.request("https://api.thecatapi.com/v1/images/search?limit=1").response { response in print( response) } } } } Turn off the Wi-Fi and Bluetooth of the mobile phone. The Watch Series 6 can successfully request through Wi-Fi. But that's not an option. I can't ask my users to turn off Wi-Fi and Bluetooth before using my app. Here is my code: VStack { Text("hello world") } .onAppear { guard let url = URL(string: "https://api.thecatapi.com/v1/images/search?limit=1") else { print("Invalid URL") self.error = "Invalid URL" return } let dataTask = URLSession.shared.dataTask(with: url) {(data, response, error) in guard error == nil else { print(error) return } print(data) } dataTask.resume() } What can I do? My Apple Watch Series 6 version is watchOS 9.0. I noticed when lauching my app first time on the Apple Watch Series 6. It doesn't ask for 'allow "Settings" to use wireless data’.But I was asked about it on the Apple Watch Ultra.
Replies
4
Boosts
1
Views
1.6k
Activity
May ’23
Accelerometer in Apple Watch, WatchOS
Hello 👋🏼 I would like to create my own Apple Watch app for workouts. I would like to count the number of repetitions of the exercise that I do for example (squat). But my watch is going to sleep. And when the device goes into sleep mode, the counter stops counting, and I wanted to ask. Does the accelerometer run in the background so that it counts the number of squats in the background? What can you recommend ?
Replies
0
Boosts
0
Views
808
Activity
May ’23