keychain-swift icon indicating copy to clipboard operation
keychain-swift copied to clipboard

Not working with accessGroup

Open unixb0y opened this issue 5 years ago • 1 comments

Somehow, if I try to use the accessGroup feature, I get an errSecMissingEntitlement (-34018) error.
I don't have manual profiles, but use "Xcode Managed Profile" for the Provisioning Profile. ("Automatically manage signing").
I activated "Keychain Sharing" in "Capabilities" and added "com.myname.appname.keychainGroup" which is how I initialise my KeychainSwift object:

let keychain: KeychainSwift = {
    let k = KeychainSwift(keyPrefix: "unixb0y_")
    k.accessGroup = "com.myname.appname.keychainGroup"
    return k
}()

FYI, also in the entitlements file, there is an entry with the correct name.

unixb0y avatar Mar 29 '19 13:03 unixb0y

Weird, if I remove the k.accessGroup stuff, my App's share extension actually grabs the key that was set from the main App. At least it works LOL

unixb0y avatar Mar 29 '19 14:03 unixb0y