Questions tagged [watchkit]

WatchKit is an integral part of the Apple Watch experience for third-party applications. It contains the classes for creating Apple Watch applications and it ensures that an Apple Watch application can talk to its corresponding WatchKit extension.

WatchKit allows iOS developers to create rich, third-party app extensions with actionable items and notifications for the Apple Watch, as they've built apps for the iPhone and iPad.

More information on WatchKit:

3223 questions
1
vote
0 answers

Where is the data stored in Apple Watch and how to access it?

I'm using Watch Connectivity to communicate between my iPhone and Apple Watch. I'm using the transfer file function to transfer a URL to my Apple Watch. I'm using the sample app provided by Apple in their watch connectivity link, the console says…
Ronav
  • 79
  • 8
1
vote
0 answers

How do I detect in Watchkit when iPhone disconnects

I have a simple app that mirrors some information on a watch that also plays audio based on the information, I know how to detect when the watch disconnects from the phone using: if (WCSession.default.isReachable) { do something } but I cannot find…
Andy
  • 107
  • 1
  • 8
1
vote
1 answer

Swift - WatchKit: How to get data back to the root view controller?

Suppose I have three interface controllers which are all linked by push segues. InterfaceController1 -pushSegue-> InterfaceController2 -pushSegue-> InterfaceController3 InterfaceController1 has table which will house the data from the class…
1
vote
2 answers

WCSession activate session not calling delegate method

I have this code written in my Manager class init method. if([WCSession isSupported]) { WCSession *session = [WCSession defaultSession]; session.delegate = self; [session activateSession]; } Also, implemented these delegate methods in…
Gaurav Parvadiya
  • 149
  • 2
  • 11
1
vote
0 answers

WatchOS 6 Socket Programming

I have an old Watch OS app that I need to update for WatchOS 6. Right now the watch app uses the iPhone extension to communicate with a computer that's running a server using NSStream. This is very slow. I can send messages, which are received by…
user185813
  • 481
  • 1
  • 5
  • 16
1
vote
0 answers

How to get Apple Watch display radius?

Is there some way to get the display radius? I tried to use contentSafeAreaInsets but they are 0 inside willActivate() and awake(withContext:) which is very frustrating.
kelin
  • 11,323
  • 6
  • 67
  • 104
1
vote
2 answers

Environment variable not passed to Subviews

I want to get started with Core Data & SwiftUI and therefore created a new watchOS project using the latest Xcode 11.1 GM. Then, I copied both persistentContainer & saveContext from a fresh iOS project (with Core Data enabled), to gain Core Data…
dschu
  • 4,992
  • 5
  • 31
  • 48
1
vote
0 answers

Coloring a WKInterfaceImage?

I'm using this code which works well on iPhone but I need to color a WKImage in WatchKit, how can I do this? I tried using the same code for an Extension on WKInterfaceImage but the image property is get only. extension UIImageView { func…
GarySabo
  • 5,806
  • 5
  • 49
  • 124
1
vote
0 answers

How to change the rootInterfaceController in watchOS6

I am developing an independent app for Apple Watch. So after my short onboarding finishes there is no way to replace the rootController where the login page was displayed. Instead I can only modally or push a controller on the current view. Since in…
Nikhil Muskur
  • 208
  • 1
  • 11
1
vote
0 answers

Feature toggle WatchKit extension

Is it possible to feature toggle a WatchKit extension? I know I can disable the target by removing it in Build Phases. But I would like to enable the WatchKit extension only for a specific scheme. Building for e.g. production should not bundle the…
Daniel Tovesson
  • 2,550
  • 1
  • 30
  • 41
1
vote
0 answers

Swift Convert UIImage to Data first time gives only 560 bytes of data

I am using below code to convert an image to Data so that I can send it to my watch extension using watchSession.updateApplicationContext. UIGraphicsBeginImageContextWithOptions(localQrView.subviews[0].bounds.size, false,…
Lohith Korupolu
  • 1,066
  • 1
  • 18
  • 52
1
vote
1 answer

WatchOS Detecting if user has taken off watch/locked screen

I’m designing a Watch app that that has uses a PIN in order to create a token session. The goal is to detect when the watch is locked/removed from the users arm in order to know when to invalidate the token and prompting to enter their PIN again…
dariusngo
  • 39
  • 5
1
vote
1 answer

Watch OS : Microphone & Audio Processing

Is it possible to access the watch microphone and process the live audio stream to gain specific information (decibel level & current frequency)? I know it's possible to record audio on the watch by using the swift presentAudioRecorderController.…
iqra
  • 1,061
  • 1
  • 11
  • 18
1
vote
0 answers

How do I check that the WatchKit App is closed or terminated?

I have BLE connection in my app and when the user quitted or the app become deactivated, I need to disconnect the connection. So I have to know if there is any method like “watchAppWillTerminate“ or something in WKExtensionDelegate. The other thing…
1
vote
1 answer

Trying to reproduce the workout activity selection method used in the Workout app on Apple Watch

So far I've managed to populate a picker with an array and set it to stack style which gives me the display but how can I tap on a row in a picker to select it? Is there a way to use a button which covers the picker? Or am I going about this…
tony
  • 23
  • 3