watchOS is the operating system for Apple Watch.

watchOS Documentation

Posts under watchOS tag

484 results found
Sort by:
Post marked as solved
59k Views

[Apple Watch] Unable to Check for Update - Not connected to the internet error

Hi. I am pairing my Apple Watch Series 5 to my iPhone running ios 14. The pairing is successful but unable to proceed with the set up because an update is needed to be downloaded first. I updated the os for watch but I keep on getting “Unable to Check for Update - Checking for a software update failed because you are not connected to the internet”. I am definitely connected to the internet. Watch was reset to factory defaults and I am now pairing it as a new device but it fails due to the issue mentioned above.
Asked Last updated
.
Post not yet marked as solved
152k Views

Watch OS 5 update says not connected to Internet

I went to check for a Apple Watch OS and it says not connected to Internet. I am definetly connected via Internet on my iPhone 6 so I am lost at what to try. I have done the following1. Switched the iPhone and Watch into Airplane mode then back on2. Rebooted the watch and the iPhoneNot sure what to do next, any ideas would be welcome.
Asked
by joelw135.
Last updated
.
Post not yet marked as solved
14 Views

iOS app to an independent watchOS app (swiftUI)

How to add iOS app to an independent watchOS app (swiftUI app lifecycle)
Asked
by newt10.
Last updated
.
Post not yet marked as solved
22 Views

Accelerometer and gyroscope axes for Apple Watch

Hi, The documentation for accessing raw accelerometer events makes clear what the axes orientations are on an iPhone, but I cannot seem to find anything that explicitly states the orientations for Apple Watch. Is this information documented? Many thanks.
Asked
by sdevi.
Last updated
.
Post marked as solved
56 Views

Scroll in UI Tests on Apple Watch not working

I've been able to get UI Tests working on Apple Watch with Xcode 12.5 / Watch OS 7.0 on the simulator (with the help of some Apple engineers during a WWDC session). I can automatically press buttons and check for text on the screen, which is great. What I cannot do however, is scroll the screen up or down, which severely limits the ability to reach some buttons and thus the testing. I'm using XCUIApplication().swipeUp() to try to scroll. What's also not working is the record/playback of UI tests on Apple Watch. Has anyone been able to achieve a scroll up/down in UI tests on Apple Watch, and if so, how?
Asked
by Ronvtw.
Last updated
.
Post not yet marked as solved
31 Views

MPMediaItemPropertyArtwork not getting set in Apple Watch

I have an audio streaming app which plays live streams using AVPlayer. Everything works as intended and in order to support a good user experience, I set the MPNowPlayingInfoCenter's nowPlayingInfo property with the title, artist and artwork - here is a small snippet: func updateNowPlayingView(withSong song: Song) { let songImage = song.getSongImageAsUIImage() let artwork = MPMediaItemArtwork(boundsSize: songImage.size) { size -> UIImage in let resizedImage = songImage.imageWith(newSize: size) return resizedImage } MPNowPlayingInfoCenter.default().nowPlayingInfo = [MPMediaItemPropertyTitle: song.getSongName(), MPMediaItemPropertyArtist: song.getSongArtist(), MPNowPlayingInfoPropertyIsLiveStream: true, MPMediaItemPropertyArtwork: artwork] } This function is called in the CarPlay Scene delegate and it is called in my AVPlayer sub class for my iOS app and I successfully see the correct meta data in the Command Centre, Lock Screen and Car Play. For some reason, the artwork does not get displayed in my Apple Watch's Now Playing App Seems like it is setting the default / placeholder music icon image. However, when I play the Apple Music App, I can see they set the Now Playing artwork properly So what am I doing wrong that my artwork does not get set for Apple Watch ? Am I setting it from the wrong place in my code base ? Or do I need to keep an Apple Watch app / Extension / Scene like CarPlay to send NowPlaying data to the Apple Watch Now Playing app ? Thanks for your time
Asked
by Sha8.
Last updated
.
Post not yet marked as solved
31 Views

Can watchOS stable version work with iOS beta version?

like I upgraded my iPhone to iOS 15 beta, could I still use my watch on watchOS 7, or I would need to upgrade watchOS to the latest beta version?
Asked
by Shvier.
Last updated
.
Post marked as solved
78k Views

Device locked and can not unlock with iPhone

i took the Watch off the charger and it said Device Locked, put Apple Watch on and unlock with iPhone, which is normal.No matter how many times I unlock the iPhone, the Watch won't unlock. I tried unlocking the phone with Touch ID and manually typing the password, I rebooted the Watch and iPhoneis there any way to erase the Watch or do anything else to get past this ?
Asked Last updated
.
Post not yet marked as solved
4.8k Views

Can I pair watchOS 6.0 with iOS 14?

My iPhone 11 Pro is running the iOS 14 beta and I went to pair my Apple Watch series 4, which is running watchOS 6.0 apparently (I hadn’t used it in a while). Watch app tells me I need to update my watch before I can finish pairing, but then it says it can’t check for an update due to lack of internet connection (which is false). Not really sure what to do here... my watch is kind of bricked right now... seems like the only solution would be to downgrade iOS back to 13 or pair the watch with another iPhone and then update watchOS, reset it, and try pairing with my iPhone again... though I don’t have another phone. I have an iPad though...
Asked
by beng0ld.
Last updated
.
Post not yet marked as solved
5.1k Views

Apple Watch NFC Tags

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
Asked Last updated
.
Post not yet marked as solved
45 Views

How to access workouts from HealthKit on WatchOS?

Hi there, I'm trying to read workouts from a WatchOS App. Unfortunately, the returned workouts are always empty. This is how it's currently implemented: func fetchWorkouts(limit: WorkoutLimit) async throws -> [HKWorkout] { let activityType = PulseConfiguration.activityType // 1. Get all workouts with the configured activity type. let walkingPredictate = HKQuery.predicateForWorkouts(with: activityType) // 2. Get all workouts that only came from this app. let sourcePredicate = HKQuery.predicateForObjects(from: .default()) // 3. Combine the predicates into a single predicate. let compound = NSCompoundPredicate(andPredicateWithSubpredicates: [walkingPredictate, sourcePredicate]) let sortDescriptor = NSSortDescriptor(key: HKSampleSortIdentifierEndDate, ascending: false) typealias WorkoutsContinuation = CheckedContinuation<[HKWorkout], Error> return try await withCheckedThrowingContinuation { (continuation: WorkoutsContinuation) in let query = HKSampleQuery( sampleType: .workoutType(), predicate: compound, limit: limit.count, sortDescriptors: [sortDescriptor] ) { _, samples, error in guard let samples = samples as? [HKWorkout], error == nil else { if let error = error { continuation.resume(throwing: error) } return } continuation.resume(returning: samples) } healthStore.execute(query) } } I noticed that the HKSource returned by .default (WatchOS) is different than the source associated to the saved workouts (Which contains the bundle identifier from the iPhone App). Is there some other way to access the workouts from the WatchOS App? Thanks in advance. Josh.
Asked Last updated
.
Post not yet marked as solved
178 Views

SwiftUI on Apple Watch - no animation on change of Tabs

Hi everyone, I have an issue on Apple Watch where I am using SwiftUI. When I try to change a tab by pressing a button, the animation of the TabView is not there when one of the tabs contain a List or a ScrollView. It just kind of jumps to the new tab without any animation. When the tabs do not contain a list it works fine. It seems to be a bug with SwiftUI, but maybe I am doing something wrong. The code is as follows: struct MainView: View {     @State var selectedTab  = 0     var body: some View {         VStack {             Button("Change") {                 withAnimation {                     selectedTab = (selectedTab + 1) % 2                 }             }             TabView(selection: $selectedTab) {                 List {                &#9;&#9;Text("Hello")                 }.tag(0)                 Text("Hello").tag(1)             }         }     } } Does anyone have a clue of how I can achieve an animation with tabs containing lists?
Asked
by bjartesj.
Last updated
.
Post not yet marked as solved
1.2k Views

WatchConnectivity not working on device

I have implemented a very simple iOS + WatchOS app project, where I test how one can communicate with the other. I will paste the code below, but the idea is really simple. Each app has one single screen with a button and a label. Tapping the button will send a message to the counterpart indicating the timestamp when the message was generated. If I run the app on the simulators, everything works fine: messages are sent and received correctly on both the iPhone and the Watch. (You can find a reference gif on imgur.com/ + o1ZQTLp). The problem occurs when I try to run the same apps on my physical devices. Session is activated successfully but messages aren't sent. If I debug the code, I even see the WCSession.isReachable value set to true. When debugging the WatchKit app, I see errorHandler is called on the func sendMessage(), and the error states: WatchConnectivity session on paired device is not reachable. However, the errorHandler isn't called from the iPhone app. Details of my devices: iOS version: 14.0.1 WatchOS version: 7.0.1 I tested this same code before installing the 7.0.1 WatchOS and it worked without any problems, so I wonder if the update introduced some error on the WatchConnectivity framework. Code on the iPhone app: import UIKit import WatchConnectivity class ViewController: UIViewController { &#9;&#9;@IBOutlet weak var messageLabel: UILabel! &#9;&#9;fileprivate var wcSession: WCSession! &#9;&#9;override func viewDidLoad() { &#9;&#9;&#9;&#9;super.viewDidLoad() &#9;&#9;&#9;&#9;wcSession = WCSession.default &#9;&#9;&#9;&#9;wcSession.delegate = self &#9;&#9;&#9;&#9;wcSession.activate() &#9;&#9;} &#9;&#9;@IBAction func sendMessageAction(_ sender: Any) { &#9;&#9;&#9;&#9;let message = [ &#9;&#9;&#9;&#9;&#9;&#9;"content": "Message sent from iPhone on \(Date())." &#9;&#9;&#9;&#9;] &#9;&#9;&#9;&#9;wcSession.sendMessage(message, replyHandler: nil, errorHandler: { error in &#9;&#9;&#9;&#9;&#9;&#9;print("Error when sending message: \(error.localizedDescription)") &#9;&#9;&#9;&#9;}) &#9;&#9;} } extension ViewController: WCSessionDelegate { &#9;&#9;func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { &#9;&#9;&#9;&#9;switch activationState { &#9;&#9;&#9;&#9;case .activated: &#9;&#9;&#9;&#9;&#9;&#9;print("WCSession activated successfully") &#9;&#9;&#9;&#9;case .inactive: &#9;&#9;&#9;&#9;&#9;&#9;print("Unable to activate the WCSession. Error: \(error?.localizedDescription ?? "--")") &#9;&#9;&#9;&#9;case .notActivated: &#9;&#9;&#9;&#9;&#9;&#9;print("Unexpected .notActivated state received after trying to activate the WCSession") &#9;&#9;&#9;&#9;@unknown default: &#9;&#9;&#9;&#9;&#9;&#9;print("Unexpected state received after trying to activate the WCSession") &#9;&#9;&#9;&#9;} &#9;&#9;} &#9;&#9;func session(_ session: WCSession, didReceiveMessage message: [String : Any]) { &#9;&#9;&#9;&#9;guard let content = message["content"] as? String else { return } &#9;&#9;&#9;&#9;DispatchQueue.main.async { &#9;&#9;&#9;&#9;&#9;&#9;self.messageLabel.text = content &#9;&#9;&#9;&#9;} &#9;&#9;} &#9;&#9;func sessionDidBecomeInactive(_ session: WCSession) { &#9;&#9;} &#9;&#9;func sessionDidDeactivate(_ session: WCSession) { &#9;&#9;} } Code on the Watch Kit app: import WatchKit import Foundation import WatchConnectivity class InterfaceController: WKInterfaceController { &#9;&#9;@IBOutlet weak var messageLabel: WKInterfaceLabel! &#9;&#9;fileprivate var wcSession: WCSession! &#9;&#9;override func awake(withContext context: Any?) { &#9;&#9;&#9;&#9;wcSession = WCSession.default &#9;&#9;&#9;&#9;wcSession.delegate = self &#9;&#9;&#9;&#9;wcSession.activate() &#9;&#9;} &#9;&#9;@IBAction func sendMessageAction() { &#9;&#9;&#9;&#9;let message = [ &#9;&#9;&#9;&#9;&#9;&#9;"content": "Message sent from Watch on \(Date())." &#9;&#9;&#9;&#9;] &#9;&#9;&#9;&#9;wcSession.sendMessage(message, replyHandler: nil, errorHandler: { error in &#9;&#9;&#9;&#9;&#9;&#9;print("Error when sending message: \(error.localizedDescription)") &#9;&#9;&#9;&#9;}) &#9;&#9;} } extension InterfaceController: WCSessionDelegate { &#9;&#9;func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) { &#9;&#9;&#9;&#9;switch activationState { &#9;&#9;&#9;&#9;case .activated: &#9;&#9;&#9;&#9;&#9;&#9;print("WCSession activated successfully") &#9;&#9;&#9;&#9;case .inactive: &#9;&#9;&#9;&#9;&#9;&#9;print("Unable to activate the WCSession. Error: \(error?.localizedDescription ?? "--")") &#9;&#9;&#9;&#9;case .notActivated: &#9;&#9;&#9;&#9;&#9;&#9;print("Unexpected .notActivated state received after trying to activate the WCSession") &#9;&#9;&#9;&#9;@unknown default: &#9;&#9;&#9;&#9;&#9;&#9;print("Unexpected state received after trying to activate the WCSession") &#9;&#9;&#9;&#9;} &#9;&#9;} &#9;&#9;func session(_ session: WCSession, didReceiveMessage message: [String: Any]) { &#9;&#9;&#9;&#9;guard let content = message["content"] as? String else { return } &#9;&#9;&#9;&#9;messageLabel.setText(content) &#9;&#9;} }
Asked
by matiasb.
Last updated
.
Post not yet marked as solved
368 Views

iOS WebSocket error: Default TLS Trust evaluation failed

I'm trying to connect to a web socket server using WatchKit. I already have a Javascript app and a Windows application that can connect to this WebSocket server, but with iOS and WatchOS it fails with the errors below. Any idea how I can figure out what's wrong? I already added the App Transport Security Settings to my plist file. Connection 1: default TLS Trust evaluation failed(-9807) Connection 1: TLS Trust encountered error 3:-9807 Connection 1: encountered error(3:-9807) Connection 1: unable to determine interface type without an established connection
Asked
by coderkid.
Last updated
.