WatchKit companion app: No PluginKit or application proxy available

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:
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:

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}

I can't find anything about this particular error anywhere. And I have no idea how to troubleshoot it.

Answered by Frameworks Engineer in 659734022
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.
Accepted Answer
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.
That did it! I... never would've guessed that, from the error.
WatchKit companion app: No PluginKit or application proxy available
 
 
Q