In this video, learn how to enhance the wrapper with a new method to remove existing items from the keychain.
- [Instructor] We can avoid the duplicate item error…upon adding an item to the key chain…by removing it if it already exists.…So, let's add a new method through…the key chain facade class.…I'm going to switch to our key chain facade file.…Let's make some place here…and let's add a new method called remove string.…I'm going to make it public too.…The method has a single argument of type string.…This is the unique identifier of the item…we want to delete from the key chain.…
I mark the method as throw able…since removing an item from the key chain…might fail for various reasons.…Let me scroll up a bit.…Next, we'll validate the key.…I'm going to use the guard statement.…The key shouldn't be empty.…As I print a warning message…and throw a key chain facade error.…The message is key must be valid…and I throw an error of type invalid content.…
If everything goes well and our key is valid…we can use the set item delete function to delete the item.…This function takes a query dictionary…with the attributes of the item to be deleted.…
Author
Released
10/26/2018- Encryption, code signing, and sandboxing
- Preventing pasteboard leakage with and without coding
- Working with the keychain
- File data protection
- Securing apps using biometrics
- Implementing Touch ID and Face ID
- Performing asymmetric encryption and decryption
Skill Level Intermediate
Duration
Views
-
Introduction
-
Keeping your apps secure1m 13s
-
What you should know1m 21s
-
-
1. iOS Security Fundamentals
-
Security in iOS1m 2s
-
The Secure Boot1m 34s
-
Touch ID and Face ID1m 42s
-
Code signing1m
-
Sandboxing53s
-
User privacy41s
-
-
2. User Data Protection
-
Purpose strings2m 7s
-
The pasteboard spy app2m 24s
-
Hacking the UserDefaults4m 40s
-
-
3. The Keychain
-
Using the Keychain wrapper4m 31s
-
4. File Data Protection
-
5. Securing Apps Using Biometrics
-
Implementing Touch ID2m 51s
-
Implementing Face ID4m 57s
-
-
6. Cryptographic APIs/Interfaces
-
Creating the private key5m 49s
-
Conclusion
-
Next steps50s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Removing items from the Keychain