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
73
votes
4 answers

Equal widths of subviews with SwiftUI

I'm trying to build a simple watchOS UI with SwiftUI with two pieces of information side-by-side above a button. I'd like each side (represented as a VStack within an HStack) to take up half of the available width (so it's an even 50/50 split within…
gohnjanotis
  • 6,513
  • 6
  • 37
  • 57
50
votes
3 answers

Non-Public Library SockPuppetGizmo

I got an email that my latest binary submission to Apple for an iOS/Watch OS app was invalid due to: The app links to non-public libraries in PlugIns/iPrayed.appex/iPrayed WatchKit App.app/_WatchKitStub/WK: …
user717452
  • 33
  • 14
  • 73
  • 149
43
votes
13 answers

Xcode 13: Build hangs with "iPhone is busy: making Apple Watch ready for development"

Issue: The build hangs with "iPhone is busy: making Apple Watch ready for development" Further facts: iOS 14.8 iPhone 8 watchOS 7.6.2 Xcode 13 Apple Watch Series 3 + Cellular (42mm) Does anyone know a solution for that issue? Many of the…
LuminiCode
  • 503
  • 1
  • 4
  • 10
39
votes
4 answers

Detecting available API iOS vs. watchOS in Swift

#available does not seem to work when differentiating between watchOS and iOS. Here is an example of code shared between iOS & watchOS: lazy var session: WCSession = { let session = WCSession.defaultSession() session.delegate = self …
Cezar
  • 690
  • 1
  • 8
  • 17
29
votes
2 answers

Using Core Data with watchOS 2.0

I made an iOS/Apple Watch app with WatchKit 1.0 that uses a shared group container and a custom framework to access the same Core Data store. Now, in the transition guide for watchOS 2.0, Apple says this: If your existing Watch app and iOS app use…
Becky Hansmeyer
  • 712
  • 6
  • 24
27
votes
4 answers

Watch os 2.0 beta: access heart beat rate

With Watch OS 2.0 developers are supposed to be allowed to access heart beat sensors.... I would love to play a bit with it and build a simple prototype for an idea I have, but I can't find anywhere info or documentation about this feature. Can…
Sr.Richie
  • 5,680
  • 5
  • 38
  • 62
26
votes
0 answers

Watch Connectivity throwing NSFileReadNoSuchFileError -> ENOENT

I am using watch connectivity in my app quite successfully, but sometimes when I start the debugging session all I get in that session is a stream of errors like this one: [WC] -[WCFileStorage enumerateIncomingUserInfosWithBlock:] could not load…
Miroslav Kuťák
  • 1,875
  • 1
  • 18
  • 24
25
votes
3 answers

Using environmentObject in watchOS

I am trying to use environmentObject in a watchOS6 app to bind my data model to my view. I have created a simple, stand-alone Watch app in Xcode 11. I created a new DataModel class import Combine import Foundation import SwiftUI final class…
Paulw11
  • 108,386
  • 14
  • 159
  • 186
24
votes
5 answers

Can I delete the Platforms under Xcode.app/Contents/Developper/?

My Mac is running out of disk. I searched for large files and directories and found the directory /Applications/Xcode.app/Contents/Developer/Platforms takes about 20GB of my disk. ls -l total 0 drwxr-xr-x 10 root wheel 320 Dec 18 14:37…
Yv Zuo
  • 391
  • 2
  • 8
23
votes
3 answers

SwiftUI call function on variable change

I am trying to convert a view of my watchOS App to Swift UI. I wanted to port the volume control that can be found in watchKit to SwiftUI with custom controls. In the image below you can see the current state of the view. The volume control…
Sn0wfreeze
  • 1,959
  • 3
  • 18
  • 32
22
votes
2 answers

Detect user's watchOS version from iOS app

I have an iOS app where I have some settings in the iOS app related to the watch. I only want to show them if the user has an Apple Watch that's compatible with my app. In WatchConnectivity I can query WCSession's isPaired property to see if the…
Stephen
  • 1,427
  • 1
  • 17
  • 42
20
votes
2 answers

Xcode 7 supporting watch OS1 and OS2

I have been fiddling with Xcode 7 for sometime now, I get to know that it supports only Swift 2 and there is no way to support Swift 1.0 or 1.2 in Xcode 7. This is fine. Now coming to WatchOS, can I have two targets one for WatchOS1 and one for…
Satheesh
  • 10,998
  • 6
  • 50
  • 93
19
votes
1 answer

Type '()' cannot conform to 'View'; only struct/enum/class types can conform to protocols; calling functions with SwiftUI

I have a Swift UI struct called MyWatchView with this stack. VStack (alignment: .center) { HStack { Toggle(isOn: $play) { Text("") } …
Derick Mathews
  • 347
  • 2
  • 3
  • 12
19
votes
4 answers

SwiftUI: Animate changes in List without animating content changes

I have a simple app in SwiftUI that shows a List, and each item is a VStack with two Text elements: var body: some View { List(elements) { item in NavigationLink(destination: DetailView(item: item)) { VStack(alignment:…
BlackWolf
  • 5,239
  • 5
  • 33
  • 60
17
votes
1 answer

Is there a controller in SwiftUI?

I'm trying to get into SwiftUI right now, but struggeling with basic things. My struggle of the day: I'm wondering if there is something like a controller in SwiftUI? Where does logic not related to the UI go? To give a concrete example: I have an…
BlackWolf
  • 5,239
  • 5
  • 33
  • 60
1
2 3
82 83