问题
I am not able to get data in extension using Keychain Access.
What did I do ?
- I have enabled the keychchain sharing capabilities in both the targets and gave the same identifier.
I have initialized the Keychain like this:
static let keychain = Keychain(service: "teamID.com.appname.ios.sharedKeychain", accessGroup: "teamID.com.appname.ios.sharedKeychain")
I have also tried with just service/access group while initializing.
Error in extension ?
OSStatus error:[-25291] No keychain is available. You may need to restart your computer.
Xcode 11.3.1, Swift: 5
What is the problem in this approach ? There are many questions regarding sharing data between App and extension but still I am not able to find what's missing.
Note: This code works well on simulator. Thanks.
来源:https://stackoverflow.com/questions/60126864/sharing-keychain-data-between-app-and-extension