1
votes

I had distributed an application in appstore with enabling the Keychain sharing by adding the Keychain Entitlement file.Initially, I thought to have two application sharing the same keychain but later I had only one application.Although keychain shared access is enabled in General capabilities in XCode and Entitlement file is added in code signing entitlements,I set nil value to access group in KeychainItemWrapper class as illustrated below.

KeychainItemWrapper *keychainWrapper = [[KeychainItemWrapper alloc]initWithIdentifier:KEYCHAIN_IDENTIFIER_NAME accessGroup:nil];

In the next release, I removed the Keychain Entitlement file and code signing entitlement as i felt its unnecessary but now the application is not able to access the previous version keychain item and returns null value.

  1. Please explain me this strange behavior as in both version the access group is always set to nil.

  2. Also explain the keychain structure enabling and disabling Keychain sharing.

1

1 Answers

0
votes

If nil value is passed for KeychainBundleIdntifier then it will take the value of Bundle Identifier for a shared keychain the value would be shared keychain identifier in keychain entitlements.plist