Sign the app for distribution

Sign the application with your team signing identity. You might also need to add the entitlement for Keychain sharing to your application in Xcode.

For applications to access the device or simulator keychain (which the app uses to store credentials for libraries you might connect to), they must be signed with a team distribution signing identity. If you use a development signing identity, such as your Xcode personal team identity (which is provided by Xcode), you must also enable the keychain sharing entitlement under Capabilities for the project in Xcode.

If you forget to change these settings in the project, when you run the app on an iOS device or in the simulator, the app is unable to save credentials for libraries in the keychain. The side effect of this problem is you that are prompted multiple times for username and password.

The following three tasks, in order, describe preparing the app for distribution.