The iOS Keychain Services Programming Guide (https://developer.apple.com/library/ios/documentation/Security/Conceptual/keychainServConcepts/iPhoneTasks/iPhoneTasks.html) was last edited 2012-06-11. As you probably realised, Listing 3-1, titled "Getting and setting passwords in iOS Keychain Services" contains sample code that has not been migrated to ARC. I found it confusing and a little difficult to understand, so I migrated the code and incorporated it into a sample app.