How to see the keychain for iphone simulator

2020-05-19 02:52发布

问题:

I have developed an iPhone application in which I am encrypting and decrypting data using public and private key. I want to see this keys in the Keychain. I got the keychain entry for mac applications under Applications/utilities, but what is the location for iPhone simulator Keychain and Keychain for iPhone OS itself on device.

回答1:

The iPhone simulator keychain is stored in ~/Library/Application Support/iPhone Simulator/<Version Number>/Library/Keychains/ and is in sqlite3 DB format. The location of the file on the device itself is unimportant, as you can only access it through the keychain API (but a path with a few similarities to the simulator path wouldn't surprise anyone).



回答2:

You must acces the keychain through the keychain API, just like explained in this example.