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
23
votes
5 answers

NSUserDefaults not working on Xcode beta with Watch OS2

I just installed the latest beta of Xcode to try Swift 2 and the improvements made to the Apple Watch development section. I'm actually having an hard time figuring out WHY this basic NSUserDefaults method to share informations between iOS and Watch…
Sara Canducci
  • 6,231
  • 5
  • 19
  • 24
23
votes
17 answers

WatchKit error - unable to find interface controller class '' to instantiate

Whenever I make any connections in my subclass of WKIInterfaceController I get error WatchKit error - unable to find interface controller class 'myClass' to instantiate and a activity indicator showing in simulator and the view does not load.…
JSA986
  • 5,870
  • 9
  • 45
  • 91
23
votes
4 answers

Watch Kit: is it possible to vibrate watch programmatically?

Is it possible to vibrate watch while Watch Extension is running? We can do it on iOS in this way (force iPhone to vibrate): AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); I hope there is something similar on WatchKit. Update: I have added…
kelin
  • 11,323
  • 6
  • 67
  • 104
23
votes
6 answers

How can I reload the data in a WatchKit tableview?

I have an app for iPhone with a Tableview, whose data comes from CoreData. The same data are also displayed in a watch app: If I add a row from the iPhone app: and I reload data in the Watch app: I see the old rows empty! If the stop the watch…
Ragazzetto
  • 622
  • 1
  • 8
  • 18
22
votes
5 answers

Sharing classes between iphone and the apple watch

I was hoping someone could shed some light on this. I've tried researching but couldn't really find anything... Is there a way to share a class between the iPhone application and the apple watch extension? Let's say in the watch extension I have a…
prawn
  • 2,643
  • 2
  • 33
  • 49
21
votes
6 answers

Undefined symbol: _OBJC_CLASS_$_WKInterfaceController error after updating Xcode to version 11.1

I updated Xcode to version 11.1 and got this expected error: WatchKit is not available when building for iOS Simulator. Then I deleted WatchKit from iOS app target as suggested. Since then I am having this error: Undefined symbols for…
21
votes
9 answers

Invalid Apple Watch icon file names must match pattern "*@x.png"

I'm trying to submit an update to my App to include Apple Watch capabilities, however whenever I validate the build I get the errors detailed in the screenshot below. Looking at the bottom error my file name seems to be matching the pattern so I…
user843337
20
votes
2 answers

Error: The app icon set named "AppIcon" did not have any applicable content

I know that there are several questions on StackOverflow with similar content, but it seems that I am still unable to get the solution to this issue. I have: Made sure my AppIcons are the adequate size Put the images into Images.xcassets The…
Ninja
  • 1,012
  • 3
  • 14
  • 29
20
votes
1 answer

How to get the current location in watchOS 2?

I need to fetch the user current location for the WatchKit App in watchOS 2. How do I do this?
Jyothi
  • 384
  • 1
  • 3
  • 10
20
votes
7 answers

How to export shared container of an iOS App with Xcode6.2?

In our iOS app we utilize a shared container to share files between our main iOS app and its extension (specifically WatchKit Extension), using [NSFileManager containerURLForSecurityApplicationGroupIdentifier:] method. For debugging purposes we need…
Sagi Iltus
  • 1,130
  • 10
  • 21
19
votes
1 answer

Is there any indication as to which Apple platforms allow inline assembly?

I've been trying to decypher for a while now what the status is of inline assembly on the various platforms since Apple announced bitcode. As of right now (Xcode 7.1.1) this is what I observe: OSX - allowed (I expect will always) iOS - allowed,…
Earlz
  • 62,085
  • 98
  • 303
  • 499
19
votes
4 answers

Debug WatchKit on real Apple Watch - Nothing happens

I am struggling with debugging my WatchKit Extension/App on a real Apple Watch. Debugging both the iPhone App and the WatchKit Extension using the simulator the simulator is not problem: Select the WatchKit App Profile and run in Simulator ==> App…
Andrei Herford
  • 17,570
  • 19
  • 91
  • 225
19
votes
7 answers

WatchKit and UIAlertView / UIAlertController popup

In my WatchKit app, when the user first launches it, I would like to present to them a helpful message alert that tells them how the app works, e.g. what the buttons do, etc. Is there something similar to UIAlertView / UIAlertController that I can…
Sam B
  • 27,273
  • 15
  • 84
  • 121
19
votes
2 answers

How can I guarantee unique entries in a Core Data store in a shared app container used by both the host app and an extension?

To ask my question effectively, let's first consider the exact scenario I'm facing: General Setup A host iOS 8 app. One or more iOS 8 extensions (WatchKit, Share, etc.) bundled with the host app. The host app and all extensions share the same Core…
jaredsinclair
  • 12,687
  • 5
  • 35
  • 56
19
votes
4 answers

Is there any way to access the accelerometer from the Apple Watch?

It doesn't look like WatchKit released today has such API included.
mobileideafactory
  • 1,640
  • 1
  • 22
  • 30