Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keychain Sharing not working between two apps? #196

Open
RPiyush opened this issue Jun 25, 2018 · 1 comment
Open

Keychain Sharing not working between two apps? #196

RPiyush opened this issue Jun 25, 2018 · 1 comment

Comments

@RPiyush
Copy link

RPiyush commented Jun 25, 2018

Hi have to share keychain between my two apps, for this I have tried following with Locksmith:

  1. Enable Keychain sharing in capabilities.
  2. Added common group name TestKeychainGroup.
  3. Saved my data with Key MyteamID.TestKeychainGroup. It saved success
  4. Now when i tries to retrieve saved data from keychain with key MyteamID.TestKeychainGroup it is giving nil.

Can anybody tell me, what I forgot to do or it is not supported by Locksmith. Thanks

@tosbaha
Copy link

tosbaha commented Nov 22, 2018

If you are using default LockSmith setup then your service is setup with this code

public let LocksmithDefaultService = Bundle.main.infoDictionary![String(kCFBundleIdentifierKey)] as? String ?? "com.locksmith.defaultService"

It means it is getting the service name from kCFBundleIdentifierKey which is different for every app and extension. You must set it to same value either editing the source code of LockSmith.swift or using long notation by explicitly setting the service in the function calls. I also made the same mistake and wasted an hour lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants