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
32
votes
9 answers

Invalid Bundle, The bundle contains disallowed nested bundles, contains disallowed file 'Frameworks'

I added a shared framework to share code between app and watch extension. Later I removed the shared framework since it cause lots of problems. I can build and run my app on iphone and watch. However when I submit to app store, I see these two…
WayneZhao
  • 1,517
  • 3
  • 13
  • 8
32
votes
10 answers

How to automatically set the version and build number of a Watchkit app target

The version and build number (or version and short version) of a Watchkit app and extension have to be set to the same value as the containing app. I use environment variables to set the apps version in the Info.plist dynamically at build time. That…
dogsgod
  • 6,267
  • 6
  • 25
  • 53
32
votes
9 answers

Apple Watchkit simulator issue: SPErrorInvalidBundleNoGizmoBinaryMessage

When I open my existing Watchkit app (Xcode 6.2), it compiles correctly, the simulators are launched (iPhone+Watch), followed by the meaningful error: Error Launching 'xxx Watchkit Extension' SPErrorInValidBundleNoGizmoBinaryMessage I have this…
Wouter
  • 1,568
  • 7
  • 28
  • 35
31
votes
15 answers

WatchKit: unable to find interface controller class

I tried adding an interface controller to a storyboard, setting its Custom Class to a WKInterfaceController subclass, launched the app in the simulator and navigated to the specified interface controller. When I do so, I get the following…
Senseful
  • 86,719
  • 67
  • 308
  • 465
30
votes
5 answers

Cannot decode object of class

I am trying to send a "Class" to my Watchkit extension but I get this error. * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '* -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class…
fabian
  • 5,433
  • 10
  • 61
  • 92
30
votes
5 answers

Passing data to Apple Watch app

I am trying to pass data from my app into my Apple Watch app. Basically, I am using the same method as I used for creating the today widget and so I am passing data through NSUserDefaults. The problem is, that when I run my app, the data does not…
user3746428
  • 11,047
  • 20
  • 81
  • 137
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
28
votes
3 answers

Xcode - Error launching WatchKit Extension

I've successfully built a basic Watch/iPhone app and am getting the following error when trying to run on my devices: "Error Launching 'app_name WatchKit Extension' The operation couldn’t be completed. Unable to launch because it has an invalid code…
Bryan
  • 753
  • 1
  • 6
  • 12
27
votes
2 answers

iOS get heart rate from Apple Watch in near real time

I need to make an app that records heart rate data in near real time and send this data to a server as soon as possible. First I took this approach: Watch os 2.0 beta: access heart beat rate In fact it is working fine. There is new heart rate data…
user2529173
  • 1,884
  • 6
  • 30
  • 43
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
5 answers

WatchKit API for Force Touch / Digital Crown?

I'm very excited about the new user interaction possibilities introduced by the Apple Watch, among them, Force Touch and Digital Crown. However, I couldn't find mentions of them in the WatchKit API. Are there any ways to receive events from Force…
zavié
  • 4,301
  • 2
  • 34
  • 46
25
votes
2 answers

WatchKit SDK not retrieving data from NSUserDefaults

I wanted to make a test app for the Apple watch in which you can set some String on your phone, and then it will be displayed on the Apple Watch. I decided to use NSUserDefaults class to store this data. In my view controller for the iPhone I have…
Ravin Sardal
  • 717
  • 1
  • 13
  • 23
24
votes
3 answers

WatchOS: Should UI updates from the extension be called on the main thread?

For iOS apps, UI updating is done from the main thread exclusively - not doing so is never recommended and can lead to unexpected behaviour. In watchOS, the OS is structured with a watch extension, and an app - as different 'containers'. Usually, UI…
Jordan Smith
  • 10,310
  • 7
  • 68
  • 114
24
votes
5 answers

How to check whether iPhone and apple watch are connected

Is there any way to notify user in Apple Watch that the iPhone is now out of range and when it comes back in range. How can we do it in watch extension. Thanks in advance.
Mohit Totlani
  • 825
  • 1
  • 10
  • 21
24
votes
6 answers

How can I simulate the Apple Watch for development purposes?

I just downloaded the Xcode 6 GM, and I'd like to see how my apps work with an Apple Watch connected to the simulated iPhone. How can I simulate this new device on my MacBook?
Undo
  • 25,519
  • 37
  • 106
  • 129