watchOS is the operating system for Apple Watch.

Posts under watchOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

Migrating WidgetKit extensions from dual-target to single-target watch app
Is there a way to migrate WidgetKit extensions made using dual-target watchOS apps to single-target apps? When you create a widget extension with a dual-target app, the bundle identifier includes the extra extension domain (com.company.app.watchkitapp.watchkitextension.widgets). When Xcode 15 migrates a dual-target to single-target, it removes “.watchkitextension” from both the watchOS app bundle identifier and the widget extension bundle identifier. watchOS seems to handle migrating the main app just fine, but any complications created with the dual-target do not get migrated and are just blank until the user re-configures, which would be a huge bummer to have to ship. If I try to manually set the bundle identifier back to include “.watchkitextension”, the OS rejects the installation because of the extraneous dot after the parent app’s prefix.
0
0
584
Feb ’24
Apple watch crown doesnt regulate volume in Now Playing after update
Hello I have been using apple products for quite some time now and am also updating my phone with latest beta software updates for watch, airpods 2 etc. Recently, I have started facing an irritating issue - I am unable to control the volume via my apple watch crown for music playing on youtube music / spotify etc. Earlier while operating the watch crown, I could lower/increase the volume of the music/videos on the "Now Playing" screen on the watch. But with recent updates its not happening. Please advise. TIA! Software versions: iphone - ios 17.4 apple watch 8 - watchOS 10.4
4
2
1.4k
Apr ’24
Pedometer updates frequency
I am currently developing app that counts the Steps, and for that I am using the pedometer. I am not sure of how frequent pedometer provides updates, in my case it provides update around 3 second. There is nothing mentioned about frequency of Data in Official documentation of Apple or Any ways to set the Frequency. Application is in Both iOS and WatchOS plateform To achieve data i have tried following things: With startUpdates(from: Date) pedometer.startUpdates(from: Date()) { [weak self] pedometerData, error in guard let data = pedometerData, error == nil else { return } DispatchQueue.main.async { self?.stepCount = data.numberOfSteps.intValue } } With queryPedometerData() timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in self?.fetchPedometerData() } private func fetchPedometerData() { pedometer.queryPedometerData(from: Date().addingTimeInterval(-1), to: Date()) { [weak self] pedometerData, error in guard let data = pedometerData, error == nil else { return } DispatchQueue.main.async { self?.stepCount = data.numberOfSteps.intValue } } } I have done this both implementation but Not getting desired results. I want data every second, Could it be possible ? Any help or leads would really helpful Thank You :)
1
0
623
Feb ’24
Apple Watch Issue on Xcode
Hello, For several months now, my watch app will not automatically install when I install local builds from Xcode. If I download our app from the app store, the watch app automatically installs immediately after the phone app (and automatic app install is set to ON in my Apple Watch Settings). But if I install a build from Xcode, I have to manually install the watch app after installing the phone app. How do I get it to go back to the previous behavior where, after I install the phone app, the watch app just automatically installs? It used to do this automatically for me, but no longer does. I want to say this behavior started when I installed the Xcode beta late last year but the behavior has continued on the newest version of Xcode.
0
0
344
Feb ’24
Focus Modes on Watch
I have had issue with sleep focus on my watch 8 since late in the iOS 16/ WatchOS 9 betas. I opened a feedback in Oct 2023 when 10.1 betas. When sleep focus is on the watch shows it's active and did not alert but it still works like normal. It used to go dark and I could tap the screen to see the time and press the crown to exit from that mode to use it. I wish this would be fixed. I'm tried of having to use theater mode with I go do bed. The light of the watch is
1
0
587
Feb ’24
Usage of `NavigationLink` and `.navigationDestination` causing console error logs
I'm using NavigationLink(value:label:) and .navigationDestination(for:destination:) in my SwiftUI watchOS app. However navigating in the app causes the system to emit the following errors to the console: <NavigationHostingControllerCache>: MISS at depth 1 in free stack [NavigationHostingControllerCache_UIKit] <_TtGC7SwiftUI32NavigationStackHostingControllerVS_7AnyView_: 0x125015000> containment skipped because sourceNavigationController or destination were nil or sourceNavigationController was equal to destination [NavigationHostingControllerCache_UIKit] Eject called for index: depth 1 in free stack Library: SwiftUI, Subsystem: com.apple.SwiftUI , Category: Invalid Configuration The navigation itself does work fine. I'm wondering there's something I can do to fix it or if this is an internal issue of the SwiftUI framework and cannot be addressed by me? (i.e. I can ignore this)
1
1
1k
Apr ’24
handleBackgroundTasks not called on apple watch but only on simulator
I'm trying to execute a background task following the Developer Documentation. This is my code import SwiftUI @main struct MyAppTest_Watch_AppApp: App { @Environment(\.scenePhase) var scenePhase let bs = BackgroundSession() @SceneBuilder var body: some Scene { WindowGroup { ContentView() }.backgroundTask(.appRefresh("prova")) { context in print("bg task") await scheduleTask() } .onChange(of: scenePhase) { phase in switch phase { case .active: print("\(#function) REPORTS - App change of scenePhase to ACTIVE") case .inactive: print("\(#function) REPORTS - App change of scenePhase Inactive") case .background: print("\(#function) REPORTS - App change of scenePhase Background") WKApplication.shared() .scheduleBackgroundRefresh( withPreferredDate: Date.init(timeIntervalSinceNow: 5 * 60.0), userInfo: "prova" as NSSecureCoding & NSObjectProtocol, scheduledCompletion: schedule) default: print("\(#function) REPORTS - App change of scenePhase Default") } } } func scheduleTask() async { bs.testSession() await WKApplication.shared() .scheduleBackgroundRefresh( withPreferredDate: Date.init(timeIntervalSinceNow: 5 * 60.0), userInfo: "prova" as NSSecureCoding & NSObjectProtocol, scheduledCompletion: schedule) } func schedule(error: Error?) { if error != nil { // Handle the scheduling error. fatalError("*** An error occurred while scheduling the background refresh task. ***") } print("Scheduled!") } } On the simulator the background refresh occurs correctly according to the preferred date and executes the background task, on the real watch it does not. I also set the app as complication in my watch face. The device I'm testing the app on is an Apple Watch Serie 7 with watchOS 10.3. Any idea?
1
1
512
Feb ’24
WatchOS Simulator - Location Services Grayed Out
I'm trying to develop a watchOS app with location. I've got the proper privacy settings in the info.plist, similar code works on other devices. (also simulators). But on watchOS simulators everything is grayed out. Privacy & Location -> Location Services App shows up correctly, but everything is grayed out. I've tried: Different simulators (with/without paired iPhone) Different app configurations (Watch-Only app, Watch App with new companion) Toggling Supports Running Without iOS App Installation. It's always grayed out! This is with watchOS 10 simulators across any model, and Xcode 15.2 Any help would be appreciated.
0
0
408
Feb ’24
XCode Error WatchOS version doesn't match deployment target, watch fully updated
I am trying to build my watch app on my series 4 Apple watch currently running WatchOS 10.3 with a deployment target of 10.2 and Xcodes claims that my watch's OS version is too low. I have fully updated my watch to 10.3, tried to downgrade the deployment target to no avail. Xcode doesn't seem to be getting any data on what OS version my watch is running. It says watchOS () in the manage run destinations page. I imagine this is a problem with the connection between my watch and my mac but I cannot solve it. Any advice?
2
1
827
Oct ’24
Identifying Essential Apple Bundle ID for Apple Watch-iPhone Connectivity in MDM Environment
I am experiencing difficulties in fully integrating my Apple Watch with a supervised iPhone under MDM control. While I have successfully paired the watch with the iPhone, I am facing issues with some apps not syncing or appearing on the Apple Watch. This issue persists despite having allowed their bundle IDs in the MDM’s whitelist. Could anyone provide guidance on which specific Apple bundle ID is crucial for maintaining the connectivity and functionality between the iPhone and the Apple Watch? Understanding this would help in ensuring that the necessary bundle ID is whitelisted in the MDM settings, thus resolving the app visibility and functionality issues on the Apple Watch.
1
1
718
Jan ’24
`WCSession.isComplicationEnabled` is `false` when complication is in Smart Stack
⌚️Hello, I've noticed in watchOS 10 that when a complication is in the Smart Stack, the value of WCSession.isComplicationEnabled is false. I'm not sure if this is intentional or a bug. It seems trivial at first glance, but it actually affects the communication mechanism mentioned in Implementing Two-Way Communication Using Watch Connectivity. In the following two scenarios, if the user has only added the app's complication to the Smart Stack, then the watch app will not be able to communicate properly with the iOS app. Scenario 1 - WCSession.transferCurrentComplicationUserInfo() // update complications from the iOS app if WCSession.default.isComplicationEnabled { let userInfoTransfer = WCSession.default.transferCurrentComplicationUserInfo(userInfo) // ... } As described in Implementing Two-Way Communication Using Watch Connectivity, when the iOS app proactively updates the data of the watch app, since WCSession.isComplicationEnabled is false, WCSession will refuse to transfer any data. This causes the standalone complication in Smart Stack to not be updated. Scenario 2 - WKApplicationRefreshBackgroundTask When the watch app uses WKApplication.scheduleBackgroundRefresh() to periodically update data, as long as the user has added the app's complication to the watch face, the corresponding WKApplicationRefreshBackgroundTask can be executed periodically in the background to fetch data. However, if the user has only added complication to the Smart Stack, then the watch app will be completely purged, and the background task will not be executed at all. Although WCSession.isComplicationEnabled is not directly used in this scenario, its behavior appears to be the same, that is, the complication in the Smart Stack is not considered a complication by the system. Should I submit a bug report?
2
0
996
Feb ’24
watchOS 10.2 Bluetooth in the background often disconnects
My watch APP needs to keep Bluetooth connected with peripherals whether it is in the foreground or background, but the results of my test show that the connection in the background is very unstable, sometimes you can keep the Bluetooth on for a day, but sometimes it will be disconnected 50 times a day, and every time it is disconnected, I will immediately initiate a reconnection, it is certain that there is no problem with the peripheral Bluetooth, because I have another iOS device that has been stably connected to the peripheral, I want to know what causes this instability, and if there is any solution, if someone can provide relevant advice, I will be very grateful
1
0
708
Feb ’24
SwiftUi Picker in WatchOS throws Scrollview Error when using Digital Crown
The following WatchOs App example is very short, but already not functioning as it is expected, when using Digital Crown (full code): import SwiftUI struct ContentView: View { let array = ["One","Two","Three","Four"] @State var selection = "One" var body: some View { Picker("Array", selection: $selection) { ForEach(array, id: \.self) { Text($0) } } } } The following 2 errors are thrown, when using Digital Crown for scrolling: ScrollView contentOffset binding has been read; this will cause grossly inefficient view performance as the ScrollView's content will be updated whenever its contentOffset changes. Read the contentOffset binding in a view that is not parented between the creator of the binding and the ScrollView to avoid this. Error: Error Domain=NSOSStatusErrorDomain Code=-536870187 "(null)" Any help appreciated. Thanks a lot.
3
4
729
Jul ’24
How to make WatchOS app users aware that there's an iPhone Companion app too?
Hi everyone, When we launched our WatchOS app and the iPhone companion app, we had the option "app can run independently of companion iphone" enabled. The problem we have is that many of our users don't know that there is an iOS app because the app runs independently. We would like to change it so that, if the user has enabled the automatic download of both versions, in the next update the iOS version will be downloaded as well, so that the user will see it. However, we have read that if "app can run independently of companion iphone" is enabled, it cannot be reverted in future builds. Is this correct? Another possible solution that we think might work is to display a message on first boot to inform users that we also have an iOS app, the problem is that our users usually see the message when they don't have the phone at hand (because of the nature of the app) and I don't know if a trigger can be made to install the iPhone app from the watch (or at least open the App Store). Any suggestions or ideas?
0
0
400
Jan ’24
NavigationTitle placement changed in watchOS
Prior to (I think) watchOS 10, my navigation title was at the top of the screen, vertically aligned with the time, to its left. At some point (I think in watchOS 10) the navigation title became right-aligned and just below the clock. (I'm hiding the back button). I've tried many variations in my SwiftUI code, but haven't been able to restore the original placement of the navigation title. This messed up the placement of my main content, so I've had to remove the navigation title on many of my app screens. Does anyone know how to place the navigation title in the upper left as it used to be? This is just wasted space now.
2
0
1k
Jan ’24
Watch OS Sleep Focus
I have noticed since later 9.x betas that sleep focus no long switches the watch to just a clock. In the past, when sleep focus is turned on, my screen would go blank and if I tapped the screen the time would appear. if I held the crown in, it would "unlock" from time display only and allow me to use my watch. Since this has started I have posted in the feedback app starting in 10.1. Now I have to set my watch into Theater mode every night so that the screen is off and not lighting up the room. After each new beta release I update my feedback. Any idea if anyone has seen my feedback?
2
0
846
Jan ’24