watchOS is the operating system for Apple Watch.

Posts under watchOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

UDID for Apple watch series 9
Hi, I am currently trying to install and run a watchOS App I developed in Xcode on an Apple watch series 9. I would like to add the Apple watch as a registered device to a developer account. I need to provide the device name and the device ID or UDID to register the Apple watch. I am not sure how I can get the UDID for the Apple watch. I would appreciate your help with information on how I can get the UDID for the Apple watch and if the watch needs to be registered with a developer account for installing and running a watchOS app from Xcode on the Apple watch. Thank you.
1
1
60
1d
"This app cannot be installed because its integrity could not be verified"
Hi, We developed a app for iPhone and Apple Watch. The app has been tested and it worked well on iPhone SE and Apple Watch Series 6 running earlier OS. We recently upgraded the Apple Watches to Series 9 & watchOS 10.5, and the iOS on the same iPhone is upgraded to 17.4.1. The app can still be built on the iPhone but when I tried to install the app on the new Apple Watch, it won't work and shows "This app cannot be installed because its integrity could not be verified." To make sure it's not a OS issue, I also upgraded the watchOS on the old Apple Watch Series 6 to 10.5 and the app worked. I wonder what cause the app fail on the newer Apple Watch running the same watchOS. Thank you
1
0
152
3d
Watch app does not recognise package dependencies
Hello All, I'm new to the forum and learning app development. I have managed to solve most issues through the web but this one has me stumped. I'm using Xcode 15.4 on a MacBook Air M1 and working on a iOS/WatchOS project. The iOS app is done and I've started on the Watch one by copying the code over. There were 3 issues 2 of which were easy to fix but the 3rd is weird. The two dependencies I added via the SPM give a "No such module '***'" error. Any ideas anybody? Yours hopefully, Michael
0
0
49
3d
Problems with SwiftUI preview and packages
My project has an iOS and WatchOS app. I added a package dependency, which supports both iOS and WatchOS, though I have only added the library to my iOS app. I can compile and run both apps just fine but when I try to use one of the WatchOS app views in Canvas preview I get errors saying different properties defined in the packages files are not available on watchOS. These blocks of code that give errors are wrapped in: "if TARGET_OS_IPHONE". I have selected the Watch Target and a watch device in the run selector as well as in the canvas. Why is this failing and how can I get it working? Thanks
0
0
81
4d
Can't add Widget Extension on WatchOS Target
I can't select my Companion App Target in the Selection Many for "Embed in" in the add Target File. It's a Companion App for a Flutter App. I add the target via File -> New -> Target -> WatchOS -> WidgetExtension The minimum version for the flutter project is iOS 14 and the watch watchOS 10. I tried readding my WatchTarget but it didn't work that time either. I made a dummy project with a default iOS App (No Flutter) and default WatchOS App and there I had the option to select my Companion Target. checking Configuration Intent also changes nothing for the outcome. I also tried adding one into another Runner (Flutter) Project with an Companion App and I run into the same Issue there.
0
0
68
4d
WatchOS 10.5 TabView Mem Leak Help Please
Target: WatchOS 10.5 NOTE: This is a watchOS only app Given: A single view containing NavigationSplitview, with the List in the "sidebar", a TabView in the "detail" and a TabView in a sheet attached to each tab in the "detail" view. When: Navigating between top-level list and "detail" TabView, or navigating through "detail" to "sheet" TabView Then: Memory leaks occur. If the TabView() views are replaced with List() views there are no longer memory leaks. There are no reference types involved. Everything is in Structs Code below causes the issue which can be observed in Instruments. So my question is what have I coded incorrectly to cause this issue? Or, How can I fix this? Thanks in advance. @main struct VerticalTabView_MemLeak: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { struct ParentItem: Identifiable, Hashable { var id = UUID() var name: String var children: [Item] init(_ name: String, _ children: [Item]){ self.name = name self.children = children } } struct Item: Identifiable, Hashable { var id: UUID = UUID() var name: String init(_ name: String){ self.name = name } } @State var selectedParentItem: ParentItem? @State var selectedItem: Item? var parentItems = [ ParentItem("A", [Item("one"),Item("two"),Item("three")]), ParentItem("B", [Item("four"),Item("five"),Item("six")]), ParentItem("C", [Item("seven"),Item("eight"),Item("nine")]) ] var body: some View { NavigationSplitView { List(selection: $selectedParentItem) { ForEach(parentItems, id: \.id) { parentItem in NavigationLink(value: parentItem) { HStack { Text(parentItem.name) } .padding() } } } .navigationTitle("Top Level") } detail: { if let items = selectedParentItem?.children { TabView(selection: $selectedItem) { ForEach(items, id:\.id) { item in Text(verbatim: item.name) .tag(item) .onTapGesture { selectedItem = item } } } .tabViewStyle(.verticalPage) .navigationTitle(selectedParentItem?.name ?? "") .sheet(item: $selectedItem, onDismiss: { selectedItem = nil }, content: { item in TabView { Text(item.name).foregroundStyle(.yellow) Text(item.name).foregroundStyle(.yellow) } .tabViewStyle(.verticalPage) .navigationTitle(selectedParentItem?.name ?? "") }) } } } } #Preview { ContentView() }
1
0
187
1w
The watchOS support of NSValue.CGSizeValue
Starting from Xcode 16 Beta 2, NSValue.CGSizeValue is no longer available on watchOS, whereas this method was supported in previous versions of Xcode. The Xcode header files mark this method as unavailable on watchOS, but after manually modifying the Xcode files to remove the unavailable macro, the code compiles and runs normally. Is there a change in this API that makes it unsupported on watchOS, or is this an error? Previously, I submitted feedback FB14072192, and the status of this feedback was updated to "Unable to diagnose with current information" without any further response. If this is indeed an issue, I hope it can be fixed.
2
1
231
1w
Watch not detecting stands
During WatchOS 10 dev betas and now into 11 dev betas, I am still seeing were stands are not being detected. What I do not know is if the steps are detected. But here is the situation. Today: I was going on some wiring outside and in the basement. I was clearly up and moving around for over an hour. I can see on my camera's I went outside at 15:50, came back in at 16:18. Then went to my basement and was working down there from 16:19 until 16:30. After that cleaned up my mess. So I was up and down stairs and without a doubt standing. At 16:50 I got the reminder to stand. Other cases: 1: I get home from work about XX:10 . I have to walk about 50 ft from my garage to my house, up stairs, take the dog out, make dinner, and finally get my chair to eat and at XX:50 I get the reminder. 2: I'm at work, I'm going to get lunch and I have to walk pretty far and again at XX:50 I get the reminder. This is very rare, but it has happened. Now, in a odd twist. I get up in the morning at XX:50, I have 10 steps to the bathroom, and I manage to get that hourly stand.
0
0
159
1w
64-bit Apple Watches with 64-bit pointer sizes?
I have a watchOS app written in C++, Swift and SwiftUI. This app is meant only for 64-bit architecture. I know Apple uses the arm architecture, so I thought arm64 will be the arch of latest AppleWatches. I tested my code in x64 simulator (Intel Mac) and arm64 simulator (silicon Mac) - no trouble. Next is to test on a device - AppleWatch Series 9, model: A2984. I set the arch to arm64 and my application failed to build, with Xcode showing a popup about arch mismatch... which is due to the app's arch begin different from device's arch. When I change Xcode arch setting to arm64_32, then I don't get this popup, but my builds fail. When I read about arm64_32, I realised that this is a version of arm64 with 32 bit pointers... not the arm64 with 64 bit pointers. Looking at the specification of AppleWatch Series 9, Apple has confirmed that it has 64 bit CPU, but the instruction set is unknown. This wiki page about different AppleWatch CPUs is marked TBC for AppleWatch Series 9. From Xcode, I got to know that this unconfirmed arch is arm64_32. This completely breaks my code. Are there any 64-bit watches with 64-bit pointer sizes? What is Apple's future in this area? Do they plan to release AppleWatches that support 64-bit pointers or it's always going to be 32?
1
0
344
1w
Network Connection on watchOS App
I am developing a watchOS-only app, and whenever I attempt to make a network request, it always fails and throws the following error: Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." I noticed that when I turn off Wi-Fi and Bluetooth in the settings of the iPhone paired with the Apple Watch (thus disconnecting the Apple Watch from the iPhone), my app can successfully connect to the network. Additionally, when the app contains both an iOS app and a watchOS app, after granting network permissions on the iOS app, the watchOS app can access the network normally when connected to the iPhone. When opening some system apps on the Apple Watch (such as the "Workout" app), the app will display a network permission request similar to that on iOS, but this request does not automatically pop up when my watchOS app attempts to access the network. Is there a way to request network permissions in a watchOS-only app so that it can access the network while connected to the iPhone?
1
0
204
2w
Prevent Apple Watch Screen from Turning Off in Power Saving Mode During Specific App Use
Hello, I am developing an application for the Apple Watch that requires the screen to remain active even when the wrist is moved into a down position. The core functionality of my app involves providing continuous visual and auditory guidance, and it's critical that the screen stays on without going into power-saving mode while the app is in use. Specifically, I am looking for a way to: 1.Disable the screen's power-saving mode when the wrist is moved down. 2.Ensure the screen remains active as long as the app is in the foreground. I understand that certain power management features are built into watchOS for battery conservation, but I would need this behavior to be overridden only while the application is running (the app would not be in the foreground for extended periods of time). Is there an approved method or best practice within Apple's guidelines to achieve either of these functionalities? Thank you for your assistance.
1
0
177
2w
Preventing Apple Watch Screen from Turning Off in Wrist Down Position
Hello, I am developing an application for the Apple Watch that requires the screen to remain active even when the wrist is moved into a down position. The core functionality of my app involves providing continuous visual and auditory guidance, and it's critical that the screen stays on without going into power-saving mode while the app is in use. Specifically, I am looking for a way to: 1.Disable the screen's power-saving mode when the wrist is moved down. 2.Ensure the screen remains active as long as the app is in the foreground. I understand that certain power management features are built into watchOS for battery conservation, but I would need this behavior to be overridden only while the application is running (the app would not be in the foreground for extended periods of time). Is there an approved method or best practice within Apple's guidelines to achieve either of these functionalities? Thank you for your assistance.
1
0
210
2w
Non-tinted image in complications using WidgetKit
I have a watchOS app where a user can select a picture. I’d like the picture to be displayed in a complication. I’m using WidgetKit, and I found out that for some watch faces (rendering mode = accented), the image gets tinted. Instead of the picture, the user sees only a colored box. It appears that using the old framework, ClockKit, it was possible to display an image that gets slightly colored with the tint color on tinted watch faces. I believe this is to ensure backward compatibility of old complications. My question is: can I do the same using WidgetKit? I tried using the widgetAccentable() modifier, but it doesn’t work. Here's an example of what I mean. In the middle complication, instead of the pink square, I'd like to display the user picture.
5
1
284
2w
Trigger data transfer from watchOS when connectivity is restored
Hello, I have an iOS app and a companion watchOS app. Users record a workout on Apple Watch, the data for which is then transferred using both Watch Connectivity and Core Data + CloudKit (NSPersistentCloudKitContainer) to their iPhone, where it is processed and displayed. As users are recording the workout on their Apple Watch, when they finish and the transfer begins, their iPhone is often not reachable to immediately send the data using Watch Connectivity and they have no network connection (cellular or Wi-Fi). With Watch Connectivity I use transferFile from WCSession, which queues the file for transfer. With Core Data + Cloudkit I save the data and the export is queued. An undetermined amount of time may pass until the user returns to their iPhone or connects to Wi-Fi and most of the time neither of the transfer methods actually transfers the data until the user opens the watchOS app into the foreground, at which point the transfer happens immediately for both methods. I've tried a number of things already, without success, such as: Using sendMessage from WCSession to send an immediate message to the watchOS app when the iOS app returns to the foreground to try and wake the watchOS app up so it can complete the data transfer. On the watchOS app, after attempting to transfer the data, using downloadTask from URLSession to queue a background task to download something, in the hope that it would wake the watchOS app when network connectivity was restored and enable it to complete the data transfer. On the watchOS app, instead of saving the data using NSPersistentCloudKitContainer, using CKRecord and CKDatabase directly to save the data using userInitiated as the quality of service, in the hope that it would be exported once network connectivity was restored. Is there a way to trigger the watchOS app to transfer the data using Watch Connectivity or Core Data + CloudKit in the background when reachabillity or network connectivity is restored, even if the app may have been suspended by watchOS? Many Thanks, Alex
1
0
261
3w
AVSpeechUtterance not working on apple watch
import AVFoundation Button { let utterance = AVSpeechUtterance(string: "Hello world") utterance.voice = AVSpeechSynthesisVoice(language: "en-GB") utterance.rate = 1 let synthesizer = AVSpeechSynthesizer() synthesizer.speak(utterance) } label: { Text("hello") } i omitted some code but this is the core part. When i run this on apple watch se 2 simulator (watch os 10.5) nothing happens and gives the error Query for com.apple.MobileAsset.VoiceServicesVocalizerVoice failed: 2 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.CustomVoice failed: 2 Unable to list voice folder Query for com.apple.MobileAsset.VoiceServices.GryphonVoice failed: 2 Unable to list voice folder
1
0
191
Jun ’24
Typography on Apple Watch Live Activity
I'm not quite sure whether this post belongs in a Design forum or here, but with iOS 18 Developer Beta 1 and watchOS 11 Developer Beta 1, when a Live Activity is displayed on an Apple Watch, the system font used is SF Pro rather than SF Compact. I would expect that the design guidance would be to stick with SF Compact while on watchOS, and I would expect that the system font, when displayed on the Apple Watch using .supplementalActivityFamilies([.small]), would appear as SF Compact. To ensure that SF Compact appears on my Live Activity when viewed on Apple Watch, I can set a custom font for use with the small supplemental family, but this seems really clunky; is there any other guidance here?
0
0
269
Jun ’24
Possible to start a live activity on watchOS 11?
I'm excited to bring my Live Activity to Apple Watch via the .supplementalActivityFamilies([.small]) modifier. However, I'm also wondering whether it is possible for my watchOS app, separately, to initiate a Live Activity and receive updates for it via push notification. From my testing it seems like no, but the function call itself can be made, since ActivityKit is available on watchOS. Are there any other recommendations for how to go about initiating a Live Activity from a watchOS app? Would I have to communicate with a companion iOS app to start the Live Activity on the phone instead?
2
0
266
Jun ’24