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.

Prevent pasteboard leakage without coding

Prevent pasteboard leakage without coding - iOS Tutorial

From the course: iOS Development: Security

Start my 1-month free trial

Prevent pasteboard leakage without coding

- [Instructor] Let's take a look at how to prevent Pasteboard data leakage. So, here's our Pasteboard app. The easiest way to avoid sharing the password through the Pasteboard is promoting the text field to secure text entry. We can do that in the Attribute Inspector without coding. So I'm going to select the Password field, and let's scroll down, and set it as a Secure Text Entry. I leave the second Password text field as it is. Now, let's run the demo. I'm going to enter my super secret password, and let's try to copy it. I can select all, but Copy is unavailable. We can only use the Paste function. The new setting prevents the Copy and Cut functions. Besides, the password isn't displayed in plain text. However, this approach doesn't work in all situations. We may need to copy and paste sensitive data within our app without allowing other apps to access the shared data. So, let's see how to do that next.

Contents