I cannot figure out for the life of me how to get a working WatchKit companion app.
I have an existing test iOS app. I've added the "Watch app for iOS app" targets. Verified that the bundle identifiers were set up correctly according to various tutorials.
I'm able to start the WCSession on the phone, and have the corresponding WCSession code in my InterfaceController's -awakeWithContext: method.
But when I try to start a workout session from the phone:
I get this error:
I have an existing test iOS app. I've added the "Watch app for iOS app" targets. Verified that the bundle identifiers were set up correctly according to various tutorials.
I'm able to start the WCSession on the phone, and have the corresponding WCSession code in my InterfaceController's -awakeWithContext: method.
But when I try to start a workout session from the phone:
Code Block objc HKWorkoutConfiguration *configuration = [[HKWorkoutConfiguration alloc] init]; configuration.activityType = HKWorkoutActivityTypeFitnessGaming; configuration.locationType = HKWorkoutSessionLocationTypeIndoor; [self.healthStore startWatchAppWithWorkoutConfiguration:configuration completion:^(BOOL success, NSError * _Nullable error) { if (success) { NSLog(@"success"); } else { NSLog(@"failed to start watch app: %@", error); } }];
I get this error:
I can't find anything about this particular error anywhere. And I have no idea how to troubleshoot it.failed to start watch app: Error Domain=com.apple.healthkit Code=550 "No PluginKit or application proxy available for com.beliefengine.healthkit.watchkitapp.watchkitextension" UserInfo={NSLocalizedDescription=No PluginKit or application proxy available for com.beliefengine.healthkit.watchkitapp.watchkitextension}
Can you check if your extension has the WKBackgroundModes key in its Info.plist?
Checking the "Workout processing" checkbox under background modes capability for your extension should do it.
Checking the "Workout processing" checkbox under background modes capability for your extension should do it.