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

WKExtendedRuntimeSession vs HKWorkoutSession
I am developing a watchOS app related to Bluetooth. I often used WKExtendedRuntimeSession to connect Bluetooth even in the background, but I often lost the connection. so I used HKWorkoutSession, it works. i go through two official documentation, but i don't know the difference between them. What's the difference of these two sessions? And do those sessions affect the use of Watch Connectivity transferUserInfo?
1
0
1.1k
Dec ’22
Connectivity Watch and iPhone
I'm new in swift development. I want to do a communication between my iPhone and Apple Watch, I succeeded with a tutorial but it's display an Alert. I like to know how I can do to display Text instead of .alert ? Have you an idea to help me ? .alert(item: $connectivityManager.notificationMessage) { message in              Alert(title: Text(message.text))         }
0
0
643
Oct ’22
Segmentation fault 11 Crash in [WCSession onqueue_sendMessageData:replyHandler:errorHandler:dictionaryMessage:] on watchOS 9.0/9.1
Hello everyone! Recently my watch app has been receiving a lot of crash reports, all of them from watchOS 9.0 and 9.1. The crash reports suggest SIGNAL 11 Segmentation fault: 11 crash, and the call stack is located in the WatchConnectivity framework -[WCSession onqueue_ sendMessageData:replyHandler:errorHandler:dictionaryMessage:] + 340 (WCSession.m:674). Now it has become the most common crash of my app. As I understand it, Segmentation fault: 11 suggests some binary or compiler-level problem. Maybe the way I'm calling the API is triggering a problem within the system? Sample Crash Log: Incident Identifier: xxx Hardware Model: Watch6,9 Process: WatchApp [2338] Path: xxx Identifier: io.qifeng.HiCoffee.watchkitapp Version: 4.1.1 (7992) AppStoreTools: 14A305 AppVariant: 1:Watch6,9:8 Code Type: 0200000C (Native) Role: unknown Parent Process: launchd [1] Coalition: io.qifeng.HiCoffee.watchkitapp [450] Date/Time: 2022-10-11 07:14:55.0777 +0200 OS Version: Watch OS 9.0 (20R361) Release Type: User Baseband Version: 5.00.00 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000004 Exception Codes: 0x0000000000000001, 0x0000000000000004 VM Region Info: 0x4 is not in any region. Bytes before following region: 68141052 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 40fc000-4100000 [ 16K] r-x/r-x SM=COW ....app/WatchApp Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [2338] Triggered by Thread: 7 Thread 0 name: Thread 0: 0 WatchApp 0x000000000418f1dc @objc ComplicationController2.getComplicationDescriptors(handler:) + 0 (<compiler-generated>:0) 1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba7a114 _dispatch_main_queue_drain + 800 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba79de4 _dispatch_main_queue_callback_4CF + 40 (queue.c:7804) ... Thread 1 name: Thread 1: 0 libsystem_kernel.dylib 0x000000002c81c18c __ulock_wake + 8 ... Thread 2 name: Thread 2: 0 libsystem_kernel.dylib 0x000000002c81b0f8 kevent_qos + 8 ... Thread 6 name: Thread 6: 0 WatchConnectivity 0x000000005350996c __31-[WCXPCManager setupConnection]_block_invoke_2 + 0 (WCXPCManager.m:92) 1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba73968 _dispatch_lane_serial_drain + 548 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba74454 _dispatch_lane_invoke + 388 (queue.c:3939) 5 libdispatch.dylib 0x000000002ba7e2a4 _dispatch_workloop_worker_thread + 628 (queue.c:6766) 6 libsystem_pthread.dylib 0x000000006580947c _pthread_wqthread + 280 (pthread.c:2618) 7 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8 Thread 7 name: Thread 7 Crashed: ☠️☠️☠️ 0 libdispatch.dylib 0x000000002ba81fd4 dispatch_source_cancel + 8 (inline_internal.h:231) 1 WatchConnectivity 0x00000000534f84b4 __81-[WCSession onqueue_sendMessageData:replyHandler:errorHandler:dictionaryMessage:]_block_invoke + 48 (WCSession.m:675) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba6fe7c _dispatch_continuation_pop + 388 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba81a90 _dispatch_source_invoke + 1760 (source.c:596) 5 libdispatch.dylib 0x000000002ba7cfe8 _dispatch_root_queue_drain + 332 (inline_internal.h:0) 6 libdispatch.dylib 0x000000002ba7d7a4 _dispatch_worker_thread2 + 168 (queue.c:6969) 7 libsystem_pthread.dylib 0x0000000065809440 _pthread_wqthread + 220 (pthread.c:2631) 8 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8 Thread 8 name: Thread 8: 0 libsystem_kernel.dylib 0x000000002c81e210 kevent + 8 ... Thread 9: 0 WatchApp 0x000000000458cd70 monitorCachedData + 756 (KSCrashCachedData.c:0) ... Thread 10: 0 libsystem_pthread.dylib 0x0000000065809514 start_wqthread + 0 I am currently unable to reproduce this problem on my own. Do you have any good suggestions for me?
2
0
1.3k
Oct ’22
Share NSUbiquitousKeyValueStore between Watch app and iOS app
As NSUbiquitousKeyValueStore is now available on watchOS 9, I wanted to share values between the iPhone app and the watch app using the key value store. However, it seems that the watch app creates a separate store with its <app-identifier>.watchkitapp identifier, so data is not synced between both. I tried chaning the iCloud Key-Value Store identifier in the watch app's entitlements file. But then signing the app will fail. Is there any way to use NSUbiquitousKeyValueStore as a shared store between iPhone and Watch?
3
1
2.3k
Oct ’22
watchOS `transferFile`
The documentation states that Warning Always test Watch Connectivity file transfers on paired devices. The Simulator app doesn’t support the transferFile(_:metadata:) method. but not which error (if any) will actually be thrown when trying to execute transferFile(_:metadata:) on simulator. Could somebody share the actual error? At the moment I'm seeing this: 2022-09-03 13:47:22.742104+0900 JDict[11441:4173123] [WC] -[WCSession notifyOfFileError:withFileTransfer:] <WCSessionFileTransfer: 0x6000039ac0a0, session file: <WCSessionFile: 0x600000fce640, identifier: DB927476-A2CC-4E30-934D-EBC80D2B8CE0, file: /Users/username/Library/Developer/CoreSimulator/Devices/AE8422DC-5FCE-4319-A2B7-E04E3743D424/data/Containers/Data/Application/C738703C-C6E6-472F-8266-3F148F5468C4/tmp/CDF111BE-CD68-4B2F-95A8-BDECB7DD8A10-11441-00000516D3127532, hasMetadata: YES>, transferring: NO> with WCErrorCodeFileAccessDenied but can't be sure this is not because of another issue. I can't test on real device right now because I don't have a iOS16 phone and watchOS 9 watch right now. Further, what would be a viable strategy for development on simulator? I feel like using fixtures on the watch app with #if targetEnvironment(simulator) seems cumbersome and was wondering about a better solution. Looking forward to hearing your thoughts!
3
0
1.7k
Sep ’22
Deploy UITests Runner directly to the Apple Watch
I am struggling with the new issue (again) related to the UITesting on Apple Watch. Currently, I'm looking into the opportunity to deploy .app/.ipa file of UITests-Runner directly on Watch. So, I'm not taking about running tests (for which I can easily use XCODEBUILD) or deploying .app/.ipa file of my application itself on Apple Watch (which could be achieved via iOS-deploy), my current problem is to deploy tests runner into real Apple Watch. Any suggestions, thoughts here? Will appreciate any help.
0
0
971
Aug ’22
Please, eli5 me the flow to update AppleWatch complications in background, using data from iOS companion app
My god I feel so dumb. Please help. I have: an iOS app that displays calendar/reminders list (using EventKit data) a set of iOS widgets that also display these lists, but in a widget form the data fetch logic is shared, as well as most of the UI (everything's in SwiftUI) I'm trying to: create a WatchOS app and a a set of watch complications, to display calendars/reminders on the watch IMPORTANT: iOS app is the source of truth for all the data (it need to be post-processed after fetching from EventKit) Here's what works/flow fine (I understand how it works): iOS app updates its data upon launch (or EventKit update message). All good. iOS widgets update their data when iOS asks them to provide a new timeline. Widgets just reach out into EventKit directly on iPhone, and are done with everything (same device, enough processing power, direct access). All good. Watch app (as far as I understand), upon launch, would just need to send a request for data message to the iOS companion app, and iOS companion app would then just "push" the data back to the watch app (after post-processing it into a proper dictionary). So, I'm mostly good with it as well, I think. Watch app could update complications once it is launched and received data from iOS companion app (right?…) And here's where I'm stuck: I can't for the life of me to figure out what would be the flow to update Watch complications automatically in the background, using data from the iOS app's source of truth. I would assume it might be something like: watchOS requests a complication to provide its timeline (at whatever time it decides to do that - I can only be partially in control of the timing) complication, in turn, um…… calls the WatchOS app? (right?……) and requests the data required to build the timeline from the watch app once watch app receives that request from complication, it: sends request for data message to the companion iOS app receives the data from iOS app in a form of dictionary rebuilds the complication's timeline with the data it received from the iOS app Questions: Does the above flow sounds right at all? There does seem to be a lot of messages flowing around and between… Is it how it's supposed to be? What would be the very best approach to this situation? A simple flow outline would help immensely. I tried to look through the documentation and I'm feeling completely worn out… I can't connect the pieces and I just can't find the right place to start so I can untangle the logic (what starts when, request data from where, how) Any guidance is appreciated. I think I'm probably missing something very basic, but I have no idea what exactly :( Thanks! PS: I would like to support watchOS 8+, iOS 15+, so I guess newest additions to watchOS 9 are not applicable. I build everything in SwiftUI.
0
1
820
Aug ’22
Supporting Multiple Apple Watches (WatchOS 7, iOS 14)
When a user has multiple Apple Watches, can the secondary watches send messages to the iPhone via WCSession? WC Session Documentation - https://developer.apple.com/documentation/watchconnectivity/wcsession is quite limited on how to best support multiple Apple Watches. According to the docs: The Watch app on each watch stays in the active state This leads to me believe that each watch could still send a message to the iPhone via WCSession since the session remains active on each watch, but this is not clear. Can anyone confirm that multiple watches can send messages to one iPhone? Or point to other documentation that may be useful? (WCSession messages would be initiated through a background task or push notification).
1
1
2.0k
Jul ’22
Watch won’t unlock Ventura public beta
My Apple Watch v 8.7 unlocked my iMac flawlessly until I installed the Ventura public beta. Now it says watch unlocking, then a couple seconds later the spinning icon appears for a few more seconds, then the password field opens up. i have reset the option and rebooted everything multiple times. Any ideas that don’t involve erasing my watch which works perfectly with my iPhone 13?
2
2
900
Jul ’22
Pull to refresh / Swipe Down to refresh in Apple Watch app in Swift
I want to implement pull to refresh/ swipe down to refresh in my WatchOS project as we see it in native Mail Watch App, I am not able to find any exposed API or Framework for this feature as I didn't get any Apple Documentation or Support for this. Although we have refreshable(action:) for  watchOS 8.0+ in SwiftUI , Kindly if any body can give some reference on how to achieve pull to refresh in Apple Watch app with older OS version in Swift?
1
4
1.4k
Jul ’22
Unable to check for update - apple watch issue
I tried every other way mentioned in the blogs and post to update my apple watch 3 via iphone 12, but didnt worked. Everytime it prompted no internet, try again even though internet was flawless. I tried reseting network settings, hard reset etc and etc, but still back to square one. What clicked for me was quite very easy and is as below. Solution : Reset your apple watch : Press crown and power button simultaneously until it switches off. If the apple watch was already paired , in the bluetooth section of your iphone , click on forget the device. Now , if your iphone is connected to the wifi network on 5G or if your phone has internet coming in as 5G , you need to change that to lower version by selecting a lower version wifi signal in your iphone. Reason , apple watch 3 doesnt support 5G and pairing/updating it over the same network will always prompt no internet. Now after selecting the lower wifi version in your iphone, connect to it. Switch on and pair your apple watch with your iphone. It will start the update post clicking on update now in apple watch app on the iphone. Thanks
1
0
4.8k
Jul ’22
Is it possible to make an Apple Watch app that runs in the background and triggers a notification based on gyroscope and accelerometer data?
I’m new to iOS development so if anything is wrong with my question or post, please excuse me because I’m writing this in good faith, earnestly. I’m trying to learn to be an iOS developer to make an Apple Watch app to help my elderly dad with his blood pressure so as to prevent harmful falls. I want to make an app so that every time he stands (he has low blood pressure), his Watch vibrates. The Watch might be in any sort of state, he’s an old guy so who knows how he uses the Watch, but it will be on and he will be wearing it. I know it would be possible to write an app that vibrates when certain gyroscope / accelerometer conditions are met when the app is active / on the screen. However I need this vibration to happen every time he stands, regardless of what’s happening on his watch. Is this possible? Thank you in advance. Appreciate any responses.
1
1
945
Jun ’22
How to dynamically configure watch widget using phone app?
I'm excited to already have a widget/complication running on watchOS using WidgetKit. It's a great framework! Next, I need to get some settings from my iOS app over to the watch to help configure the widget. Ideally, I'd like the user to be able to change settings on the iOS app, and have them reflected in the watch widget pretty soon after without having to do anything on the watch. (From early testing, updateApplicationContext is decent because it can still be sent even when the watch app isn't active, but unfortunately it doesn't seem to wake up to process this incoming data until the user manually opens the app on the watch again. But maybe I've missed something.) Anyway, what's the best way to do this configuration between phone and watch?
0
1
818
Jun ’22
Watch Connectivity Communication Security
Just curious whether anyone had any resources on the security of data sent via the Watch Connectivity APIs (e.g. updateApplicationContext or sendMessage)? Developing an app that will send data to an apple watch from a companion iOS app. The data we will be sending is events (think like syncing a users calendar between their phone app and watch app), so not super-secure that it should be in keychain, but not something we also want to be flying around for anything to listen to. Haven't found any resources on this, or in any of the past WWDC videos, so any advice or guidance would be great. Thanks 😊
0
0
531
Jun ’22
WKExtendedRuntimeSession vs HKWorkoutSession
I am developing a watchOS app related to Bluetooth. I often used WKExtendedRuntimeSession to connect Bluetooth even in the background, but I often lost the connection. so I used HKWorkoutSession, it works. i go through two official documentation, but i don't know the difference between them. What's the difference of these two sessions? And do those sessions affect the use of Watch Connectivity transferUserInfo?
Replies
1
Boosts
0
Views
1.1k
Activity
Dec ’22
Series 3
My son is trying to connect his series 3 watch to his new iPhone 14. The watch is trying to update, but is staying in update. It keeps adding time to the update for the last 2 days. It’s stuck. I tried a hard reset and it didn’t work.
Replies
2
Boosts
1
Views
1k
Activity
Nov ’22
Connectivity Watch and iPhone
I'm new in swift development. I want to do a communication between my iPhone and Apple Watch, I succeeded with a tutorial but it's display an Alert. I like to know how I can do to display Text instead of .alert ? Have you an idea to help me ? .alert(item: $connectivityManager.notificationMessage) { message in              Alert(title: Text(message.text))         }
Replies
0
Boosts
0
Views
643
Activity
Oct ’22
Segmentation fault 11 Crash in [WCSession onqueue_sendMessageData:replyHandler:errorHandler:dictionaryMessage:] on watchOS 9.0/9.1
Hello everyone! Recently my watch app has been receiving a lot of crash reports, all of them from watchOS 9.0 and 9.1. The crash reports suggest SIGNAL 11 Segmentation fault: 11 crash, and the call stack is located in the WatchConnectivity framework -[WCSession onqueue_ sendMessageData:replyHandler:errorHandler:dictionaryMessage:] + 340 (WCSession.m:674). Now it has become the most common crash of my app. As I understand it, Segmentation fault: 11 suggests some binary or compiler-level problem. Maybe the way I'm calling the API is triggering a problem within the system? Sample Crash Log: Incident Identifier: xxx Hardware Model: Watch6,9 Process: WatchApp [2338] Path: xxx Identifier: io.qifeng.HiCoffee.watchkitapp Version: 4.1.1 (7992) AppStoreTools: 14A305 AppVariant: 1:Watch6,9:8 Code Type: 0200000C (Native) Role: unknown Parent Process: launchd [1] Coalition: io.qifeng.HiCoffee.watchkitapp [450] Date/Time: 2022-10-11 07:14:55.0777 +0200 OS Version: Watch OS 9.0 (20R361) Release Type: User Baseband Version: 5.00.00 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000004 Exception Codes: 0x0000000000000001, 0x0000000000000004 VM Region Info: 0x4 is not in any region. Bytes before following region: 68141052 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> __TEXT 40fc000-4100000 [ 16K] r-x/r-x SM=COW ....app/WatchApp Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [2338] Triggered by Thread: 7 Thread 0 name: Thread 0: 0 WatchApp 0x000000000418f1dc @objc ComplicationController2.getComplicationDescriptors(handler:) + 0 (<compiler-generated>:0) 1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba7a114 _dispatch_main_queue_drain + 800 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba79de4 _dispatch_main_queue_callback_4CF + 40 (queue.c:7804) ... Thread 1 name: Thread 1: 0 libsystem_kernel.dylib 0x000000002c81c18c __ulock_wake + 8 ... Thread 2 name: Thread 2: 0 libsystem_kernel.dylib 0x000000002c81b0f8 kevent_qos + 8 ... Thread 6 name: Thread 6: 0 WatchConnectivity 0x000000005350996c __31-[WCXPCManager setupConnection]_block_invoke_2 + 0 (WCXPCManager.m:92) 1 libdispatch.dylib 0x000000002ba6b590 _dispatch_call_block_and_release + 24 (init.c:1518) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba73968 _dispatch_lane_serial_drain + 548 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba74454 _dispatch_lane_invoke + 388 (queue.c:3939) 5 libdispatch.dylib 0x000000002ba7e2a4 _dispatch_workloop_worker_thread + 628 (queue.c:6766) 6 libsystem_pthread.dylib 0x000000006580947c _pthread_wqthread + 280 (pthread.c:2618) 7 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8 Thread 7 name: Thread 7 Crashed: ☠️☠️☠️ 0 libdispatch.dylib 0x000000002ba81fd4 dispatch_source_cancel + 8 (inline_internal.h:231) 1 WatchConnectivity 0x00000000534f84b4 __81-[WCSession onqueue_sendMessageData:replyHandler:errorHandler:dictionaryMessage:]_block_invoke + 48 (WCSession.m:675) 2 libdispatch.dylib 0x000000002ba6cd7c _dispatch_client_callout + 16 (object.m:560) 3 libdispatch.dylib 0x000000002ba6fe7c _dispatch_continuation_pop + 388 (inline_internal.h:2631) 4 libdispatch.dylib 0x000000002ba81a90 _dispatch_source_invoke + 1760 (source.c:596) 5 libdispatch.dylib 0x000000002ba7cfe8 _dispatch_root_queue_drain + 332 (inline_internal.h:0) 6 libdispatch.dylib 0x000000002ba7d7a4 _dispatch_worker_thread2 + 168 (queue.c:6969) 7 libsystem_pthread.dylib 0x0000000065809440 _pthread_wqthread + 220 (pthread.c:2631) 8 libsystem_pthread.dylib 0x000000006580951c start_wqthread + 8 Thread 8 name: Thread 8: 0 libsystem_kernel.dylib 0x000000002c81e210 kevent + 8 ... Thread 9: 0 WatchApp 0x000000000458cd70 monitorCachedData + 756 (KSCrashCachedData.c:0) ... Thread 10: 0 libsystem_pthread.dylib 0x0000000065809514 start_wqthread + 0 I am currently unable to reproduce this problem on my own. Do you have any good suggestions for me?
Replies
2
Boosts
0
Views
1.3k
Activity
Oct ’22
Share NSUbiquitousKeyValueStore between Watch app and iOS app
As NSUbiquitousKeyValueStore is now available on watchOS 9, I wanted to share values between the iPhone app and the watch app using the key value store. However, it seems that the watch app creates a separate store with its <app-identifier>.watchkitapp identifier, so data is not synced between both. I tried chaning the iCloud Key-Value Store identifier in the watch app's entitlements file. But then signing the app will fail. Is there any way to use NSUbiquitousKeyValueStore as a shared store between iPhone and Watch?
Replies
3
Boosts
1
Views
2.3k
Activity
Oct ’22
Ios 16.1 crash
no display shown after im updating my iphone xr to 16.1 .. but somehow i can charge the battery just there is no display.. this is happen when i try to play voice note from whatsapp
Replies
1
Boosts
0
Views
1.2k
Activity
Oct ’22
[Apple Watch Series 3] Unable to update because you're not connected to the internet
Got a series 3 apple watch and a iphone xr on iOS16, pairing went fine, but when i try to update it, it says i'm not connected to the internet. And I definitely am. Any help would be great.
Replies
1
Boosts
0
Views
2.0k
Activity
Oct ’22
Apple Watch 电量不足时不能发送位置给iPhone
Apple应该考虑开发:当Watch电量不足时可以选择是否发送位置给iPhone,这样可以让其Watch没电关机的状态下找到Watch。
Replies
2
Boosts
0
Views
860
Activity
Oct ’22
Get health data from Apple Watch via internet without Health app
Hi! I was wondering if we can get health data from Apple Watch via Internet, without using the Health app and send them to a server.
Replies
0
Boosts
0
Views
1.7k
Activity
Sep ’22
watchOS `transferFile`
The documentation states that Warning Always test Watch Connectivity file transfers on paired devices. The Simulator app doesn’t support the transferFile(_:metadata:) method. but not which error (if any) will actually be thrown when trying to execute transferFile(_:metadata:) on simulator. Could somebody share the actual error? At the moment I'm seeing this: 2022-09-03 13:47:22.742104+0900 JDict[11441:4173123] [WC] -[WCSession notifyOfFileError:withFileTransfer:] <WCSessionFileTransfer: 0x6000039ac0a0, session file: <WCSessionFile: 0x600000fce640, identifier: DB927476-A2CC-4E30-934D-EBC80D2B8CE0, file: /Users/username/Library/Developer/CoreSimulator/Devices/AE8422DC-5FCE-4319-A2B7-E04E3743D424/data/Containers/Data/Application/C738703C-C6E6-472F-8266-3F148F5468C4/tmp/CDF111BE-CD68-4B2F-95A8-BDECB7DD8A10-11441-00000516D3127532, hasMetadata: YES>, transferring: NO> with WCErrorCodeFileAccessDenied but can't be sure this is not because of another issue. I can't test on real device right now because I don't have a iOS16 phone and watchOS 9 watch right now. Further, what would be a viable strategy for development on simulator? I feel like using fixtures on the watch app with #if targetEnvironment(simulator) seems cumbersome and was wondering about a better solution. Looking forward to hearing your thoughts!
Replies
3
Boosts
0
Views
1.7k
Activity
Sep ’22
Deploy UITests Runner directly to the Apple Watch
I am struggling with the new issue (again) related to the UITesting on Apple Watch. Currently, I'm looking into the opportunity to deploy .app/.ipa file of UITests-Runner directly on Watch. So, I'm not taking about running tests (for which I can easily use XCODEBUILD) or deploying .app/.ipa file of my application itself on Apple Watch (which could be achieved via iOS-deploy), my current problem is to deploy tests runner into real Apple Watch. Any suggestions, thoughts here? Will appreciate any help.
Replies
0
Boosts
0
Views
971
Activity
Aug ’22
Please, eli5 me the flow to update AppleWatch complications in background, using data from iOS companion app
My god I feel so dumb. Please help. I have: an iOS app that displays calendar/reminders list (using EventKit data) a set of iOS widgets that also display these lists, but in a widget form the data fetch logic is shared, as well as most of the UI (everything's in SwiftUI) I'm trying to: create a WatchOS app and a a set of watch complications, to display calendars/reminders on the watch IMPORTANT: iOS app is the source of truth for all the data (it need to be post-processed after fetching from EventKit) Here's what works/flow fine (I understand how it works): iOS app updates its data upon launch (or EventKit update message). All good. iOS widgets update their data when iOS asks them to provide a new timeline. Widgets just reach out into EventKit directly on iPhone, and are done with everything (same device, enough processing power, direct access). All good. Watch app (as far as I understand), upon launch, would just need to send a request for data message to the iOS companion app, and iOS companion app would then just "push" the data back to the watch app (after post-processing it into a proper dictionary). So, I'm mostly good with it as well, I think. Watch app could update complications once it is launched and received data from iOS companion app (right?…) And here's where I'm stuck: I can't for the life of me to figure out what would be the flow to update Watch complications automatically in the background, using data from the iOS app's source of truth. I would assume it might be something like: watchOS requests a complication to provide its timeline (at whatever time it decides to do that - I can only be partially in control of the timing) complication, in turn, um…… calls the WatchOS app? (right?……) and requests the data required to build the timeline from the watch app once watch app receives that request from complication, it: sends request for data message to the companion iOS app receives the data from iOS app in a form of dictionary rebuilds the complication's timeline with the data it received from the iOS app Questions: Does the above flow sounds right at all? There does seem to be a lot of messages flowing around and between… Is it how it's supposed to be? What would be the very best approach to this situation? A simple flow outline would help immensely. I tried to look through the documentation and I'm feeling completely worn out… I can't connect the pieces and I just can't find the right place to start so I can untangle the logic (what starts when, request data from where, how) Any guidance is appreciated. I think I'm probably missing something very basic, but I have no idea what exactly :( Thanks! PS: I would like to support watchOS 8+, iOS 15+, so I guess newest additions to watchOS 9 are not applicable. I build everything in SwiftUI.
Replies
0
Boosts
1
Views
820
Activity
Aug ’22
Supporting Multiple Apple Watches (WatchOS 7, iOS 14)
When a user has multiple Apple Watches, can the secondary watches send messages to the iPhone via WCSession? WC Session Documentation - https://developer.apple.com/documentation/watchconnectivity/wcsession is quite limited on how to best support multiple Apple Watches. According to the docs: The Watch app on each watch stays in the active state This leads to me believe that each watch could still send a message to the iPhone via WCSession since the session remains active on each watch, but this is not clear. Can anyone confirm that multiple watches can send messages to one iPhone? Or point to other documentation that may be useful? (WCSession messages would be initiated through a background task or push notification).
Replies
1
Boosts
1
Views
2.0k
Activity
Jul ’22
Watch won’t unlock Ventura public beta
My Apple Watch v 8.7 unlocked my iMac flawlessly until I installed the Ventura public beta. Now it says watch unlocking, then a couple seconds later the spinning icon appears for a few more seconds, then the password field opens up. i have reset the option and rebooted everything multiple times. Any ideas that don’t involve erasing my watch which works perfectly with my iPhone 13?
Replies
2
Boosts
2
Views
900
Activity
Jul ’22
Pull to refresh / Swipe Down to refresh in Apple Watch app in Swift
I want to implement pull to refresh/ swipe down to refresh in my WatchOS project as we see it in native Mail Watch App, I am not able to find any exposed API or Framework for this feature as I didn't get any Apple Documentation or Support for this. Although we have refreshable(action:) for  watchOS 8.0+ in SwiftUI , Kindly if any body can give some reference on how to achieve pull to refresh in Apple Watch app with older OS version in Swift?
Replies
1
Boosts
4
Views
1.4k
Activity
Jul ’22
Unable to check for update - apple watch issue
I tried every other way mentioned in the blogs and post to update my apple watch 3 via iphone 12, but didnt worked. Everytime it prompted no internet, try again even though internet was flawless. I tried reseting network settings, hard reset etc and etc, but still back to square one. What clicked for me was quite very easy and is as below. Solution : Reset your apple watch : Press crown and power button simultaneously until it switches off. If the apple watch was already paired , in the bluetooth section of your iphone , click on forget the device. Now , if your iphone is connected to the wifi network on 5G or if your phone has internet coming in as 5G , you need to change that to lower version by selecting a lower version wifi signal in your iphone. Reason , apple watch 3 doesnt support 5G and pairing/updating it over the same network will always prompt no internet. Now after selecting the lower wifi version in your iphone, connect to it. Switch on and pair your apple watch with your iphone. It will start the update post clicking on update now in apple watch app on the iphone. Thanks
Replies
1
Boosts
0
Views
4.8k
Activity
Jul ’22
Solution
This is the solution that worked for me delete watch from find my iPhone forget Apple watch option in Bluetooth reinstall watch app start the setup process and you should be able to pair and the update will start. I hope this helps you!
Replies
0
Boosts
0
Views
792
Activity
Jul ’22
Is it possible to make an Apple Watch app that runs in the background and triggers a notification based on gyroscope and accelerometer data?
I’m new to iOS development so if anything is wrong with my question or post, please excuse me because I’m writing this in good faith, earnestly. I’m trying to learn to be an iOS developer to make an Apple Watch app to help my elderly dad with his blood pressure so as to prevent harmful falls. I want to make an app so that every time he stands (he has low blood pressure), his Watch vibrates. The Watch might be in any sort of state, he’s an old guy so who knows how he uses the Watch, but it will be on and he will be wearing it. I know it would be possible to write an app that vibrates when certain gyroscope / accelerometer conditions are met when the app is active / on the screen. However I need this vibration to happen every time he stands, regardless of what’s happening on his watch. Is this possible? Thank you in advance. Appreciate any responses.
Replies
1
Boosts
1
Views
945
Activity
Jun ’22
How to dynamically configure watch widget using phone app?
I'm excited to already have a widget/complication running on watchOS using WidgetKit. It's a great framework! Next, I need to get some settings from my iOS app over to the watch to help configure the widget. Ideally, I'd like the user to be able to change settings on the iOS app, and have them reflected in the watch widget pretty soon after without having to do anything on the watch. (From early testing, updateApplicationContext is decent because it can still be sent even when the watch app isn't active, but unfortunately it doesn't seem to wake up to process this incoming data until the user manually opens the app on the watch again. But maybe I've missed something.) Anyway, what's the best way to do this configuration between phone and watch?
Replies
0
Boosts
1
Views
818
Activity
Jun ’22
Watch Connectivity Communication Security
Just curious whether anyone had any resources on the security of data sent via the Watch Connectivity APIs (e.g. updateApplicationContext or sendMessage)? Developing an app that will send data to an apple watch from a companion iOS app. The data we will be sending is events (think like syncing a users calendar between their phone app and watch app), so not super-secure that it should be in keychain, but not something we also want to be flying around for anything to listen to. Haven't found any resources on this, or in any of the past WWDC videos, so any advice or guidance would be great. Thanks 😊
Replies
0
Boosts
0
Views
531
Activity
Jun ’22