How to solve this error with healthkit?

后端 未结 6 1007
臣服心动
臣服心动 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:17

    I spent 3 days trying to figure out what was the problem. I found the solution with those steps:

    1. First go to the project (As I show in the image)
    2. Open projects and target lists
    3. Select nameApp WatchKit Extension
    4. Go to Capabilities tab, press on in Health Kit and voila... it is working for me.

    I am using iOS 9.3.2 and Xcode 7.3.1

提交回复
热议问题