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

SwiftUI WatchOS-Only Run Error due to HealthKit

I am getting this error only when Health Kit is enabled and I am running on a real device. 2023-01-30 19:40:27.907022-0700 Watch App[381:50291] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration…
Conmans
  • 11
  • 1
0
votes
0 answers

How to dynamically select text, image and background colors of an iOS or watchOS widget?

I added successfully iOS widgets to my app. A widget consists e.g. of a system image and text. For widgetFamily accessoryCircular the widget is set up (simplified) as: case .accessoryCircular: VStack { Image(systemName:…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
0
votes
0 answers

Multiline TextField with axis doesn't wrap over several lines with SwiftUI for watchOS

This is my View: @State private var descriptionService: String = "Hello Tim it doesnt work at all" TextField("description".localized, text: $descriptionService, axis: .vertical) .multilineTextAlignment(.center) .padding() …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
0 answers

WatchOS complication getPlaceholderTemplate is being ignored

I have a complication working perfectly well on my Apple Watch (simulator and hardware). However, I cannot seem to get the representation to display correctly when you choose which app to assign to a complication area. In my case, graphic corner.…
0
votes
1 answer

How to insert dynamic list items into SwiftUI list?

This is my body: var body: some View { NavigationView { List { MonthElementView(month: month) ServiceElementView(service: month.services.first!) ServiceElementView(service: month.services.first!) …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

How to move .listRowBackground style from the list to list element in SwiftUI?

This is my code: var body: some View { List(months) { month in NavigationLink { MonthView(month: month) } label: { MonthElementView(month: month) } .listRowBackground( …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

How to decorate SwiftUI Views depending on condition?

This is what I mean: var body: some View { Text(text) .font(Font.openSansLight(withSize: 15)) .foregroundColor(Color(uiColor: mode.underlayTextColor)) if scale { //this is a Bool value passed to initializer …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

How to find alternative way to add @State for computed property?

This is my simple View: struct Element: Identifiable { let id = UUID() let text: String init(text: String) { self.text = text } } struct ServicesView: View { @FetchRequest(sortDescriptors: [SortDescriptor(\.date, order:…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
0 answers

How do I register for push notifications in watchOS with SwiftUI?

This is my App: import SwiftUI import UserNotifications @main struct FieldService_Watch_AppApp: App { @Environment(\.scenePhase) private var scenePhase var body: some Scene { WindowGroup { TabView { …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

Watch falls asleep during active HKWorkoutSession

I get data from the accelerometer (CMMotionManager) and training (HKWorkoutSession) and transfer it to the phone in real time, but at a random moment the watch falls asleep. In the info I use WKBackgroundModes: workout-processing The strap is…
0
votes
2 answers

How to background a whole cell of the List with SwiftUI?

This is how I define my List item: var body: some View { NavigationView { List(groups) { group in NavigationLink { YearView(months: group.months) } label: { VStack(alignment:…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

My SwiftUI View doesn't update navigation title for third level

I have prepared a simple example with three levels: struct Element: Identifiable { let id = UUID() let text: String init(text: String) { self.text = text } } struct FirstView: View { @State var elements = [Element(text:…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
2 answers

How to fetch all changes since latest CKServerChangeToken?

This is how I define fetching changes: func fetchAllChanges(isFetchedFirstTime: Bool) { let zone = CKRecordZone(zoneName: "fieldservice") let options = CKFetchRecordZoneChangesOperation.ZoneConfiguration() …
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358
0
votes
1 answer

Debugging a watchOS install from phone

I have an iOS app that I added a WatchOS to. I paired simulators, works fine. I build it for my iPhone, it runs fine. When I try to install the watch app to the watch from my phone, I get a generic error. The watch has plenty of storage. How can I…
0
votes
1 answer

My SwiftUI FetchRequest display no items although there is 10 items

This is what I have in code: struct ServicesView: View { @FetchRequest(entity: Category.entity(), sortDescriptors: [NSSortDescriptor(keyPath: \Category.name, ascending: false)], animation: .easeIn) var results: FetchedResults var…
Bartłomiej Semańczyk
  • 59,234
  • 49
  • 233
  • 358