From the course: iOS Development: Security
Unlock the full course today
Join today to access over 23,200 courses taught by industry experts.
Using an app-specific pasteboard - iOS Tutorial
From the course: iOS Development: Security
Using an app-specific pasteboard
- [Instructor] Another approach to prevent pasteboard data leakage is to use an app-specific pasteboard. This prevents sharing our application's sensitive data and it also gives us more control over what gets copied and pasted. Again, we start with the original Pasteboard project. If you want to follow along with me, you can find the project in the Exercise folder, Chapter 2, 02_08, begin. So let's switch to the AppDelegates source file. We create a custom pasteboard instance. I declare it as a static property. It's a variable and let's call it customPasteboard. To create a custom pasteboard I use the UIPasteboard initializer. The initializer requires a name of type UIPasteboardName, which can be initialized using a raw value that identifies the pasteboard. Raw value, and let's give it an identifier how about, CustomPasteboard. The create parameter is a Boolean value that indicates whether the pasteboard should be created if it doesn't exist already. I set it to true because we want…
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)
-
-
-
-
-