A Swift implementation of the KeychainItemWrapper from the Apple example.
- Drag and drop KeychainItemWrapper.swift into your Xcode project.
- All done
let keychainItemWrapper = KeychainItemWrapper(identifier: "identifier for this item", accessGroup: "access group if shared")
keychainItemWrapper["superSecretKey"] = "aSuperSecretValue"let keychainItemWrapper = KeychainItemWrapper(identifier: "identifier for this item", accessGroup: "access group if shared")
let superSecretValue = keychainItemWrapper["superSecretKey"] as String?
println("The super secret value is: \(sharedPassword)")Follow me on twitter @mcostea
KeychainItemWrapper.swift is released under the MIT license. See LICENSE for details.