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

Composing Text Providers with CLKTextProvider.localizableTextProvider(withStringsFileFormatKey:, textProviders:)

Are there any official examples of setting up a complication using localizableTextProvider(withStringsFileFormatKey:, textProviders:)? I can get the text provider to populate when producing a SampleTemplate, but whenever I try to generate a template…
Emma K Alexandra
  • 464
  • 3
  • 15
1
vote
0 answers

Fit annotations in Watchkit Map with padding

I can't for the life of me figure this one out. I have been able to get annotations on the map and create a new Rect to hold them and set the map to that rect but my issue is obviously these annotations are right at the very edges of my map and I…
Jordan
  • 2,393
  • 4
  • 30
  • 60
1
vote
0 answers

Xcode 10 watch kit and watch extension build error

I have 3 targets, including the main target, WatchKit app and WatchKit extension. The project doesn't have any build error in Xcode 9.2 but when I build it in Xcode 10 it has these error: unable to resolve product type …
1
vote
0 answers

Saving High Frequency(100Hz) Sensor Data using performBackgroundTask in Core Data Lead to Data Loss and Crash the app?

I am trying to develop a watchOS app that collects Sensor(accelerator) data at a very high frequency(100Hz). I am using Core Data to store the data and export it to a CSV file, then send to iPhone. The app crashed after a short time, because some…
Evan
  • 335
  • 1
  • 3
  • 11
1
vote
1 answer

How can i pass a QR code image to apple watch

I have a QR code image in the format xamarin.forms.image created using zxing. My requirement is to show this QR code on apple watch. this image is saved to a global variable like below stackQRCode.Children.Add(zXingBarcodeImageView); …
iOS Developer
  • 1,723
  • 2
  • 16
  • 47
1
vote
1 answer

What are the options for persisting data on Apple Watch?

I'm using Apple Watch to collect sensor(e.g. accelerator) data, and need to store the data first on the Watch and send to iPhone afterwards. What are the possible ways to store the data? As it would be a large amount of data, NSUserDefault…
Evan
  • 335
  • 1
  • 3
  • 11
1
vote
1 answer

Is there any way to access pressesbegan method on WKInterfaceButton

I have a WKInterfaceButton in Xcode and when I configure the action for it, it only executes it when the tap has ended, that is, when my finger is lifted. @IBAction func kickButton() { //Action for this button } I want to be able to perform…
Alex S.
  • 65
  • 8
1
vote
1 answer

requestLocation() fails to provide Course on watch hardware but work in Sim

I've written a standalone Applewatch app which uses GPS. Trying to be a good citizen and minimize power consumption, I am using the single shot location request method. On the Xcode sim, this works fine, providing a location AND course and speed…
BlueskyMed
  • 765
  • 7
  • 24
1
vote
1 answer

WatchKit Modal Sheet top right "Done" button

This has been asked in 2015 and 2016 but maybe WatchOS 5 brings a change to this: When presenting dictation input, the user can click 'cancel' as well as 'done'. I would like to use this for a modal sheet in my app as well. Unfortunately I can't…
user2875404
  • 3,048
  • 3
  • 25
  • 47
1
vote
1 answer

How to get touch events for WKInterfaceButton

I have a WKInterfaceButton which is used to increase value of weight user has selected. However the default behaviour is each time user presses the button the quantity increases by one, I want to achieve the effect where as long as the user keeps…
FE_Tech
  • 1,534
  • 13
  • 25
1
vote
0 answers

How to auto launch Apple Watch app when companion iOS app is running?

I believe it's RTFM kind of question, but I can't find the answer. I've created Apple Watch app which works just fine, gets paired with its companion iOS app, receives push notifications sent to main app, but it does not start when iOS app gets…
alex904
  • 96
  • 3
1
vote
0 answers

How to start Apple Watch app when user makes some action in iOS app

I was told multiple times that other apps do this but I can't seem to find any documentation on how to do that. The behavior I would like to achieve is: User starts iOS app and navigates to particular screen. User presses start action/workout…
iur
  • 2,056
  • 2
  • 13
  • 30
1
vote
1 answer

Swift WatchOS Error: Unknown property in Interface description ('image') for controller

I get this error on watchOS "Unknown property in Interface description ('image') for controller" The declaration looks like this: class AnimationButton: WKInterfaceButton { @IBOutlet var image:WKInterfaceImage? ... Is it not possible to have…
ARMatt
  • 79
  • 6
1
vote
1 answer

How to add a button action in apple watch?

I'm trying to add an action with button to change the text in a label, i created a class for my table row and this is the code, when i try to run I didn't see nothing. import WatchKit import Foundation class MyRowController: NSObject { …
user10629202
1
vote
1 answer

How to change spriteKit SKSpriteNode texture

I have a Swift 4.2 SpriteKit scene and I want to programatically change the texture of an SKSpriteNode. How do I access the SKSpriteNode contained in the SKNode to change the texture? Here is my code: @IBOutlet weak var spritekitsceneFG:…
Arkon3
  • 63
  • 6