From the course: iOS Development: Security

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Adding the missing purpose string

Adding the missing purpose string - iOS Tutorial

From the course: iOS Development: Security

Start my 1-month free trial

Adding the missing purpose string

- [Instructor] Now, let's switch to the project navigator. First let's stop the simulation. And here I'm going to select the app. So let's fix the issue by adding the missing Oracle string. We need to add the NSHealthShareUsageDescription to the apps info.plist as instructed in the console. So let's copy the string. And now I'm going to switch to the app, created the info tab, and let's add a new key. And the key has been translated instantly to this description. Now I also need to add a required description. How about the app needs to access step count data to display statistics. Now, I run the app again. And here's what we got. After enabling steps switch, we can hit the allow button. The system allows the app to receive the step count. Users may also decide to press the don't allow button. If that happens, they won't be prompted again when using the app. Upcoming calls to request permission returns success and the error will be nil. However, all attempts to retrieve the step count…

Contents