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.
Posts under watchOS tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I'm curious, why DynamicOptionsProvider is available on watchOS? Is there any way to present options to the user? For example in Emoji Rangers project:
struct EmojiRangerSelection: AppIntent, WidgetConfigurationIntent {
static let intentClassName = "EmojiRangerSelectionIntent"
static var title: LocalizedStringResource = "Emoji Ranger Selection"
static var description = IntentDescription("Select Hero")
@Parameter(title: "Selected Hero", default: EmojiRanger.cake, optionsProvider: EmojiRangerOptionsProvider())
var hero: EmojiRanger?
struct EmojiRangerOptionsProvider: DynamicOptionsProvider {
func results() async throws -> [EmojiRanger] {
EmojiRanger.allHeros
}
}
func perform() async throws -> some IntentResult {
return .result()
}
}
On watchOS we usually use recommendations() to give the user predefined choice of configured widgets. Meanwhile in AppIntentProvider recommendations are empty:
struct AppIntentProvider: AppIntentTimelineProvider {
...
func recommendations() -> [AppIntentRecommendation<EmojiRangerSelection>] {
[]
}
}
Does it imply that there's a way to use DynamicOptionsProvider on watchOS somehow? BTW, WidgetConfiguration.promptsForUserConfiguration() is one of the methods that are not available on watchOS.
And also, the Emoji Ranger project doesn't show widgets (complications) on watchOS out of the box.
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
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?
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)
I have followed this video on implementing a custom view for the watchOS 11 Smart Stack Live Activities. However, the UI of my iOS app keeps showing up on the watchOS.
`struct widgetLiveActivity: Widget {
@Environment(.activityFamily) var activityFamily
var body: some WidgetConfiguration {
ActivityConfiguration(for: widgetAttributes.self) { context in
switch activityFamily {
case .small, _:
Text("WatchOS UI")
case .medium:
Text("iOS UI")
.activitySystemActionForegroundColor(Color.black)
} dynamicIsland: { context in ... }
.supplementalActivityFamilies([.small, .medium])
}
}`
I am able to fetch the location in foreground and background.
I need just confirmation that can we get location apps killed state.
If It's possible then how can I do that.
I am able to get location in for ground and back ground but
Now I need to get location when user killed app.
Topic:
App & System Services
SubTopic:
Maps & Location
Tags:
Watch Connectivity
watchOS
Core Location
I feel a bit dumb now.
I once succeeded to change the language of an app on Watch simulator. So it is possible.
And I'm not able to repeat (fool of me I did not took note of how I did it).
I just remember it was simply through some language settings selection, may be rebooting the Mac, but not by changing anything in code.
Does someone know how to do ?
Apple Watch automatically tracks sleep data and syncs it to the iPhone, making it available through HealthKit for historical analysis. However, there is no way to retrieve real-time data on whether a user has entered sleep, or whether they are in a specific sleep stage at any given moment.
Is it possible to provide an interface for real-time sleep status monitoring
From last week all crash for watchOS has been broken.
The latest version 15.22.1 missing all stack trace and showing weird as attached.
All the crashes for previous versions totally disappeared.
I've made the code in xcode for apple watch with 2 swift view (contentView.swift and interfaceController.swift).The swift for sound and haptic feedback is in InterfaceController.swift. But the the sound does not appear with haptic feedback in apple watch after complete the xcode.
the app is done but no sound appear with haptic feedback when rotate apple watch digital crown. when crown rotated but sound appear
code
import WatchKit
import AVFoundation
import WatchKit
class InterfaceController: WKInterfaceController {
// ... your UI elements
func playSelectionHapticAndSound() {
// Play a haptic feedback pattern
WKInterfaceDevice.current().play(.success)
// Load and play a selection sound effect
guard let soundURL = Bundle.main.url(forResource: "spin", withExtension: "wav") else { return }
do {
let player = try AVAudioPlayer(contentsOf: soundURL)
player.play()
} catch {
print("Error playing sound: \(error)")
}
}
}
I downloaded the iOS and iPadOS 18.4 beta and it worked. Instead on Apple Watch Series 6 it does not install. It says to connect to the Internet but I am connected. I have already tried to restart iPhone 12 pro and Apple Watch but nothing to do. I also did factory data Apple Watch but nothing changed. Apple support told me that they do not help you on betas. I also sent feedback on Apple feedback app. I do not know what to do anymore. Does anyone have the same problem as me? Can it be solved?
We have recently developed the iwatch app. We will package the APP + iwatch app and publish it in testfight for test download. However, we often find that after the mobile app is downloaded, the iwatch app is also on the iwatch System application inside display. Click install is always in the installation. It has not been installed. Especially when the phone we tested is paired with several watches. Or delete the mobile APP and download it again to recover. But some situations still cannot be recovered. May I ask why it is always installed? We have confirmed that there is no problem with the network, and the pairing connection between the watch and the mobile phone is normal. This problem has caused us a lot of trouble. I wonder if this will happen in the app store. Please give the official reply
Topic:
Developer Tools & Services
SubTopic:
Apple Developer Program
Tags:
WatchKit
watchOS
TestFlight
Hi,
I found a behavioural difference in the DatePicker between WatchOS and iOS when limiting the date and time range. In the code below I'm attempting to limit the date and time range so that dates and times in past can be chosen. In iOS the DatePicker hides the dates and times that are out of range but WatchOS only the DatePicker for the date does this. The time DatePicker allows all times. The output from DatePicker is limited to the valid range, so it appears that it's the DatePicker UI that doesn't match the iOS behaviour. Does anyone know if there's a way to DatePicker that chooses the time only show valid times like iOS?
import SwiftUI
struct HistoryPeriodView: View {
@State private var selectedDate = Date()
@State private var selectedTime = Date()
var body: some View {
VStack {
// Date Picker for selecting the date (Restricts to today or earlier)
DatePicker("Select Date", selection: $selectedDate, in: ...Date.now, displayedComponents: [.date])
.labelsHidden()
// Date Picker for selecting the time (Restricts to today or earlier)
DatePicker("Select Time", selection: $selectedTime, in: ...Date.now, displayedComponents: [.hourAndMinute])
.labelsHidden()
// Display selected Date & Time
Text("\(formattedDateTime)")
.font(.footnote)
.padding()
}
}
/// Formats the selected date and time for display
private var formattedDateTime: String {
let formatter = DateFormatter()
formatter.dateStyle = .medium
formatter.timeStyle = .short
return formatter.string(from: selectedTime)
}
}
#Preview {
HistoryPeriodView()
}
I am working on watch os project. I need to check network connectivity when user turn on and off the network.
I am using NWPathMonitor for check network availability. I am connected with wifi but it still showing unsatisfied not real device but it's working perfect on simulator.
I'm working on Apple Watch UI tests and have noticed different results between local and Xcode Cloud environments.
I tested all cases locally, and they worked fine. However, when running the tests on Xcode Cloud, some issues caused them to fail:
The test requires clicking a button to display the built-in keyboard, but on Xcode Cloud, the keyboard never appears, no matter how long I wait.
The app unexpectedly closes during testing, displaying the error message: "Failed to launch application {Your app} is not running."
These failures occurred on two different simulator destinations (Ultra 49mm 11.2 / Series 7 45mm 11.2) and can only be reproduced on specific simulators.
Has anyone encountered a similar issue?
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?
I just created watchOS app alone a few months ago but I wanted to make a complication extension for my Apple Watch face. Without the aid of existing iOS app
I have two standalone app written for watchos (standalone). One to authenticate and one for connectivity to real-world devices. The connectivity app uses the authentication app before every action, Im testing this with two xcode projects I have created and tried different things ended up with this error.
authapp://authenticate?callback=linkingapp://callback
-[SPApplicationDelegate extensionConnection:openSystemURL:]:2418: URL with scheme "authapp" not supported
how to get the url scheme working? Tested this in simulator and real device. info.plist and AppDelegate files are placed in both apps.