10

I'm getting this error in the console for my watch app and I can't figure out what it's related to and haven't found any other posts or documentation about it. Anyone else know?

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

GarySabo
  • 5,806
  • 5
  • 49
  • 124
  • 1
    It started happening recently for me - maybe related to Xcode 9.2 update? It occurs when I call healthStore.requestAuthorization, but I don't know why. Other than the console log, I haven't seen any negative consequences. Maybe it's an Xcode bug since the call result is success and the error nil? – 19Craig Dec 06 '17 at 21:45
  • This came up for me in Xcode 9.1 as well. Does not do anything in my app either that I can tell but just making sure there's not something I'm not aware of. – GarySabo Dec 07 '17 at 03:16
  • Has anyone been able to resolve this issue? – Mike JS Choi Feb 16 '18 at 06:01
  • Since today I also have this issue when trying to `requestAuthorization` for my HealthStore... completion handler never gets called.. just the console log on Simulator and a crash on the device... but since debugging on a real AppleWatch never really works... without any hint... Any ideas anybody? – Georg Mar 30 '18 at 09:13

1 Answers1

1

This usually happens when the app is missing the following lines in the Info.plist file:

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

Open your Info.plist file on the Project navigator and make sure these are present on the iOS side (i.e. no need for these on the watchOS Info.plist files if you have them). Give them values that explain why your app needs access to that information, e.g. "MyApp needs this information to track your heart rate".

Also, make sure you have the HealthKit capability enabled for your project. To check if you have it on Xcode 10:

  1. Open the Project navigator in Xcode and select your project (usually the top level item)
  2. Select Capabilities
  3. Check if HealthKit is set to ON