How to solve this error with healthkit?

后端 未结 6 986
臣服心动
臣服心动 2021-02-04 20:04

I\'m adding code for healthkit in my ios Swift app, but I\'m getting an error...

 /* Ask for permission to access the health store */
override func viewDidAppear         


        
6条回答
  •  情书的邮戳
    2021-02-04 20:32

    Both of the above answers should be tried first. If however

    1. You're sure the capability has been activated
    2. You're confident your app id associated with your provisioning profile has healthkit turned on and matches the app's bundle id

    Then try and force the build to use that specific provisioning profile by selecting your target and going to

    build settings -> code signing -> provisioning profile

    and selecting it manually.

    I've run into cases where get the above error in debug if 'automatic selection' is being used

提交回复
热议问题