ApplicationMusicPlayer is not available on watchOS but all other platforms. Is there a technical reason for that like battery life? Same goes for SystemMusicPlayer and MPMusicPlayerController. I already filed feedbacks for that.
Posts under watchOS tag
143 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi all,
I’m encountering a consistent issue with SwiftData on watchOS when using CloudKit sync. After enabling:
let config = ModelConfiguration(schema: schema, cloudKitDatabase: .automatic)
…the app terminates ~30–60 seconds into a WKExtendedRuntimeSession. This happens specifically when:
Always-On Display is OFF
The iPhone is disconnected or in Airplane Mode
The app is running in a WKExtendedRuntimeSession (e.g., used for meditation tracking)
The Xcode logs show a warning:
Background Task ("CoreData: CloudKit Setup"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination.
It appears CloudKit sync setup is being triggered automatically and flagged by the system as an unmanaged long-running task, leading to termination.
Workaround:
Switching to:
let config = ModelConfiguration(schema: schema, cloudKitDatabase: .none)
…prevents the issue entirely — no background task warning, no crash.
Feedback ID submitted: FB17685611
Just wanted to check if others have seen this behavior or found alternative solutions. It seems like something Apple may need to address in SwiftData’s CloudKit handling on watchOS.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
CloudKit
watchOS
Background Tasks
SwiftData
Based on Cooordinate with the companion app in this article by Apple
https://developer.apple.com/documentation/healthkit/running-workout-sessions
if a workout were to be started on the iPhone companion app but with no Watch available, given HKLiveWorkoutBuilder not available in iOS, does the iPhone app need to implement it's own workout tracking such as a timer for counting the elapsed time and location updates for distance and GPS tracking?
If so in an instance where a paired Apple Watch were to exist and the workout is continued in the Watch app should the iPhone companion app stop this custom workout tracking and revert to the mirrored workout from the Watch to ensure accurate and synchronised data between the apps?
How can I enable "Extended Runtime Sessions" for a companion watch app? Here https://developer.apple.com/documentation/watchkit/using-extended-runtime-sessions
in targets under 'Signing & Capabilities' I checked "Audio" and Session Type 'Mindfulness',
I created an ExtendedRuntimeManager.swift file. When running a simulation the error message says
"Extended Runtime Session ungültig: Reason=-1, Error=This application does not have appropriate permissions to schedule a session."
How does the app get the 'appropriate permissions'?
Topic:
Developer Tools & Services
SubTopic:
Swift Playground
Tags:
WatchKit
watchOS
Background Tasks
I have an iPhone 14 running iOS 16.1 and my series 5 watch running watchOS 9.1. I was able to turn on Developer Mode on the phone by going to Settings--> Privacy & Security --> Developer Mode. On the watch however (I'm doing this directly on the watch and not on the watch app on the phone) once I'm in Privacy & Security, there is no option to select Developer Mode. How do I get my watch in Developer Mode in order to get a successful build in xCode?
在watchOS11.5下,Apple watch无法加载天气。无论是否连接自己的iPhone均无法加载
I would like to get user's heart rate zones values in my watchOS app, is there any way to get it from HealthKit?
Furthermore, is it possible to display the Apple heart rate zones widget in my watchOS app?
This is a bit of a headscratcher. Xcode 16 fyi.
I've written a standalone watchos app (with a stub ios app).
Distributes and works perfectly over Testflight.
I've submitted for app store and it passed the checks an I've released it for sale.
Told my brother to use a promo code to download it and show me how it looks and report me any nuisances.
He tells me there's no app neither on phone (expected) nor in watch. And he checked both the Watch ios app list and the watch.
I've gone through various GPTs and they've all told me the basic troubleshooting. That his watch might not be supported (wrong, it's a watch 10 ultra with latest updates and my min supported versions are hilariously low).
They've suggested that I might not have the right keys for making it standalone set, also no. They suggested that skip_install shouldn't be set to no; also wrong I think they're thinking xcode 13 and below. The stub ios app has a dependency on watchos app and also has an embed directive. I also checked the archive and saw the watchos app embedded indeed.
Again, the app works perfectly fine when distributed over testflight. And AFAIK that's a release build which I know for a fact because I had a problem with not giving healthkit entitlements to release (that was another but minor headscratcher at the time, when it was working over direct xcode upload).
Minor detail, I've written, test(flight)ed the app in UK and in English, my brother is in Turkey.
Of course now I immediately pulled the app out of sale because I don't want people paying and getting nothing, that's gonna cause a lot of trouble.
So I need any help I can get to
How to debug this without exposing the app and myself: is it possible to limit the release?
Obviously: what could be going wrong?
How the hell did I even pass app review? Is this maybe isolated to my brother's watch?
I'm more than happy to share project files and/or info.plist files(end products of them, because my plists are generated from project file).
In Contact app on watchOS, there're some textfields. But I can not find which textfield could implement it. Any one has some idea?
I’d love to see Apple implement a Bionic Reading feature as a system-wide accessibility option. This type of reading aid highlights the first part of each word in bold to help guide the eyes and improve comprehension.
It’s been shown to be especially helpful for people with ADHD, dyslexia, and other neurodivergent needs. Having a toggle in Settings > Accessibility would be life-changing.
Ideally, it could be:
• Enabled system-wide, or per-app
• Allow customization of how much of the word is bolded
• Available in Safari, Messages, Books, News, etc.
I am working with a watchOS app in SwiftUI, and I am using the following code to dial a phone number from the watch:
var number = "123456789"
if let telURL = URL(string: "tel:\(number)") {
let wkExtension = WKExtension.shared()
wkExtension.openSystemURL(telURL)
}
The issue is that when I try to dial a number starting with a * (asterisk) or # (hash), it doesn't work. When dialing a regular number, it works fine.
Is there any way to get this to work?
What I am trying to build
Apple Watch app(written in SwiftUI, targeting watchOS 7 or higher, built with Xcode 14.1)
The Problem
Picker placed inside a ScrollView on an apple watch device does not work as expected
I want to find out how to get the Picker to work as expected, stated below.
Expected behavior
On an iOS simulator, a Picker inside a ScrollView works as expected.
If I try scroll interaction on the Picker area, the ScrollView part doesn’t get scrolled and only the Picker gets scrolled.
whereas on the watch simulator Example,
If I try to scroll the Picker by touching the Picker area, the whole ScrollView reacts and moves up and down. And I am not able to control the Picker properly.
The code I wrote is as follows:
ScrollView {
//..other view elements..
Picker(selection: $currentDay) {
ForEach(weekDays, id: \.self) {
Text($0)
}
} label: {
Text("")
}
.frame(width: 148,height: 50)
.pickerStyle(.wheel)
//..other view elements..
}//: ScrollView
Things I have tried
putting the Picker inside a VStack/ZStack/HStack
giving the Picker fixed frame values / giving other elements inside the ScrollView fixed frame values
I would like to know the distribution of watchOS by OS version.
Further research shows iOS version distribution, but there appears to be no mention of Watch OS.
I am currently developing an App and would like to decide which version of Watch OS to start supporting due to cost issues, and would like to use the market distribution to determine this.
Please help others or experts who want to do something like me!
Translated with DeepL.com (free version)
We are developing a mobile app focused on lone worker protection, which does not include any fitness tracking features.
We require the use of HKWorkoutSession solely to enable background execution of critical safety-related code.
Could you please confirm whether this use of HKWorkoutSession is permitted under App Store Review guidelines, given that our app does not offer fitness or workout-related functionality?
I am trying to track a user's real-time sleep state using heart rate data, but I have encountered several issues:
When using HKSampleQuery on the phone to fetch heart rate data, I can only retrieve data recorded before the app comes to the foreground or before it is terminated and restarted (see related issue: https://developer.apple.com/forums/thread/774953).
I attempted to get data on the Apple Watch and send updates to the phone via Watch Connectivity. However, if I use WKExtendedRuntimeSession, although I can obtain data on the watch, once the watch screen goes off, it can no longer transmit data via Watch Connectivity to the phone (since I cannot guarantee the app will remain in the foreground when lying in bed).
On the other hand, using HKWorkoutSession results in interference with the activity rings and causes the heart rate sensor to run too frequently, which I worry may affect the battery life of the watch.
Is there an elegant solution for tracking a user's heart rate data for sleep monitoring?
Dear Apple Developer Support,
I am reaching out for guidance on implementing continuous directional and location updates in a watchOS app designed as part of a mapping/navigation solution.
Current Scenario:
We send continuous location and direction updates from our iOS app to the watchOS companion app.
When viewing directions on the Apple Watch, the screen dims after a short period, and the live data stops updating consistently, even though the user is actively looking at the screen.
This negatively impacts the usability of real-time navigation on watchOS.
Our Objective:
Prevent screen dimming (or extend screen-on time) while the user is viewing navigation directions.
Ensure reliable, continuous data updates on the watch screen during active navigation sessions.
Request:
We would appreciate your guidance on:
The recommended method to keep the watchOS screen active while displaying real-time navigation data.
Proper use of APIs such as WKExtendedRuntimeSession, WorkoutSession, or any other mechanism suitable for this use case.
Any best practices or App Store review considerations for apps that require extended screen time and continuous updates.
How such use cases were traditionally handled on watchOS and what has or hasn’t worked.
We want to ensure we're implementing this in a battery-efficient, user-respectful, and Apple-compliant manner.
Thank you for your assistance and guidance.
** Facing issue for watch unreachable, I have tried for real device as well simulator**
if let controller = window?.rootViewController as? FlutterViewController {
let channel = FlutterMethodChannel(
name: "watchconnectivity",
binaryMessenger: controller.binaryMessenger)
channel.setMethodCallHandler({ [weak self] (call, result) in
switch call.method {
case "sendToWatch":
guard let watchSession = self?.session else {
print("❌ Watch session not initialized")
result(false)
return
}
guard watchSession.isPaired else {
print("❌ Watch not paired")
result(false)
return
}
guard watchSession.isReachable else {
print("❌")
print("isPaired: \(watchSession.isPaired)")
print("isWatchAppInstalled: \(watchSession.isWatchAppInstalled)")
print("isComplicationEnabled: \(watchSession.isComplicationEnabled)")
result(false)
return
}
guard let arguments = call.arguments as? [String: Any] else {
print("❌ Invalid arguments format")
result(false)
return
}
if watchSession.isWatchAppInstalled {
try? watchSession.updateApplicationContext(["forceLaunch": true])
}
print("📤 Sending message to Watch: \(arguments)")
watchSession.sendMessage(arguments,
replyHandler: { response in
print("✅ Message sent successfully")
result(true)
},
errorHandler: nil
)
default:
result(FlutterMethodNotImplemented)
}
})
}
When using my app's complications with either Siri Intents or App Intents after syncing .watchface files, the complications appear without names in the iOS Watch app's complication picker. This leads to complications showing as blank entries without previews in the native watch app selector.
I'm using WidgetKit to create Watch complications with both approaches: AppIntents and Siri Intents.
We've tried multiple approaches with our WidgetKit watch complications:
Switching between IntentConfiguration and StaticConfiguration
Using different naming conventions for kind strings
Ensuring display names are properly set
Testing across different watchOS versions
But the result is always the same: after syncing .watchface files, our complications appear unnamed in the Watch app's complication picker.
Is this a known limitation with .watchface syncing, a bug in the current implementation, or is there a specific requirement we're missing to maintain complication names during the sync process?
We have a watchOS app that provides many configurable widgets. Those widgets are configured and installed with help of AppIntent:
public struct RectComplAppIntent: AppIntent, WidgetConfigurationIntent, CustomIntentMigratedAppIntent {
@Parameter(title: "Style")
var style: String?
....
}
However when I print WidgetInfos with getCurrentConfigurations(), I sometimes got nil for configuration. At the same time widgets are not loaded. Exact steps:
User installs the pre-cofnigured .watchface.
Complications are not loaded since configuration is missing. I print getCurrentConfigurations() and get entries like this:
WidgetInfo:
- configuration: nil
- widgetConfigurationIntent: nil
- family: accessoryRectangular
- kind: Rectangle
Then user force-touches a face and opens editing mode. Returns to watch app, prints infos:
WidgetInfo:
- configuration: <INIntent: 0x780d290> {
style = vol1Logo;
}
- widgetConfigurationIntent: nil
- family: accessoryRectangular
- kind: Rectangle
– Suddenly intent appears with the correct style and complications start to show up.
How do you think, why it happens? Why after .watchface install all the WidgetInfo has nil intent (configuration)? What helps them to load later?
You can try this face yourself: https://cdn.watchfaces.co/watchfaces/glance-minimalist.watchface
Topic:
App & System Services
SubTopic:
Automation & Scripting
Tags:
WatchKit
watchOS
WidgetKit
App Intents
I have encountered a problem that the Apple Watch cannot automatically continue playing the music in my playlist even if I have press the cycle button. It stops every song. And I used Apple Music. All these are performed without iPhone. But after restarted the watch, it works fine. I use S10 GPS watch with watch os 11.3.1. I never restarted the watch after I renewed the system. And i believe the problem have existed for more than one year as i saw a post describe the same problem on social media.