From the course: iOS Development: Security
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Purpose strings - iOS Tutorial
From the course: iOS Development: Security
Purpose strings
- [Instructor] All right, let's get started by requesting authorization to access some protected resources. We do that by adding special keys called purpose strings to the app's info property list. For each key, there needs to be a comment that explains why the app needs to access the data and how it intends to use it. For example, if we need to access the iPhone's camera, we'd add an entry like the following. Here you can see the comprehensive list of purpose strings and the various APIs to creating the authorization status for accessing the given resources. All right, let's switch to Xcode and build authorization check into our app. I've gone ahead and created a basic app called HealthApp. It's a single-view app that should show the step count for the current day. If you want to follow along with me, you can find the project in the exercise files folder. Chapter two, two one, begin. The interesting part is in the View Controller. HealthKit may not be available on the user's device…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Purpose strings2m 7s
-
(Locked)
Request authorization for system features4m 7s
-
(Locked)
Adding the missing purpose string1m 34s
-
Exposing sensitive data through copying and pasting2m 16s
-
(Locked)
The pasteboard spy app2m 24s
-
(Locked)
Prevent pasteboard leakage without coding1m 11s
-
(Locked)
Prevent pasteboard leakage with coding2m 11s
-
(Locked)
Using an app-specific pasteboard5m 33s
-
(Locked)
Data leakage through app screenshots2m 16s
-
(Locked)
Clearing data before moving to the background3m 7s
-
(Locked)
Obscuring the snapshot before moving to the background3m 30s
-
(Locked)
Hacking the UserDefaults4m 40s
-
(Locked)
-
-
-
-
-