Questions tagged [watchos]

watchOS is Apple's operating system for Apple Watches. Optimized for touch-based interfaces, this OS has a lot in common with iOS, which is the operating system for Apple's mobile devices, but shouldn't be confused with it.

watchOS is Apple's operating system for Apple Watches. Optimized for touch-based interfaces, this OS has a lot in common with , but shouldn't be confused with it.

Currently, the Apple Watch is the only device that runs watchOS. Its API is called WatchKit (see ).

Helpful links

1236 questions
0
votes
2 answers

Error while compiling for SwiftUI (Type check)

I get the error when compiling this if/else statement in my view. Seems like its typed well enough but it produces an error. modes is an array of objects. The index is an Int from an enum value public extension CaseIterable where Self: Equatable { …
0
votes
0 answers

Can I run a Bluetooth Central in Background in my WatchKit app while supporting WatchOS version < 8?

As of WatchOS 9 a WatchKit app can receive alerts via Bluetooth in background. This is really great for my use case. However, apps running on watchOS 7 or earlier need a special entitlement for this that is not available for most apps and won't be…
David Villegas
  • 458
  • 3
  • 18
0
votes
2 answers

How to properly implement a global variable in SwiftUI

I am going to create a SwiftUI application where I want to be able to swap between 3 modes. I am trying EnvironmentObject without success. I am able to change the view displayed locally, but from another View (in the end will be a class) I get…
0
votes
1 answer

iPhone app isn't waking in the background when WCSession's sendMessage is fired

I'm making an app for Apple Watch that needs to wake the iPhone's counterpart app which loads a site via a WKWebView, takes a snapshot, and sends the image back. It works perfectly when the iPhone app is on-screen, intermittently when it's running…
David
  • 87
  • 12
0
votes
0 answers

Can you overcome WatchOS 75MB app size limitation using WatchConnectivity?

I'm looking to build an Apple Watch app which would utilize SceneKit and render a 3D model with many different animations. I imagine the resources would easily take up over the 75MB bundle limit. I have two questions: Is it possible to overcome…
ninjz
  • 11
  • 1
  • 2
0
votes
0 answers

Limit a watchOS app to only being available on the Ultra watch

Is there a way to limit the availability of a standalone Apple Watch App, to only being available on the Ultra watches?
Zifigo
  • 196
  • 8
0
votes
0 answers

How do I set up a WKExtendedRuntimeSession for a standalone WatchOS app on XCode 14?

WatchOS noob here... I created a standalone WatchOS app in XCode 14.2 and it has no "Extension" target, which I think is the expected behavior. But I would like to use a WKExtendedRuntimeSession and the documentation says to "enable your WatchKit…
smoyth
  • 649
  • 6
  • 13
0
votes
1 answer

Detect Apple Watch movement without having location updates always turned on?

We have an existing iOS app (developed for a client) that uses Core Location to report location updates to their servers (so they can keep track of their executives).  When location updates indicate that the phone has remained in the same location…
bmt22033
  • 6,880
  • 14
  • 69
  • 98
0
votes
1 answer

watchOS: CBCentralManager.state is always .unauthorized

I am trying to use CBCentralManager in watchOS to scan for BLE devices. I use the following code to start the scanning process: centralManager = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionShowPowerAlertKey: true])…
RawMean
  • 8,374
  • 6
  • 55
  • 82
0
votes
0 answers

socket fail in watchos platform

I try to new a socket in watchos platform, and it always failure, the same code run in ios platform,and success,what's wrong? here are some code: #import #import #import int clientsocket = socket(AF_INET,…
jchao
  • 1
  • 2
0
votes
0 answers

WatchOS - How to avoid device sleeping during downloads

I'm using URLSession to download a .zip file when the first view appears, and it works fine. The problem is that if the user's device sleeps after a duration (I believe 15/75 seconds are the options in settings) or by tilting their wrist etc - the…
lacking-cypher
  • 483
  • 4
  • 16
0
votes
0 answers

Is there a way to send open url request from watch app to the iPhone

I need to open a URL in the iPhone's safari using a button on the watchOS app. It's pretty straightforward when there's a companion app installed, but is there a way to do this without a companion app? Thanks Using @Environment(\.openURL) inside the…
Ihar
  • 13
  • 3
0
votes
1 answer

AVAudioPlayerNode.play() causes crash after backgrounding and foregrounding the app

I'm working on a watchOS app which plays sound using an AVAudioPlayerNode. Whenever I put the app in the background, open it back again and try to play sound, the app crashes with the following message: Terminating app due to uncaught exception…
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
0
votes
0 answers

watchOS: How to respond to app being opened via an intent?

I've successfully added a StartWorkoutIntent to my watch app for when the action button is pressed, however I need to be notified when the app was opened via the intent. Apple's docs say to implement this handle function below which I have in my…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
0
votes
0 answers

Can An iPhone App Motintor Multiple Apple Watches?

Is WatchOS flexible enough to allow a single app to read data from multiple Apple Watches? The application I am looking at is similar to the one described in this post, but with a twist. I want to use Apple Watches on multiple subjects to monitor…
Mike
  • 3,084
  • 1
  • 25
  • 44