watchOS is the operating system for Apple Watch.

watchOS Documentation

Posts under watchOS tag

416 Posts
Sort by:
Post not yet marked as solved
7 Replies
2.6k Views
In WatchOS 6 a presented .sheet could be dismissed by swiping down or tapping on the navigationBarTitle. In the WatchOS 7 beta, presented sheets are no longer dismissible by either method...forcing the addition of a button to dismiss. It appears as if .sheet is now acting as .fullScreenCover within WatchOS 7. Anyone else running into this? Wondering if this is now expected behavior on WatchOS or if it's a bug...
Posted
by Eboles.
Last updated
.
Post not yet marked as solved
4 Replies
1.1k Views
Does anyone know how to tie the new Watch Series 9 double tap feature to a button and also how to test double tap gesture in the simulator? Thanks.
Posted Last updated
.
Post not yet marked as solved
0 Replies
192 Views
I would like to create an app that allows iOS and watchOS apps to exchange data in both directions, but I can't find instructions on how to do this anywhere. I would like to know how to do this in detail. import SwiftUI import WatchConnectivity struct ContentView: View { @State private var receivedMessage: String = "No message received" @ObservedObject private var sessionDelegate = SessionDelegate() var body: some View { VStack { Text(receivedMessage) .padding() Button("Receive from iPhone") { sessionDelegate.sendMessageToiPhone() } } .onAppear { // WatchConnectivityセットアップ sessionDelegate.setupWatchConnectivity() } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } class SessionDelegate: NSObject, ObservableObject, WCSessionDelegate { @Published var receivedMessage: String = "No message received" func setupWatchConnectivity() { if WCSession.isSupported() { let session = WCSession.default if WCSession.isSupported() { let session = WCSession.default // デリゲートを設定 session.delegate = self // セッションのアクティベーション状態を確認し、非アクティブな場合にアクティベートする if session.activationState != .activated { session.activate() } // セッションのその他の設 if WCSession.default.activationState == .activated { // セッションがアクティブ // ここでセッションがアクティブな場合の処理を実行 print("アクティブ") } else { // セッションがアクティブでない // ここでセッションがアクティブでない場合の処理を実行 print("アクティブない") } } session.delegate = self if session.isReachable { session.sendMessage(["messageKey": "Initial message"], replyHandler: nil, errorHandler: { error in print("Error sending initial message to iPhone: \(error.localizedDescription)") }) } } } func sendMessageToiPhone() { if WCSession.default.isReachable { WCSession.default.sendMessage(["messageKey": "Request from Watch"], replyHandler: nil, errorHandler: { error in print("Error sending request to iPhone: \(error.localizedDescription)") }) } } // WCSessionDelegate メソッド func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { // セッションのアクティベーションが完了したときの処理 } func session(_ session: WCSession, didReceiveMessage message: [String : Any]) { if let receivedMessage = message["messageKey"] as? String { DispatchQueue.main.async { self.receivedMessage = receivedMessage } } } } I wrote the above code in contentView.swift in watchOS, but the session was not activated. I wonder if this is the cause.
Posted
by seiya7228.
Last updated
.
Post not yet marked as solved
0 Replies
514 Views
I'm experiencing an issue trying to install the 'mirroringworkoutssample' app from the official Apple documentation on my Apple Watch. When attempting a direct installation from the Apple Watch, I receive an error stating, "Cannot install this app due to an inability to verify its integrity." Has anyone else encountered this problem or can provide any solutions or insights? ** I have a 'Development' type certificate that allows for watchOS(it includes iOS, tvOS ..) development. ** also added WKCompanionAppBundleIdentifier com.example.apple-samplecode.MirroringWorkoutsSample7C76V3X7AB.watchkitapp
Posted
by hhajime.
Last updated
.
Post not yet marked as solved
0 Replies
384 Views
Related to this thread https://developer.apple.com/forums/thread/737819 I can confirm (again) that GPS performance on the watch Ultra (and likely all watches on watchOS 10) had been severely degraded. Here is a swim that I did with both an Apple Watch Series 4 on watchOS 9 (green track) and a watch Ultra on watch OS 10.1 (blue track). While the Series 4 provides relatively accurate data, the Watch Ultra provides very poor data with criss crossing paths and ridiculous data points. Apple did respond to my feedback with the usual request for sysdiagnose but this has not progressed. FB13192409
Posted
by visskiss.
Last updated
.
Post marked as solved
1 Replies
638 Views
I am able to create a UIImage from webP data using UIImage(data: data) on iOS and iPadOS. When I try to do this same thing on watchOS 10, it fails. Is there a workaround to displaying webp images on watch os if this isn't expected to work?
Posted
by msdrigg.
Last updated
.
Post not yet marked as solved
2 Replies
618 Views
I'm developing my app for WatchOS 10 with Xcode 15.0.1. I'm trying to make a complication with WidgetKit (SwiftUI) to make it easier the user to launch the app. I'm using a simple and small image 50x50px to test it first. But when I try to add to the Watch Face, it show a gray circle like there is nothing there. But when i'm editing the Watch Face it show the image :/, like the image bellow: And another problem is when is Accent mode, it fills the image with a gray color, as the image above shows it. I tryed to add monochrome png image with the alpha-channel, but even that didn't worked too. And my code is simpler has that: var body: some View { Image("Cat") } Someone is facing this same problem? Has any possible solution.
Posted
by targon.
Last updated
.
Post not yet marked as solved
1 Replies
317 Views
I recently bought an Iphone 15 Pro and own apple watch series 3. I just wanted to post about how throughly disappointed I am with the apple watch software. There has been numerous problems trying to synch my watch to the new phone. Error messages are so unintuitive. Finally I updated to watchOS 10. Still wasn't easy, but finally got it done. You guys make it so easy for everything, except the watch watchOS 10 is really doing weird stuff. I was supposed have many watch faces but can't scroll through them. The phone is supposed to unlock with my Iphone but it isn't. Every time I look at it it wants a passcode. I can't add my credit card to my wallet in the watch and error messages won't even tell me why. To name a few. Have you guys given up old the old watch series or what?
Posted
by ozzy2001.
Last updated
.
Post not yet marked as solved
0 Replies
456 Views
Hi, I am getting an error in the preview section for the watchOS application. But it works when I build it. I get the like following errors in Preview. How can I solve it? no such module 'QuartzCore' Compile RoundedCorners.swift (arm64): /Users/msy/Library/Developer/Xcode/DerivedData/TestApp-gkorwbacqzvxvgcmrpdkaxfxnnmu/SourcePackages/checkouts/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift:4:8: error: no such module 'QuartzCore' import QuartzCore ^ Compile Shape.swift (arm64): /Users/msy/Library/Developer/Xcode/DerivedData/TestApp-gkorwbacqzvxvgcmrpdkaxfxnnmu/SourcePackages/checkouts/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift:4:8: error: no such module 'QuartzCore' import QuartzCore ^ Compile LottieAnimationView.swift (arm64): /Users/msy/Library/Developer/Xcode/DerivedData/TestApp-gkorwbacqzvxvgcmrpdkaxfxnnmu/SourcePackages/checkouts/lottie-ios/Sources/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift:4:8: error: no such module 'QuartzCore' import QuartzCore ^ Copy FirebaseAnalyticsSwift.swiftmodule (arm64): error: /Users/msy/Library/Developer/Xcode/DerivedData/TestApp-gkorwbacqzvxvgcmrpdkaxfxnnmu/Build/Intermediates.noindex/Previews/TestApp Mobil Watch App/Intermediates.noindex/Firebase.build/Debug-watchsimulator/FirebaseAnalyticsSwift.build/Objects-normal/arm64/FirebaseAnalyticsSwift.swiftmodule: No such file or directory (in target 'FirebaseAnalyticsSwift' from project 'Firebase')
Posted
by themsy.
Last updated
.
Post not yet marked as solved
19 Replies
21k Views
I'm using Xcode 12 beta 3. When running my Apple Watch's target on WatchOS 7, I get this error: Warning: Error creating LLDB target at path '/Users/evan/Library/Developer/Xcode/DerivedData/audigo-cneguthkmmoulfgcprsazbryrlrl/Build/Products/Debug-watchsimulator/AudigoWatchApplication.app'- using an empty LLDB target which can cause slow memory reads from remote devices. I know this error use to be when running 32 bit frameworks on 64 bit devices, but I'm not doing that. Is this a bug? Or is there a setting I don't know of that needs to be updated?
Posted
by iEvanC.
Last updated
.
Post not yet marked as solved
1 Replies
229 Views
Xcode 15 can not download symbols for watchOS 6.3 (17U208). It shows "Failed - Failed with HTTP status 403: forbidden". Detail information are as followings. Failed with HTTP status 403: forbidden Domain: DataGatheringNSURLSessionDelegate Code: 1 User Info: { DVTErrorCreationDateKey = "2023-10-17 14:42:34 +0000"; } -- System Information macOS Version 14.0 (Build 23A344) Xcode 15.0 (22265) (Build 15A240d) Timestamp: 2023-10-17T22:42:34+08:00 code-block I clean ~/Library/Developer/Xcode/DerivedData, ~/Library/Developer/Xcode/watchOS DeviceSupport, and also also clean (com.apple.dt.Xcode) folders/files in ~/Library/Caches, but got same error. may I know where to download the symbols for watchOS 6.3 (17U208) ? LR
Posted
by LRLin.
Last updated
.
Post not yet marked as solved
1 Replies
321 Views
Can a WatchOS app with its companion IOS app share In-App Purchases and can this be verified with a Sandbox testing user? Apple's documents and several tutorials give very mixed answers. There are at least two other similar questions on this site with no answers in a year. Most questions cover either standalone watch in-app purchases, or sandbox testing IOS in-app purchases. None answer the full question about sharing purchases between the watch and phone. I have the app working on IOS and WatchOS but am stuck at the In-App testing to confirm whether this really works. The IOS app works for In-App purchases with StoreKit and Sandbox users. The WatchOS app works with Storekit if I run the watch target on my real watch, but seems to have its own transaction list separate from the IOS app. If I install the watch app from the iPhone running the IOS target, I get the error below. The watch doesn't let me login as the sandbox user. "Unable to purchase App. Sign in with your Apple ID from the Apple Watch app on your iPhone." Changing the Apple ID for the watch on the iPhone appears to require unpairing and repairing the watch which Apple's documentation suggests shouldn't be necessary. So 2 key questions: Can a Watch app share the in-app purchase transactions with its companion iPhone app or will the watch have its own separate transaction list? Can a Watch app test In-App Purchases with a Sandbox user? Thanks!
Posted
by jet.
Last updated
.
Post not yet marked as solved
6 Replies
1.1k Views
I created app on Xcode for watchOS and when I tried to deploy it I have "OS version lower than deployment target" but deployment target is WatchOS 9.0 (I have watchOS 10 installed)
Posted Last updated
.
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 Last updated
.
Post not yet marked as solved
0 Replies
315 Views
Using WatchOS 1.0 (21S67) the Blood Oxygen complication icon is missing from the watch (series 6) display. Is this a known 'bug' or have I stumbled across something new?
Posted
by lbdyck.
Last updated
.
Post not yet marked as solved
0 Replies
282 Views
Overview I could use some help understanding app versioning for standalone watchOS apps. I'll outline my scenario first, then list my questions. Scenario In Xcode 15, when creating a new standalone watch app called Foobar, Xcode automatically creates some targets for me: Foobar, Foobar Watch App, and two test targets. My goal is to set/increment the app version and build number. When I open the Foobar Watch App target in Xcode, I set the Version and Build number in the General tab to 1.2.3 and 45, respectively. However, when I archive the app, it doesn't use the versions I set: instead, using the default 1.0 (1). The same verison is set when uploading to TestFlight. The only way I have been able to set/increment the app version for an archive is to modify the Foobar target --> Build Settings --> Versioning. Questions I am wondering a few things: Why does Xcode pick the Foobar target version rather than the Foobar Watch App target for a standalone watch app? (I couldn't find documentation around this behavior) The Foobar target's General tab does not list the Identity section, which is normally where I'd expect to set that information. Why would I need to set this information in the Build Settings tab? Since Xcode picks the Foobar target for versioning, what does the watch target version do? Should I ever increment it for my standalone app? Are there any suggested ways to adjust the app version for a standalone watch app? - For example, can I use a variable to keep both app targets in sync?
Posted
by fraune.
Last updated
.
Post not yet marked as solved
0 Replies
385 Views
Hello! I'm currently working on a panic alarm app and am in the process of developing an extension for the Apple Watch. I'm trying to retrieve the location on watchOS, but I've encountered some issues. Could you provide an example or guide on how to successfully obtain the location? I suspect there might be a problem with the didFailWithError method not being recognized. Any assistance would be greatly appreciated. // Home2.swift // (watchOS) Watch App // // Created by Admin on 15.08.2023. // import SwiftUI import CoreLocation import CoreLocationUI class LocationManager: NSObject, ObservableObject, CLLocationManagerDelegate { let manager = CLLocationManager() @Published var location: CLLocationCoordinate2D? override init() { super.init() manager.delegate = self } func requestLocation() { manager.requestLocation() } func checkPermission() { print("authorization status:") switch manager.authorizationStatus { case .authorizedAlways: print("always") break case .authorizedWhenInUse: print("authorized when in use") break case .notDetermined: print("notdetermined") break case .denied: print("denied") break case .restricted: print("restricted") break default: print("none of the above") break } } func requestPermission() { checkPermission() manager.desiredAccuracy = kCLLocationAccuracyBest manager.requestWhenInUseAuthorization() } public func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { location = locations.first?.coordinate } public func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { // Error handling print("Error requesting location") } } struct Home2: View { @Binding var alarmStatus: String @StateObject var locationManager = LocationManager() @State var error: String = "" func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { // handle the error print("error ting location fra struct:" + error.message!) } func callForHelpSync() { let name = "EnBruger" /*do { try locationManager.requestPermission() print("her") let locVal = try locationManager.requestLocation() print("locVal: \(locVal)") } catch { print("locVal error: \(error)") } */ let userId = ReadlocalStorage(key: "userId") let lat: Double = 123 // TODO let long: Double = 1234 // TODO Task { let res = try await callForHelp(name: name, id: userId, lat: lat, long: long) print("callforhelp res: " + res as Any) if (res == "Sent") { //opdater binded value. alarmStatus = "Sent" } else { // vis error besked. error = "Error: \(res)" } } } var body: some View { VStack(){ Image("logo") .resizable() .aspectRatio(contentMode: .fit) Spacer() Button(action: { print("record clicked") WKInterfaceDevice.current().play(.click) }) { VStack() { Text("Aktiver Alarm") .multilineTextAlignment(.center) .padding(1.0) .font(.system(size: 22, weight: .bold)) Text("(Hold inde)") .multilineTextAlignment(.center) .padding(1.0) } } .padding(11.0) .background(/*@START_MENU_TOKEN@*//*@PLACEHOLDER=View@*/Color(hue: 1.0, saturation: 0.966, brightness: 0.824)/*@END_MENU_TOKEN@*/) .buttonStyle(.plain) .simultaneousGesture(LongPressGesture(minimumDuration: 2).onEnded({_ in callForHelpSync()})) Text(self.error).font(.footnote).foregroundColor(Color.red).fixedSize(horizontal: false, vertical: true) Spacer() Button(action: { print("test button 1 clicked") locationManager.requestPermission() }) { VStack() { Text("Test Knap 1") .multilineTextAlignment(.center) .padding(1.0) .font(.system(size: 22, weight: .bold)) } } .padding(6.0) .background(.blue) .buttonStyle(.plain) if let location = locationManager.location { Text("Your location: \(location.latitude), \(location.longitude)") } LocationButton { locationManager.requestLocation() } .frame(height: 44) .padding() Button(action: { print("test button 2 clicked") var lh = LocationHandler() lh.requestLocation() }) { VStack() { Text("Test Knap 2") .multilineTextAlignment(.center) .padding(1.0) .font(.system(size: 22, weight: .bold)) } } .padding(6.0) .background(.blue) .buttonStyle(.plain) } .background(/*@START_MENU_TOKEN@*//*@PLACEHOLDER=View@*/Color.white/*@END_MENU_TOKEN@*/) } } struct Home2_Previews: PreviewProvider { static var previews: some View { @State var alarmStatus = "none" Home2(alarmStatus: $alarmStatus) } }
Posted Last updated
.
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 Missing87.
Last updated
.
Post not yet marked as solved
1 Replies
297 Views
I would like to deploy a WatchOS app without the companion iOS app. Here's my situation: I have created a WatchOS app with a companion iOS app The watch app supports running without the companion app The watch app is fully functional, and in fact the iOS companion is not built yet Is it possible to submit the WatchOS app without the companion iOS app with the option to submit the iOS companion at a later date? I would like to avoid having to create a new watch only app because once I release the iOS companion app, the old watch app would be considered a different app. If it is possible, some guidance on how to achieve this submission would be appreciated.
Posted Last updated
.