watchOS is the operating system for Apple Watch.

watchOS Documentation

Posts under watchOS tag

342 Posts
Sort by:
Post not yet marked as solved
33 Replies
21k Views
Dear Community / Apple, I would like to ask in the name of many Smart Home Community, There is any developing / There is any future plan about make Apple Watches able to read NFC Tags / Stickers? Many of us would like to use Apple Watch to use Home Automations with NFC Stickers, but we have to use our iPhone instead of the Watch, what would be the most logical way to use these things. We does not really understand why this was not added by default, and why we cannot find any official information about this? Please provide us some answer, at least we should know should we still wait for this feature or this is not gonna be enabled by Apple?! Thank you very much, Gery
Posted Last updated
.
Post not yet marked as solved
1 Replies
152 Views
Hello apple, hello creative developers, I will present an idea for AirDrop, which I hope will be liked! It's about having a bridge between transfers thanks to apple devices, which could strengthen the brand's ecosystem. In this suggestion during a transfer between two devices, I see the Apple Watch as a bridge that can view and then accept or refuse a file transfer between two iPhones. And we could generalize this "bridge" system to other devices... For example, when transferring a file from an apple device to another apple device (excluding iPhone), the iPhone could make this bridge between both devices (always allowing you to view and then accept or refuse the transfer). The examples of different bridges are numerous but I think you have understood! For the good realization of this project I hope one day that AirDrop will be more open and will allow retouching by developers :) But also that AirDrop will be able to detect sleeping devices, or at least that "bridge" devices that have come out of sleep are detectable, and allow the transfer to the sleeping device... I know it's a lot of assumptions and suggestions but I find this system quite relevant. I'm waiting for your feedback, what do you think? Will we one day be able to see such a system arrive in the Apple ecosystem? Thanks for reading, have a nice day, Mikael. PS: sorry I am using google trad for this post, my knowledge in english is pretty low 😅
Posted Last updated
.
Post not yet marked as solved
1 Replies
159 Views
I'm using watchOS 9 beta 2 and I'm not getting the new running metrics in my workout app. Using HKLiveWorkoutDataSource attached to a HKWorkoutBuilder ActivityType is running Tried enabling the collection of the new metrics According to Jorge M in the WWDC labs: "Yes, the new running metrics are also available for 3rd party applications. If you are using an HKLiveWorkoutDataSource attached to a HKWorkoutBuilder in your application, the new metrics would be collected by default." The Health app does not show any Related Samples for these types. Am I doing something wrong or are they not available yet to 3rd party workouts? I do see them for the Apple Workout app.
Posted
by jbailey.
Last updated
.
Post not yet marked as solved
1 Replies
122 Views
I'm making app for both iPhone and watch. And when I validating receipt on iPhone, it is successfull and possible to get all the previous transitions. But on the watch when I validating the receipt it returns a status code 21002. I use the same code. What should I do to prevent this issue ?
Posted Last updated
.
Post not yet marked as solved
0 Replies
91 Views
I have an 'Independent watchOS' project created in Xcode. To this project, I have linked few static libraries (as xcframework). The architecture is set to 'x86_64'. I am able to successfully build this project and deploy it on the watch simulator. The code inside the static libraries also get called and things work fine. However, when I try to build the same project from command-line, it doesnt work and fails with multiple errors. Command used : xcodebuild -target "TWWatchOSTemplateProj WatchKit App" -configuration Debug -destination 'platform=watchOS Simulator,arch=x86_64' build Error : /Users/abhishek.mohata/TW_Test_Projects/TWKshetrapalNative/TWLibs/TWBrahmaClient.xcframework:1:1: error: While building for watchOS, no library for this platform was found in '/Users/abhishek.mohata/TW_Test_Projects/TWKshetrapalNative/TWLibs/TWBrahmaClient.xcframework'. (in target 'TWWatchOSTemplateProj WatchKit Extension' from project 'TWWatchOSTemplateProj') warning: None of the architectures in ARCHS (x86_64) are valid. Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least one value from VALID_ARCHS (arm64_32, armv7k). (in target 'TWWatchOSTemplateProj WatchKit Extension' from project 'TWWatchOSTemplateProj') error: No profiles for 'com.tally.TWWatchOSTemplateProj.watchkitapp' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.tally.TWWatchOSTemplateProj.watchkitapp'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'TWWatchOSTemplateProj WatchKit App' from project 'TWWatchOSTemplateProj') warning: ONLY_ACTIVE_ARCH=YES requested with multiple ARCHS and no active architecture could be computed; building for all applicable architectures (in target 'TWWatchOSTemplateProj WatchKit App' from project 'TWWatchOSTemplateProj') ** BUILD FAILED ** When built from command-line, why is the error related to architecture comes while the same works from xcode ? Also, is there anything to be added to the command for signing as the details are already present in the xcodeproj.
Posted Last updated
.
Post not yet marked as solved
2 Replies
687 Views
When I run watch app I got crash because I am using CMFallDetectionManager but I have added key in .plist Fall Detection Usage Description , when I run the watch app I got this error Fall Detection entitlement is required for this API so I read the documentation it says To apply for the entitlement, see Fall Detection Entitlement Request but when I click on the clink Fall Detection Entitlement Request I got this message The Apple ID you signed in with does not have permission to view this page.
Posted
by dsn.geu.
Last updated
.
Post not yet marked as solved
0 Replies
73 Views
Need some basics help getting crash data and itunes crash data to watch OS team. watch attached to any of 3 phones XR, 13, SEII -=- iTunes fails to complete sync usually hangs on "Step 2 of 3 Preparing to sync" for hours or days. un pair syncs fine 1a. sometime by using phone |watch app | general | diagnostic logs | down load local copy of all logs | iTunes may sync. 1.c Canceling sync never cancels - Have to force quit iTunes restart PC go to 1 again an failure Is there anyway to force the phone to collect/submit the watch os data in advance of iTunes sync.
Posted
by Tmm66.
Last updated
.
Post not yet marked as solved
1 Replies
135 Views
let stagePredicate = HKCategoryValueSleepAnalysis.predicateForSamples(.equalTo,value: .asleepREM)         let queryPredicate = HKSamplePredicate.sample(type: HKCategoryType(.sleepAnalysis), predicate: stagePredicate)         let sleepQuery = HKSampleQueryDescriptor(predicates: [queryPredicate], sortDescriptors: [])         do{             let sleepSample = try await sleepQuery.result(for: store)                          print("sleep sample ")             print(sleepSample) with health app on iOS , it says I did rem sleep for 59 minutes. but all sum of sleep sample time is not 59 but 3.7hours. time is also not accurate. sleepSample log is as below what may be the problem?
Posted
by kotran.
Last updated
.
Post not yet marked as solved
0 Replies
136 Views
My guess the issue is that the iOS app is com.example.MyApp and the bundle id for the watchOS app is com.example.MyApp.watchkitapp, so WeatherKit works perfectly on the iOS app after registering bundleID and request WeatherKit service. But it does not work on watchOS, giving me 401 errors. I assume it is because of the bundleID, but maybe something else. 2022-06-25 08:58:58.999485-0500 JumpLog Watch App[72341:1201484] [WK_Geocode] failed to reverse geocode. location=CLLocationCoordinate2D(latitude: 37.62471885, longitude: -122.42857813), error=reverseGeocodeFailed(Error Domain=NMDeviceConnectionErrorDomain Code=2 "Timed out." UserInfo={NSDescription=Timed out.}) 2022-06-25 08:58:59.019561-0500 JumpLog Watch App[72341:1201484] [Database] Attempting to invalidate an assertion that is no longer valid 2022-06-25 08:58:59.724802-0500 JumpLog Watch App[72341:1198856] [WeatherService] Encountered an error when fetching weather data subset; location=<+37.62471885,-122.42857813> +/- 5.00m (speed 34.21 mps / course 332.23) @ 6/25/22, 8:56:58 AM Central Daylight Time, error=invalidJWTResponse(Optional(<NSHTTPURLResponse: 0x60000394bf20> { URL: https://weather-data.apple.com/v2/token } { Status Code: 401, Headers { Connection = ( close ); "Content-Length" = ( 0 ); Date = ( "Sat, 25 Jun 2022 13:58:59 GMT" ); Server = ( Apple ); "Strict-Transport-Security" = ( "max-age=31536000; includeSubdomains" ); "X-Apple-Origin" = ( "8961098f-b238-3714-ba44-5b569c861456" ); "X-Cache" = ( "TCP_MISS from a23-33-47-144.deploy.akamaitechnologies.com (AkamaiGHost/10.8.2-41841244) (-)" ); "X-Content-Type-Options" = ( nosniff ); "X-Frame-Options" = ( SAMEORIGIN ); "X-REQUEST-ID" = ( "2076edab-2346-4a50-83c1-e62f46aab9eb" ); "X-XSS-Protection" = ( "1; mode=block" ); } }))
Posted Last updated
.
Post not yet marked as solved
1 Replies
108 Views
everytime i try to connect the apple watch s2 with WatchOS 6.3 with the iPhone Xr with iOS 15.5 the watch app tell me to update de iOS, how do i fix it?
Posted
by Mrvazbr95.
Last updated
.
Post marked as solved
2 Replies
186 Views
WWDC 2022 announced CallKit for WatchOS 9, but didn't explain how to use it. I was able to convert SpeakerBox sample from iOS to WatchOS. The CallKit itself seems works fine, but I stuck with networking issue. I cannot understand how to stream RTP audio. I have background audio enabled. If I configure audio session for CallKit with .playAndRecord category, I cannot specify .longFormAudio policy, as it's not applicable for this category. Without .longFormAudio low lever API is denied ("Path was denied by NECP policy").
Posted
by Artem_XZ.
Last updated
.
Post not yet marked as solved
2 Replies
138 Views
Has anybody managed to get .preferredColorScheme(.dark) working in a watch app in the watchOS 9 beta simulator? It works fine for me on iOS, but doesn't seem to have an effect on the watch. I'm on the first Xcode 14 beta.
Posted
by breville.
Last updated
.
Post not yet marked as solved
0 Replies
102 Views
From wtchos 8+ After that, the support screen is always displayed, but I don't know how to set up spritekit Always On. I hope there are relevant documents or examples. Thank you
Posted
by baby9000.
Last updated
.
Post not yet marked as solved
1 Replies
176 Views
reference : https://wjwickham.com/posts/refreshing-data-in-the-background-on-watchOS/ on init function , which mean, for every 5 min it should come to handle function in Extension Delegate.swift but it won't come to handle any anything else that I should do ? let preferredDate = Date().addingTimeInterval(60 * 5)// 5min later preferredDate, userInfo: nil) { (error) in WKExtension.shared().scheduleBackgroundRefresh(withPreferredDate: preferredDate, userInfo: nil) { (error: Error?) in guard error == nil else { print("Couldn't schedule background refresh.") return } print("Scheduled next background update task for: \(preferredDate)") } ExtensionDelegate.swift // // ExtensionDelegate.swift // Coffee Tracker WatchKit Extension // // Created by pedro jung on 2022/06/15. // Copyright © 2022 Apple. All rights reserved. // import Foundation import WatchKit class ExtensionDelegate: NSObject,ObservableObject, WKExtensionDelegate { func applicationDidFinishLaunching() { print("applicationDidFinishLaunching") // Perform any final initialization of your application. } func applicationDidBecomeActive() { print("applicationDidBecomeActive") // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } func applicationWillResignActive() { print("applicationWillResignActive") // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, etc. } func handle(_ backgroundTasks: Set&lt;WKRefreshBackgroundTask&gt;) { for task in backgroundTasks { switch task { case let backgroundTask as WKApplicationRefreshBackgroundTask: BackgroundService.shared.updateContent() backgroundTask.setTaskCompletedWithSnapshot(false) case let urlSessionTask as WKURLSessionRefreshBackgroundTask: BackgroundService.shared.handleDownload(urlSessionTask) default: task.setTaskCompletedWithSnapshot(false) } } } } I also check other way after checking reply of below link https://developer.apple.com/forums/thread/661892 but with no luck ... import SwiftUI import WatchKit @main struct CoffeeTrackerApp: App { @Environment(\.scenePhase) var scenePhase @WKExtensionDelegateAdaptor(ExtensionDelegate.self) var delegate @SceneBuilder var body: some Scene { WindowGroup { NavigationView { ContentView() } .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: let preferredDate = Date().addingTimeInterval(60 * 1)// One hour later // delegate.shared().scheduleBackgroundRefresh(withPreferredDate: preferredDate, userInfo: nil) { (error) in WKExtension.shared().scheduleBackgroundRefresh(withPreferredDate: preferredDate, userInfo: nil) { (error: Error?) in guard error == nil else { print("Couldn't schedule background refresh.") return } print("Scheduled next background update task for: \(preferredDate)") } delegate.test() default: print("\(#function) REPORTS - App change of scenePhase Default") } } } } }
Posted
by kotran.
Last updated
.
Post not yet marked as solved
0 Replies
111 Views
Xcode 14 beta 1 is yelling at me that CKNotification initializer should return a non-optional value. This happens only AFTER letting Xcode upgrade my project settings. The change that the upgrade project settings made was it merged my WatchKit and WatchKit extension targets into a single watch app target. After doing so, this code will not compile which I know to be good. // This line fails to compile with ' if let notification = CKNotification(fromRemoteNotificationDictionary: userInfo) { // Do something } Compile error: "Initializer for conditional binding must have Optional type, not 'CKNotification'" Feedback w/ sysdiagnose: FB10282805 - watchOS / CloudKit: CKNotification doesn't return optional, xcode build failing after updating project settings for Xcode 14 I could not reproduce this in a sample application. I tried making a standalone watch app with Xcode 13, upgrading the project file with Xcode 14 beta, and then creating a CKNotification object--but that worked fine. :/
Posted
by edorphy.
Last updated
.
Post not yet marked as solved
1 Replies
171 Views
Hello all! I have a Series 2 Apple Watch, and I'm having trouble running an update due to the fact that I get an error that says I'm not connected to the Internet. This is perplexing because I am connected to the internet on my iPhone. I haven't used my watch in a long time, and I don't know what is happening. I did a factory reset and it says it won't continue setup until I get the watch updated. Maybe it's because my iPhone is running IOS 15.5? I'm not sure. I reset both the watch and the phone but that didn't seem to work. I even tried changing the Wi-Fi network, and that didn't do anything either. Has anyone else had this issue? Thanks in advance!
Posted
by KBArts.
Last updated
.
Post not yet marked as solved
1 Replies
360 Views
Is it possible to downgrade the watchOS 9 beta? I found that an Apple Store visit can archive it but that's not possible for everyone.
Posted
by Deny.
Last updated
.
Post not yet marked as solved
0 Replies
131 Views
Are there commands for testing watch complications in XCUITest? So far I see that we can press the home button and rotate the Digital Crown in test As of Xcode Version 14.0 beta (14A5228q) the XCUITest record function doesn't work. Can't find anything in debugDescription to helpout either with reaching complications https://developer.apple.com/documentation/xctest/xcuidevice/button
Posted
by romy-is.
Last updated
.