kishikawakatsumi / UICKeyChainStore

UICKeyChainStore is a simple wrapper for Keychain on iOS, watchOS, tvOS and macOS. Makes using Keychain APIs as easy as NSUserDefaults.
http://kishikawakatsumi.com
MIT License
3.09k stars 382 forks source link

share passport with different app #146

Open bidm opened 7 years ago

bidm commented 7 years ago

as we know iPhone use KeyChain can share data/passport in different apps ? UICKeyChainStore how ? thank you!

kishikawakatsumi commented 7 years ago

@bidm To share keychain items in your apps, enable keychain sharing in app capabilities. Then add the access group, use the access group when you save/load from keychain. Note: the access group includes your app ID prefix implicitly, so you need to specify like AB123CDE45.myKeychainGroup1 for access group.

See more details https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/AddingCapabilities/AddingCapabilities.html#//apple_ref/doc/uid/TP40012582-CH26-SW15

Tutorial: http://evgenii.com/blog/sharing-keychain-in-ios/