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
12
votes
2 answers

Adding a watch app to a Flutter iOS application

I have come across an issue when trying to create a Flutter iOS app with a watch app extension. For testing I have simply created a default Flutter app using flutter create watchapp When this is run I get the standard demo Flutter app. If I then…
Steve
  • 557
  • 5
  • 17
12
votes
2 answers

HealthKit Permission Sheet Not Appearing

In my watch extension I call this function: func requestAuthorization() { let healthStore = HKHealthStore() let workoutType = HKObjectType.workoutType() let heartRateType = HKObjectType.quantityType(forIdentifier:…
raginggoat
  • 3,570
  • 10
  • 48
  • 108
12
votes
1 answer

WCSessionDelegate: sessionDidBecomeInactive and sessionDidDeactivate have been marked unavailable, but are required

I just converted a Swift 2 app to Swift 3, using the convert function of Xcode 8. My code has a class marked as WCSessionDelegate. In Swift 2 it compiled without the methods sessionDidBecomeInactive and sessionDidDeactivate. If I compile the…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
12
votes
6 answers

Invalid Bundle error from iTC, cannot submit app - because 4 swift dylibs fail to embed

My app runs fine on devices & simulators, but when I submit it, I get the Invalid Bundle - One or more dynamic libraries that are referenced by your app are not present in the dylib search path error emailed to me about half an hour after the upload…
xaphod
  • 6,392
  • 2
  • 37
  • 45
12
votes
3 answers

Cannot decode object of class Employee for key (NS.object.0); the class may be defined in source code or a library that is not linked

Im trying to pass an array of 'Employee' objects iPhone to Apple Watch by serializing the array : NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:employees]; and unserializing it as on the Watch side: NSMutableArray *employees =…
12
votes
3 answers

How to share data using Watch Connectivity when working with Core Data

In my iOS application I use Core Data to store data and a fetch request to create an array of NSManagedObjects to display in a UITableView. On the Watch OS I check if WCSession is supported and active a session, then send the iOS application a…
RileyDev
  • 2,950
  • 3
  • 26
  • 61
12
votes
4 answers

Watch app shared across multiple targets

My project has multiple build targets so I can facilitate "branded" builds that share the same code, but have unique bundle identifiers and assets per target. I've created a watch app for one of my app targets, which is working just fine. Now I'm…
tskulbru
  • 2,336
  • 1
  • 20
  • 38
12
votes
1 answer

HKWorkoutSession not resuming custom workout app if screen gets locked or active app changed

I have a watchOS 2 app that displays health data during a run. I start a workout using HKWorkoutSession as follows: self.workoutSession = HKWorkoutSession(activityType: .Running, locationType: .Outdoor) self.workoutSession!.delegate =…
lehn0058
  • 19,977
  • 15
  • 69
  • 109
12
votes
3 answers

Debugging on Apple Watch Never Prints to Console

I'm building a native Apple Watch app and on the simulator it will print to the console just fine, however when I run on device it never does this. Is this expected behaviour?
William Robinson
  • 1,038
  • 17
  • 32
12
votes
8 answers

Cocoa pods and Watchkit Extesion

I try to build a WatchKit Extension for my app... I Updated the pods file to look like this: platform:ios, '8.0' use_frameworks! source 'https://github.com/CocoaPods/Specs.git' link_with 'my-team-ios', 'My Team WatchKit Extension' def shared_pods …
Urkman
  • 1,298
  • 1
  • 16
  • 32
12
votes
2 answers

WatchKit adding margin to Label

Is there a way to add a margin / padding to a WKInterfaceLabel in Watchkit? Using UIEdgeInsets doesn't work.
Franlon
  • 147
  • 6
12
votes
5 answers

iPhone WatchKit Companion App Display Name

If you open the Apple Watch application on your >= iOS 8.2 iPhone, you get a list of applications, featuring watch apps. Where can I define the name, displayed next to the watch app's icon?
edsa-steffen
  • 179
  • 1
  • 9
12
votes
3 answers

Passing Data between interface controllers in WatchKit

How would I pass data stored in a label from my Interface Controller to another interface controller in WatchKit using Swift? I can't seem to find an answer anywhere, hope someone here can help me. I've included the section of my code that deals…
adrlan
  • 121
  • 1
  • 6
12
votes
2 answers

How can I set the nav title's tint color for a modal interface in WatchKit?

In WatchKit, I know that I can set the "Global Tint" value in my storyboard file to adjust the navigation title's text color in my interface controllers. However, whenever I present a modal interface controller in my application, I'm noticing that…
bryanjclark
  • 6,247
  • 2
  • 35
  • 68
12
votes
3 answers

The UIApplicationDelegate in the iPhone App never called reply

I am trying to launch my iPhone app from watch simulator using the below code : WKInterfaceController subclass [WKInterfaceController openParentApplication:[NSDictionary dictionaryWithObject:@"red" forKey:@"color"] reply:^(NSDictionary *replyInfo,…
Abhishek Bedi
  • 5,205
  • 2
  • 36
  • 62