iOS7: How to store a key / bool value in keychain
问题 I implement in-app purchases and all the products are non-consumable. My intention is to store bool values in the keychain for every product identifier, and later control the Core Data retrieves according to the stored bool values. My question is: How can I store key/bool values into the keychain? P.S: I use KeyChainItemWrapper. 回答1: Store it in form of NSNumber as it contains a special method + numberWithBool: to convert BOOL value to an object: [keychainItemWrapper setObject:[NSNumber