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
1 answer

NotificationCenter is not available when building for watchOS Simulator

I want to use NotificationCenter inside a watchOS target. But I get the following error message when building the app at import NotificationCenter: NotificationCenter is not available when building for watchOS Simulator. Consider using `#if…
maroony
  • 1
  • 4
0
votes
0 answers

Getting ERROR ITMS-90164 when trying to upload Watch App to AppStore

I am learning to develop an Apple WatchOS App (stand alone watch app), this is my first ever app, I have written the code to access the HealthKit functionality (Read and Write, I am also able to run the app on my physical device and no errors in…
Billy Mahmood
  • 1,857
  • 5
  • 26
  • 37
0
votes
0 answers

NWConnection script works on iPhone but not on Apple Watch

This script should send 1234 via UDP to 192.168.0.169, port 4000. It works on an iPhone SE 2 but doesn't on an Apple Watch SE (watchOS 7.2). import WatchKit import Network class InterfaceController: WKInterfaceController { var connection:…
Cedric
  • 245
  • 1
  • 12
0
votes
0 answers

SwiftUI: How to align vertical top with VStack?

I'm very new to SwiftUI and iOS development. There is a margin (red circle in the picture) on the top of the picker that I'm trying to remove by applying equal spacing between the picker and the button. Is there any parameter that can automatically…
Ryuji
  • 113
  • 2
  • 8
0
votes
0 answers

Swift: How to remove green border from picker in watchos? Any Picker Styling?

There is a green border across picker and I am not sure on how can i remove this. Can somebody please help me out with this? If possible can someone please also recommend me on how can I style this picker to have a background or something fancy.
user11450789
0
votes
0 answers

Detect iPhone disconnected from WatchOS app in background

I’d like to know if there’s a way to detect if the iPhone is unreachable while the WatchOS app is in background. I tried to connect each other with CoreBluetooth but if WatchOS app is in background won’t call didDisconnected method. So I tried the…
Elia Crocetta
  • 318
  • 1
  • 6
  • 20
0
votes
1 answer

Is there a SwiftUI equivalent to WKInterfaceController's .becomeCurrentPage method?

Previously in WatchKit we could tell a certain InterfaceController to present itself using .becomeCurrentPage, how can we do it in Swift UI? In WatchKit for example I would: // handle notification @objc func respondToWaterlock(_ notification:…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
0
votes
1 answer

Local notification scheduled through UserNotifications not showing on watch

I'm attempting to schedule a local notification on WatchOS with the following code, but nothing is showing on the watch. // sending notifications let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound])…
Peter Lu
  • 157
  • 2
  • 11
0
votes
1 answer

watchOS app uses different app icon on the home screen than in the App Switcher

I'm using the watchOS simulator in order to test my app. For some reason, the system uses an older app icon in the App Switcher than the one being displayed on the home screen, despite my .appiconset containing the same resized image multiple times.…
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
0
votes
0 answers

How can you get a SwiftUI Slider on WatchOS with a fully transparent background?

I am using a "Slider" in my WatchOS interface, built with SwiftUI. Since the Slider is contained inside another container, I really need the background of the Slider to be fully transparent (Color.clear). I have tried to use the…
Bocaxica
  • 3,911
  • 3
  • 37
  • 54
0
votes
1 answer

Picker control binds to index and not to tag

I am having an issue where my Picker control is binding to the index of the item and not to the value specified in the tag. I am using WatchOS. Picker("Hour:", selection: $hour) { ForEach((twentyFourHour ? 0 : 1)..<(twentyFourHour ?…
Slappy
  • 4,042
  • 2
  • 29
  • 41
0
votes
1 answer

NSPersistentStoreCoordinator not initializing after container.loadPersistentStores

I'm attempting to set up CoreData/CloudKit on a WatchOS application using NSPersistentCloudKitContainer. However, after calling container.loadPersistentStores, the viewContext.persistentStoreCoordinator field appears to still be nil. Here are some…
Peter Lu
  • 157
  • 2
  • 11
0
votes
1 answer

WatchOS - App Store doesn't list localised languages for standalone watch app

I have a standalone Apple Watch app, and localised it to many languages, also localised the App Store product pages. Everything works great, app and store page shows in the correct language, but the language section on the store only lists…
solyoma
  • 1
  • 1
0
votes
1 answer

watchOS: Fetching EventKit calendars - more than enabled

I have a watchOS (only) app and fetching calendars and events for these calendars. In my Watch App I have set the calendar app to mirror the calendars from iPhone. When I now uncheck a calendar on iPhone as active my app still get this disabled…
Kevin Lieser
  • 951
  • 1
  • 9
  • 25
0
votes
1 answer

How to detect when watchOS application becomes active?

I'm using watchOS 7.0 and SwiftUI. My view listens to NSExtensionHostDidBecomeActive notification: .onReceive(NotificationCenter.default.publisher(for: .NSExtensionHostDidBecomeActive)) { _ in NSLog("Foreground") …
Wojciech Kulik
  • 7,823
  • 6
  • 41
  • 67