ContainerAppExtensionEntitlementsWithCompletion with error: (null)

I get this error in the console for my watch application, and I can’t understand what this refers to, and did not find any other messages or documentation about it. Does anyone else know?

Full message: 2017-12-02 18: 31: 01.379382-0500 Watch Extension [1308: 33925] [default] containerAppExtensionEntitlementsWithCompletion: with error: (null)

+10
source share
2 answers

This usually happens when the application does not have the following lines in the Info.plist file:

  • Privacy - Health Update Usage Description
  • Privacy - Health Share Usage Description

Open the Info.plist file in the project navigator and make sure that they are present on the iOS side (i.e., they are not needed in watchOS Info.plist files, if you have any). Give them values ​​that explain why your application needs access to this information, for example, "MyApp needs this information to track your heart rate."

Also make sure you have the HealthKit feature enabled for your project. To check if you have this on Xcode 10:

  1. Open the project navigator in Xcode and select your project (usually a top-level item)
  2. Choose features
  3. Check if HealthKit is set to ON
+1
source

For me, this error occurs only in the simulator. I suggest you try the real device

0
source

Source: https://habr.com/ru/post/1273819/


All Articles