watchOS is the operating system for Apple Watch.

Posts under watchOS tag

200 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

How to Play Audio File on Apple Watch Physical Speaker
I am writing a watchOS app where I have some audio files that I want to play at various points. I am using AVAudioPlayer. It all works in the simulator and it also works if I have Air Pods connected to my watch via Bluetooth. However I get no sound if there isn't a paired set of earphones. In the case of no earphones I would like the sounds to play from the physical watch speaker. I can't seem to find any documentation on how to cause that to happen. Any hints or tips are appreciated.
0
0
574
Sep ’23
How to make workouts with mixed activity-types (not swimBikeRun)?
Hey team! I have a question that feels very obvious, but I cannot seem to find the answer in the documentation. Using HealthKit/WorkoutKit, how you can make workouts with different activity types? Say you do 10 minutes of traditionalStrengthTraining followed by 10 minutes of running (common for crossfit and similar high intensity workout styles)? From the docs, it looks like you can’t change the activity type on an HKWorkout and the new dividing workouts into activities concept seems to only be for swimBikeRun workouts. Do you simply make multiple consecutive HKWorkoutSession instances, e.g doing startActivity -> beginCollection -> endCollection multiple times? Any input is highly appreciated!
0
2
426
Sep ’23
watchOS only targets broken in Xcode 15 RC?
Got a little app I am trying to build before launch, I've never built a watch only app, and it requires iOS 17 so I'm a bit stuck. When creating a watch only target, it seems that the template is broken. According to this: https://developer.apple.com/documentation/watchos-apps/creating-independent-watchos-apps/ There should be a blank iOS app target, that contains the watch app. The problem is once I go to build and upload the app to test flight, I get a bundle that Xcode has no clue what to do with (Because it only contains the watchkit app, and no containing xcode app.) I'm guessing my only hope might be to create a watch only app targetted at iOS 9 with Xcode 14, then migrating to Xcode 15? I'm trying that now, but I guess I have another radar to file unless I'm missing something.
5
1
1.7k
Feb ’24
3rd party app action button support
in anticipation for the action button that will be coming on the iphone 15pro, am I able to build in functionality and support that takes advantage of the action button for my app in Xcode? I know there are the few 3rd party apps for watchOS that have built in support for the action button on the Apple Watch ultra but I wanted to get more information on this from other developers.
0
0
428
Sep ’23
WatchOS 10 handicaps Apple Watch
I've been using WatchOS 10 for a couple months now. Well, I've been frustrated with it more than "using" it. WatchOS 10 removes the ability to swipe to change watch faces. I've come to learn that not everyone uses the watch the same way that I do. What I do is configure different watch faces as their own "apps". I have a weather face, a productivity face, a couple fitness faces, and a location face. So I can easily flick a finger to access data points and dive deeper into apps with practically zero thought or effort. Because it's predictable, I can access a watch face as I'm raising my wrist in the middle of a workout. I never use the App List because all my apps are accessible on watch faces. It's the best thing about Apple Watch. The point of Apple Watch is to get information quickly without the cumbersomeness of a phone. Isn't is? WatchOS 10 practically makes Apple Watch more difficult to use than reaching for iPhone. I have tried to use Widgets but there is absolutely no comparison. One does not offer a fraction of the usability or ergonomics as the other. Widgets are cumbersome and time consuming. It's been suggested that I use Focus Modes to have different faces appear at different times. This is the exact opposite of what I want from my watch. I specifically and intently want to access data on the fly with the flick of a finger. That's how it has worked since WatchOS 3. Why change the best thing about Apple Watch? Without the ability to flick a finger to change screens, you now have to [tap, hold, swipe, tap] to change the screen. Imagine doing this on your iPhone to change home screens. I'm currently restricted by WatchOS 10 to use one watch face. I put it on when I go for a workout and then I take it off. Other than a workout tracker it is, without a bit of exaggeration, useless to me. My frustration is beyond words. How this has not been broadly reported on is well outside my ability to comprehend. Again, imagine altering the ability to swipe home screens on iPhone - would this not be broadly reported on? WatchOS 10 makes Apple Watch a wrist mounted brick. I deeply love my Apple Watch. I love leaving my home for the weekend and leaving my phone at home. I love being out and about and relying only on this one beautiful thing to give me all the data I need at the flick of a finger. It's the most magical device I have owned in my life. At least, it used to be prior to WatchOS 10 handicapping 90% of its functionality. I am heartbroken.
1
1
651
Sep ’23
Interactive widgets on Apple Watch
AFAIK new iOS 17 widgets APIs are not supported on watchOS, which is a shame because it limits what kind of apps we can do for Apple Watch. I can see this can be disabled for the Smart Stack but for the single .accessoryRectangular performance shouldn't be an issue. Upvote this thread if you would like interactive widgets on watchOS.
0
1
366
Sep ’23
os_log not showing in Xcode 15 Console (watchOS, watch Simulator)
Hi, I just realized that all logs from the watchOS 10 simulator are not showing in the Xcode 15 console. When I run the same code to log on the iOS simulator the output is showing as expected. Here's my sample code os_log("Test OSLog", type: .debug) os_log(.debug, "Test OSLog 2") if #available(watchOS 7.0, *) { Logger(subsystem: "Test", category: "Test").debug("Test Logger OSLog") } None of the log functions above leads to any output in the console window in Xcode. Did anyone find a solution for that? I did not find anything about it so far in any other posts. I'm still on the last Beta, but will update to RC soon.
2
0
1.3k
Oct ’23
watchOS 10: CloudKit CoreData Sync (NSPersistentCloudKitContainer) Requires Watch on Charger
I've encountered a significant sync issue with watchOS 10 RC on every device combination I've tested, running both iOS 17 and watchOS 10. I'm curious if others have noticed a similar problem. Context: Standalone watchOS app developed in SwiftUI with a companion iOS app. Both apps use NSPersistentCloudKitContainer for bi-directional CloudKit CoreData Sync between the iOS app and watch. Previously, this sync mechanism was near instant in the foreground and took max 1-2 minutes in the background NSPersistentCloudKitContainer has been reliable since the app was first developed in the watchOS 6/iOS 13 era. Issue: In watchOS 10 RC, sync can take hours--and doesn't even occur when the app is in the foreground. Sync only reliably happens when the watch is placed on the charger, seemingly only if the charge is over 50%. Once taken off the charger, the watch will continue push and receive CoreData changes briefly before becoming unresponsive to sync again. Additional Info: The problem persists even when recompiled with the latest Xcode RC. It's problem is consistent in both production and development CloudKit environments. The CloudKit log shows no watch activity upon CoreData object updates, until placed on the charger (with over 50% charge). The sync starts in the background while the watch is charging. The iOS app, however, reflects immediate activity in the CloudKit log after a CoreData change from the device and reacts promptly to pushes when they eventually occur from the watch. The NSPersistentCloudKitContainer code hasn't changed since it was implemented. Background modes for remote notifications are set correctly, and when sync finally happens, it's accurate. I'm stumped. Perhaps there's a new watchOS 10 setting affecting CloudKit sync QoS? Or could this be a known watchOS 10 RC bug?
12
6
1.7k
Nov ’23
Push Navigation changes in WatchOS10
I have a WatchOS app that uses Push Navigation. I statrted to make a change this morning (Xcode 15.0, watchOS10), and discovered that the look of Push Navigation has changed dramatically. Instead of a back arrow "<" and title in the upper left corner, there is now a larger "<" in a dim circle, and the title is right-justified under the clock, with some background transparency. See attached image for a "old vs. new" comparison. In several cases, this isn't a problem, but I have some scenes in my app that require just about every bit of real estate of the screen, and now the UI loses a significant amount of room at the top. Does anyone know if there's a way to force the old behavior? If not, I may need to do some significant jiggering of my user interface!
2
1
707
Nov ’23
Has WKExtendedRuntimeSession changed the way timers work in watchOS 10?
I have a stand-alone watchOS app that starts a WKExtendedRuntimeSession and a 1-second repeating timer when a button is pressed. No CPU-intensive stuff happens during this extended (background) time. On watchOS 9, this worked perfectly until I stopped it again (or after the hour I get out of a Mindfulness Session Type has passed, and the extended runtime session expires). The screen could go dark, and the timer would keep running. On watchOS 10, I get about 50 seconds when the screen goes dark, and then the timer just stops. No delegate methods are called (i.e. no "extendedRuntimeSession...willExpire()" or "...didInvalidateWith()" is called), though. Also, the scenePhase does not change at this point, it remains at inactive. The execution just stops. When I tap the watch to turn the screen back on, the timer resumes as if nothing happened. Does anybody know what's going on here? Has something changed in WKExtendedRuntimeSessions in watchOS 10, or is it a bug? I tried removing the timer and changing it to a recursive DispatchAsync.main.asyncAfter block, but it yielded the same result.
1
0
514
Sep ’23
How do you test StoreKit subscription purchases on Apple Watch?
Using a modified version of the following example var body: some View { NavigationSplitView { BackyardList(isSubscribed: isSubscribed, backyardLimit: passStatus.backyardLimit, onOfferSelection: showSubscriptionStore) .navigationTitle("Backyard Birds") .navigationDestination(for: Backyard.ID.self) { backyardID in if let backyard = backyards.first(where: { $0.id == backyardID }) { BackyardTabView(backyard: backyard) } } } detail: { ContentUnavailableView("Select a Backyard", systemImage: "bird", description: Text("Pick something from the list.")) } .sheet(isPresented: $showingSubscriptionStore) { SubscriptionStoreView(groupID: groupID) } .onInAppPurchaseCompletion { _, purchaseResult in guard case .success(let verificationResult) = purchaseResult, case .success(_) = verificationResult else { return } showingSubscriptionStore = false } } (from Apple's sample code demonstrating in-app purchases), I'm unable to complete a sandbox purchase on Apple Watch. I get the error in the UI Unable to Purchase App Sign in with your Apple ID from the Apple Watch app on your iPhone and printing purchaseResult outputs failure(StoreKit.StoreKitError.unknown). An Apple ID is signed into Settings on iOS, as well as the Apple Watch app. This occurs whether or not a separate sandbox Apple ID is signed into Settings under App Store. The subscription options UI appears as expected before attempting to purchase one.
0
0
532
Sep ’23
watchOS 10 update has ruined GPS on Ultra during open water swimming.
Hi, I'm the developer of Open Water Swim, and I have had multiple reports and have also confirmed with my own testing that the WatchOS 10 update has seriously degraded GPS data during open water swimming, both with the native Workout app and with Open Water Swim. The data provided by CoreLocation is no longer accurate or trustworthy. I will post several pictures showing before and after update swims: Here's the raw data (mapped) of a swim done with watchOS 9 on the Ultra. Same swim today: From another pair of users: These two went TOGETHER, one with watchOS 9 and one with watchOS 10. You can probably guess which is which. Watch OS 9 swim: SAME SWIM WITH A PARTNER ON WATCHOS 10 (beta here) And another, again, two people swimming together, one watchOS 9 and one watchOS 10. watchOS 9 Same swim, same time, watchOS 10 I have filed two feedback assistant reports with APPLE. One when it was still a beta issue: FB12587468. This one has zero response from apple. And now a second one filed with watchOS 10 release: FB13192409 Apple devs, I know you're here and listening, so please let's get this fixed ASAP. Thanks
2
1
946
Sep ’23
How to support foregroundColor (deprecated) and foregroundStyle in watchOS 9/10?
In my Watch app on watchOS 9 I was using .foregroundColor(myColour) to colour the text in a widgetLabel on a corner complication like this: let myColour: Color = functionThatReturnsAColorObjectConstructedLike Color.init(...) // green .widgetLabel { Text(myText) .foregroundColor(myColour) } It worked fine; the widget label was green. Now, in watchOS 10, I see that foregroundColor() is being deprecated in favour of foregroundStyle(), and I can use .foregroundStyle(.green), and - importantly - foregroundStyle() is only available on watchOS 10 and newer. myColour is calculated depending on some other info, so I can't just write .green, and when I use .foregroundStyle(myColour) the widget label comes out as white every time, even if I set myColour = .green. I think I have to use some sort of extension to pick the right combination, something like: extension View { func foregroundType(colour: Colour, style: any ShapeStyle) -> some THING? { if #available(watchOS 10.0, *) { return foregroundStyle(style) } else { return foregroundColor(colour) } } } // Usage let myStyle: any ShapeStyle = SOMETHING? ... .widgetLabel { Text(myText) .foregroundType(colour: myColour, style: myStyle) It doesn't work. I just can't figure out what should be returned, nor how to return it. Any ideas?
2
2
1.6k
3w
CLLocationManager with watchOS10 not sending anything to didUpdateLocations:
My watch app records workouts including health (with HKWorkoutSession) and location data.The watch app is on the App Store and runs without any problems since long time. I updated my own Watch Ultra to watchOS10 and my app does not properly work anymore. Everything works with the exception that the app does not receive any CLLocationManager data on the physical device. On the simulator it works perfectly. I tried several devices in the simulator and they all work. Also I de-coupled the watch from the phone, deleted the watch completely and re-installed it. My app's target is watchOS9, I tried it with watchOS10 and the problems are the same CLLocationManager has correct and valid permissions CLLocationManager is setup like this: locationManager = CLLocationManager() locationManager.delegate = self locationManager.allowsBackgroundLocationUpdates = true locationManager.activityType = .fitness locationManager.desiredAccuracy = kCLLocationAccuracyBest locationManager.distanceFilter = kCLDistanceFilterNone locationManager.startUpdatingLocation() CLLocationManager's delegate is listening to: func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) func locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) The CLLocationManager is starting and correctly giving feedback on 'didFailWithError' and on 'didChangeAuthorization'. Nothing that tells me that something is wrong and points to a problem. No data is sent to didUpdateLocations. The function is never ever called. Of course I'm outside with my watch and the GPS signal is strong and I wait long enough. My app is adding the recorded workout to Apple Fitness app (my app uses HKWorkoutSession) and even though my own app does not receive any CLLocationManager data, the workout that it sent to Apple Fitness includes all the CLLocationManager data. It really seems like being a problem with my app only. Does someone have an idea or knows of a same problem? Thomas
1
0
706
Sep ’23
Is it possible to remove the watch target of a released app and release an update without the watch app?
Hello. I found out that it is possible to remove the watch target from an iOS project to remove the support for the watch. What I was not able to find out is what impact this has on the publishing side. Will App Store Connect accept the upload of the new version or will it throw an error because the watch target is missing? If this is possible, should I expect problems with the review?
0
0
208
Sep ’23