matthewpalmer/Locksmith

Any support for accessGroup ?

Opened this issue · 6 comments

Any support for accessGroup ?

Doubled. I'd like for this library to take advantage of Keychain Sharing.

Same here, I needed to share my user credentials between my app and the iMessage extension. Just opened a PR for it

There is support for accessGroup. SecureStorable defines an optional string: accessGroup. Providing a valid* accessGroup works out of the box.

*valid = "AppGroupID.SharedKeychainGroupName"

@clayellis an example would be great!

struct Auth: GenericPasswordSecureStorable, CreateableSecureStorable, ReadableSecureStorable, DeleteableSecureStorable {
    var account: String {
        return "someUsername"
    }

    var service: String {
        return "YourFantasticApp"
    }

    var accessGroup: String? {
        let appGroupID = "123456XARG" // Provided by Apple. Found in the developer portal.
        let sharedKeychainName = "keychain.com.org.shared" // Your custom keychain name.
        return appGroupID + "." + sharedKeychainName
    }

    var data: [String : Any] {
        // Custom representation of your data...
    }
}