Adding Items to and Querying the iOS Keychain with Swift
I'm having trouble converting all of the Objective C code samples that are available for adding data and querying data from the iOS Keychain into Swift . I'm trying to do a basic storage of a string (an access token) and reading it back. I've had a look at some of the other questions on Stack Overflow, but I can't quite get it to work. I've tried to piece together a solution from the various sources. Edit 1: I tried with a more basic setup, because I thought my self.defaultKeychainQuery might have been messing things up. I've updated the code below to the latest version. Edit 2: Got it working