You must enable keychain sharing to use AirWatch SDK for iOS (Swift) features. View some common issues with setting keychain sharing and their solutions.
Disabled Keychain Sharing
The SDK cannot initialize because the keychain-saves cannot happen.
Enable keychain sharing by signing the application with the keychain access group.
Applications in a keychain access group cannot share passcodes or data if they have different prefixes. The system treats the different prefixes as separate clusters.
Edit the prefixes for applicable applications on the Apple Developer portal. However, before you change prefixes, ensure you do not need the data stored with the older prefix. This older data is lost when the prefix changes.
Different Keychain Access Groups
Applications with the same prefix cannot share passcodes or data if they are in different keychain access groups. The system treats the different groups as separate clusters.
Ensure that the applicable keychain access groups have enabled keychain sharing.
Merging applications from different groups that use the same account and service names can result in data collisions. Check for the listed situations to prevent collisions.
- The kSecAttrAccessGroup attribute is one of the required attribute that can uniquely identify the item stored or retrieved from the keychain.
- All other attributes, for example kSecAttrAccount and kSecAttrService, that uniquely identify the item stored and retrieved are the same.
- The kSecAttrAccessGroup attribute is not specified in the actual query to store and retrieve from the keychain.
For information on how to sign the application for keychain sharing, see Keychain Access Group and Entitlements. For the procedure to enable keychain sharing for applications with the same prefix and keychain access groups, see Enable Keychain Sharing for SDK Applications.
See Apple documentation for more information on entitlements and keychains at the listed sites.