From the course: Advanced iOS Development: Keychain Access

Unlock the full course today

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

Challenge: Update and delete keychain items

Challenge: Update and delete keychain items - iOS Tutorial

From the course: Advanced iOS Development: Keychain Access

Start my 1-month free trial

Challenge: Update and delete keychain items

(upbeat music) - [Instructor] Okay are you ready for your last challenge? So this is kind of a two-parter because they're a little bit smaller. I want you to update and delete items in the keychain. So on line 138 is where we handle the delete from the table view. We're going to remove it from the array of notes. I also want you to remove it from the keychain. And then the other places where we want to update the note, this is on line 64 where we have a selected index path. This means the user selected an item in the table view and now they want to update it. Now notice what I do here is I'm just replacing the note in the array with a brand new note. That means a brand new UUID string. So that's a little bit tricky. So depending on how you want to do it you could delete the old note and add a new note to the keychain or update the existing note. But you would have to use the existing UUID string. So write two different…

Contents