watchOS is the operating system for Apple Watch.

watchOS Documentation

Posts under watchOS tag

416 Posts
Sort by:
Post not yet marked as solved
1 Replies
628 Views
I am running the watch on watchOS 9 and trying to enable "developer mode" (which requires a restart). However, upon restart, developer mode remains disabled. I tried several times, but developer mode just won't turn on. any thought how to solve?
Posted
by
Post not yet marked as solved
27 Replies
13k Views
I'm continuously getting this message in Xcode and I can't run my app on my Apple Watch. I'm running the latest versions of everything. I have tried to restart my Mac, my iPhone, my Watch. I tried to unpair and pair it back. Nothing is working. I also updated Xcode to 14.0.1 RC and that didn't help. How can I get this working? We're unable to do any work on our Watch App without this working. Thanks
Posted
by
Post not yet marked as solved
4 Replies
1.8k Views
I like to keep my apps watch face complication up to date when the user completes an activity but calling WidgetCenter.shared.reloadAllTimelines() is not working as well as the old complication update now I want to go back to complications. I used to call CLKComplicationServer.sharedInstance().reloadTimeline(for: <#T##CLKComplication#>) which would update my complication instantly. The simulator seams to up date widgets immediately but now my app has been released pn the App Store it is not updating. Any one else experiencing this.
Posted
by
Post not yet marked as solved
9 Replies
2.6k Views
Hi I just got my Apple Watch Ultra and I am trying to access depth and water temperature with the new CMWaterSubmersion api and I am getting CMErrorDomain 110 (which is CMErrorNotEntitled). Not sure exactly what this means, I am guessing I there is an entitlement missing? https://developer.apple.com/documentation/coremotion/cmwatersubmersionmeasurement
Posted
by
Post not yet marked as solved
1 Replies
587 Views
I recently submitted app using the option of reset ratings. App went live but ratings did not reset , is this a bug Apple is working on?
Posted
by
Post not yet marked as solved
2 Replies
3.4k Views
Hello everyone, I purchased a level lock touch earlier this year. It’s a lock I have on my front door and side door. One of the ways it can be unlocked is with an NFC card. You can tap the card and the lock opens. Since the apple devices have NFC, and so does the level lock touch, I figured there must be a way to just unlock the door by tapping my devices. I asked apple about this and they said they couldn’t help me. I reached out to Level and they said apple will be selling a new level lock + which on October 21st which does exactly what I’m wanting to do….for $329! my question is, if both devices have NFC- couldn’t there just be some type of software update to allow this feature to happen. Instead- someone has to purchase a whole new lock!? I know it’s all about money but it just doesn’t make sense to me. does anyone maybe know of a third party app that can read the level lock nfc card and allow me to open the lock by tapping my device? In the mean time I’ll keep looking for another way besides shelling out another 329 for a lock. Smh
Posted
by
Post not yet marked as solved
3 Replies
1.6k Views
I'm trying to migrate from Complication with CLKComplication to WidgetKit. I have implemented the required methods in https://developer.apple.com/documentation/widgetkit/converting-a-clockkit-app, but the migration is not working. There is no evidence that the method for migration is also called. It was the same with Xcode 14.0.1 and Xcode 14.1RC. class ComplicationController: NSObject, CLKComplicationDataSource, CLKComplicationWidgetMigrator { ...     @available(watchOS 9.0, *)     var widgetMigrator: CLKComplicationWidgetMigrator {         return self     }     @available(watchOS 9.0, *)     func widgetConfiguration(from complicationDescriptor: CLKComplicationDescriptor) async -> CLKComplicationWidgetMigrationConfiguration? {         return CLKComplicationStaticWidgetMigrationConfiguration(kind: "MyWidget", extensionBundleIdentifier: "com.example.myapp.mywatchkitapp.mywidget")     } } What's wrong? Has anyone been able to migrate?
Posted
by
Post not yet marked as solved
27 Replies
7.8k Views
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?
Posted
by
Post not yet marked as solved
8 Replies
1.6k Views
This happens with new project recently created. Existing app is working fine. I can run and debug my watch app from Xcode on my Apple Watch device, but app gets deleted after stop running from Xcode. App is just gone for some reason. Tested with Xcode 14.0.1 and Xcode 14.1 RC 2, and Apple Watch on watchOS 9.1. This was happening before watchOS 9.1. Is anyone see this happening and know solution?
Posted
by
Post not yet marked as solved
1 Replies
1k Views
I have an iOS/wOS app that launched last year. Now I want to add complications to it and use the new way of doing complications with WidgetKit. I have everything in place up to the point where I'm supposed to read the data from Health to display it, where it fails with Missing com.apple.developer.healthkit entitlement. This is the new extension I've added It's embedded in the WatchKit app NOT in the WatchKit Extension and I've added permission to read health data directly in the info.plist for the extension I pull the data from the TimelineProvider protocol method func getTimeline(in context: Context, completion: @escaping (Timeline<Entry>) -> ()) { let currentDate = Date() var entries: [WorkoutEntry] = [] ComplicationHealthManager.loadPreviousWorkouts { workout in let workoutEntry = WorkoutEntry(date: currentDate, workout: workout) entries.append(workoutEntry) let timeline = Timeline(entries: entries, policy: .after(currentDate)) completion(timeline) } } with the help of a small manager class class ComplicationHealthManager: ObservableObject { static func loadPreviousWorkouts(completion: @escaping (HKWorkout?) -> Void) { let healthStore: HKHealthStore = HKHealthStore() let workoutPredicate = HKQuery.predicateForWorkouts(with: .traditionalStrengthTraining) let compound = NSCompoundPredicate(andPredicateWithSubpredicates: [workoutPredicate]) let sortDescriptor = NSSortDescriptor(key: HKSampleSortIdentifierEndDate, ascending: false) let query = HKSampleQuery( sampleType: .workoutType(), predicate: compound, limit: 0, sortDescriptors: [sortDescriptor]) { (query, samples, error) in guard let samples = samples as? [HKWorkout], error == nil else { completion(nil) return } let calendar = Calendar.current let todaysSamples = samples.filter{ calendar.isDateInToday($0.endDate) }.last completion(todaysSamples) } healthStore.execute(query) } } The issue is in the closure for the health query where it returns with no workouts but an error stating Error Domain=com.apple.healthkit Code=4 "Missing com.apple.developer.healthkit entitlement." UserInfo={NSLocalizedDescription=Missing com.apple.developer.healthkit entitlement.} The problem here is I don't understand where and how to add an entitlement for the complication extension or the WatchKit app, as none of them have the option for health. I have a health entitlements set for the iPhone app and the WatchKit Extension.
Posted
by
Post not yet marked as solved
1 Replies
1.3k Views
I was following the below documentation for getting the Raw Gyroscope events. Somehow I am unable to make the below code working. if motion.isGyroAvailable { self.motion.gyroUpdateInterval = 1.0 / 60.0 self.motion.startGyroUpdates() // Configure a timer to fetch the accelerometer data. self.acceTimer = Timer(fire: Date(), interval: (1.0/60.0), repeats: true, block: { (timer) in // Get the gyro data. if let data = self.motion.gyroData { let x = data.rotationRate.x let y = data.rotationRate.y let z = data.rotationRate.z // Use the gyroscope data in your app. print("rotationX: \(x) , rotationY: \(y) , rotationZ: \(z)") } }) // Add the timer to the current run loop. RunLoop.current.add(self.acceTimer!, forMode: .default) } https://developer.apple.com/documentation/coremotion/getting_raw_gyroscope_events The isGyroAvailable always returns false Dev environment - Xcode 14.1, Apple Watch 8, WatchOS 9.1
Posted
by
Post not yet marked as solved
5 Replies
1.1k Views
Hi, I'm trying to locate the app store receipt in the apple watch in order to send it to my server to verify. I'm using the Original API for In-App Purchase because my app needs to support watchOS 7.0 My watchOS app is an independent app still pending to release to App Store. I'm testing using TestFlight, and I have one-month subscription in state "Ready to submit". The process of purchase finishes fine in the apple watch -sandbox success screen- but then, when I invoke SKReceiptRefreshRequest in order to ask Apple for the Bundle.main.appStoreReceiptURL to download in my device and send it to my server to verify, I always get the following error: <SKReceiptRefreshRequest: 0x16df52c0>: Finished refreshing receipt with error: Error Domain=ASDErrorDomain Code=507 "Invalid container for application: file:///private/var/containers/Bundle/Application/8BAF3B0E-45FC-465A-92E2-CFB1507A33E1/IvooxAppleWatch%20WatchKit%20App.app/PlugIns/IvooxAppleWatch%20WatchKit%20Extension.appex/" UserInfo={NSDebugDescription=Invalid container for application: file:///private/var/containers/Bundle/Application/8BAF3B0E-45FC-465A-92E2-CFB1507A33E1/MyApp%20WatchKit%20App.app/PlugIns/MyApp%20WatchKit%20Extension.appex/} And the receipt isn't there, in the path Bundle.main.appStoreReceiptURL. I tried looking for both receipt and sandboxReceipt. No luck. I even tried to list the contents of StoreKit but that directory does not exist on my watch according FileManager. I cannot get rid of the error above. Any help is highly appreciated. Thanks in advance.
Posted
by
Post not yet marked as solved
4 Replies
1.8k Views
I’m trying to create complications für the Watch using the new WidgetKit. While the complications do show up fine in the preview in Xcode and also in the Simulator, on a real device the complications do never shown anything. The complications are listed and can be selected in the watch face settings, but the preview is always black, and when added to a watch face, it shows nothing. I can tap on this „nothing“ and the App launches, so the complication is actually there. But it doesn’t show anything. This is also true for the Watch App on the iPhone, which lets me add the complications to a watch face, but it also shows nothing. But in the Simulator everything works as expected, the complications show their content just fine. So it looks like the code is fine. The iPhone runs the iOS 16.1, and the watch runs watchOS 9.1 (right now the latest public releases) Does anyone having the same issue and maybe a solution or a hint, what exactly I should check?
Posted
by
Post not yet marked as solved
2 Replies
1.3k Views
I'm trying to implement App Intents and App Shortcuts on watchOS. To do that, I included my AppIntent and my AppShortcutsProvider to the WatchKit extension target. The intent has one variable parameter: @Parameter(title: "Category", description: "Category", requestValueDialog: "What are you searching for?") var category: String However, when I speak the invocation phrase to Siri on the watch, Siri immediately responds there's something wrong. My perform() method isn't even called and there's nothing in the log. Is this supposed to work? How could I debug this? Is there a sample app showing App Intents on watchOS?
Posted
by
Post not yet marked as solved
1 Replies
1k Views
I added a Watch app to an existing iOS app using XCode 14.1. (single target template) When using WCSession delegate, so I can message between the apps, I always get isWatchAppInstalled = false. If Icreate the same scenario using XCode 13.x, I have no issues. Has anyone been able to add a watch app to an existing iOS app, create a WCSession object and have isWatchAppInstalled = true? print("Session:activationDidCompleteWith --> IsPaired[(String(describing: session.isPaired))] isWatchAppInstalled[(String(describing: session.isWatchAppInstalled))] isReachable[(String(describing: session.isReachable))]"); displays: Session:activationDidCompleteWith --> IsPaired[true] isWatchAppInstalled[false] isReachable[false]
Posted
by
Post not yet marked as solved
3 Replies
1.7k Views
As you can see in this open source repository, I am trying to test out the code provided when you download the Apple sample "Building a custom peer-to-peer protocol" I bought a new Apple TV in order to work with this. But I have had so many issues! First I realized that the functionality is only available from WatchOS 9 or greater, but my Apple Watch 3 won't update to WatchOS 9. Then I got another watch, but it had to be updated. Then had to turn on the Developer Mode and then I was having a issues where it kept saying that the phone & watch needed to be unlocked, over and over -.-. Then finally after building the app on the watch from my computer using Xcode (latest), the problem I am now having is that the app on the AppleTV only detects the phones in the network, and not this new Apple Watch. -,- So now I just have a bunch of new technology that is doing nothing I have read through so many tutorials but can't tell why it doesn't detect it. It seems like the DDDevicePickerViewController is not returning the watch. The other question I have is, can I use the Network Framework to connect to multiple devices at the same time? (Think Texas hold em poker on Apple TV but with cards on each player's phone)
Posted
by
Post not yet marked as solved
2 Replies
2.3k Views
Hi there, I have a problem archiving a Flutter App containing an Apple WatchOS Target. The WatchOS target is built with the new logic, containing only one app and no Watchkit extension. When I build the app on my iPhone/Simulator everything is working just fine and they can communicate without any problems. The error occurs when I'm trying to upload my built archive to App Store Connect for Testflight testing purposes. It fails with the error Asset validation failed: "Missing Info.plist value. A value for the key “WKApplication“, or “WKWatchKitApp“ if your project has a WatchKit App Extension target, is required in “Runner.app/Watch/MyWatchOSApp Watch App.app“ bundle. For details, see: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project". I tried to fix it by adding a info.plist to the WatchOS target, which isn't created initially. By doing so I can not build the Runner App anymore because it fails with "A WatchKit app within this app is not a valid bundle.". Can anyone help me fix it please? Thank you! Greetings
Posted
by
Post not yet marked as solved
1 Replies
810 Views
Is it possible to trigger SPO2 measurements programmatically more frequently than once per 15 minutes? For example, once per 1 minute? It is possible with manual measurements in "Blood Oxygen" app, but it would be helpful to find the way to do that programmatically.
Posted
by
Post not yet marked as solved
1 Replies
1.2k Views
I'm trying to implement WidgetKit on my watchOS 9.1 app. When I'm editing the watch face, I see the widget looking as I would expect it to be. However, when I then go to the Home Screen, the data is redacted. What's causing that to happen? I don't do anything luminance or security related in the widget's view: struct AccessoryRectangularView: View {   let tide: Tide      var body: some View {     HStack {       VStack(alignment: .leading) {         Text("Height: \(tide.heightString())")           .font(.headline)           .widgetAccentable()         Text("As of: \(tide.date, style: .time)")           .font(.caption)       }              tide.image()     }   } }
Posted
by
Post not yet marked as solved
2 Replies
1.2k Views
Hello, I try to add a couple of Complications to my App. Most of the Complications needs to be Configurable, so I use an IntentConfiguration for them. I use this recommendations function to create my complications.     func recommendations() -> [IntentRecommendation<ConfigurationIntent>] {         var recommendations = [IntentRecommendation<ConfigurationIntent>]()        for vehicle in vehicleStatusList {             let intent = ConfigurationIntent() intent.vehicleItem = VehicleItem(identifier: vehicle.id, display: vehicle.name)             recommendations.append(IntentRecommendation(intent:  intent, description: vehicle.name))         }         return recommendations     } But with this I get the result from the screenshot... How can I change this to get a better User Experience? When I click one item in the List, I get a correct Complication. But it would be nice to have a change to name them correctly... The first in the List is a StaticConfiguration...
Posted
by