Greetings to our iOS developer community,
With the release of the iOS 9 platform, Apple now enforces App Transport Security (ATS). The endpoint (api.amazon.com) the Login with Amazon SDK interacts with to exchange information doesn’t conform to ATS yet (read more about ATS here).
Because of this, you may see the following error when integrating the Login with Amazon iOS SDK on the iOS 9 platform:
LoginWithAmazonSample43274:673998 CFNetwork SSLHandshake failed (-9824)
2015-10-14 11:30:17.756 LoginWithAmazonSample43274:673998 NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9824)
This can also cause your users to see the following error when attempting to Login with Amazon:
To prevent these errors, you will need to add an exception for api.amazon.com in your app’s property list by following the steps below:
With your project open, select the Supporting Files folder, then select the <project>-Info.plist file (where <project> is the name of your project). This should open the property list for editing:
- Make sure that none of the entries are selected. Then, from the main menu, click Editor, and Add Item. Enter or select NSAppTransportSecurity and press Enter.
- Expand NSAppTransportSecurity and, from the main menu, click Editor and Add Item. Enter or select NSExceptionDomains and press Enter.
- Expand NSExceptionDomains and, from the main menu, click Editor and Add Item. Enter api.amazon.com and press Enter.
- Expand api.amazon.com and, from the main menu, click Editor and Add Item. Enter NSExceptionRequiresForwardSecrecy and press Enter.
- Select NSExceptionRequiresForwardSecrecy and double-click under the Value column to add a value. Select a Type of Boolean and a Value of NO.
We’re working on a long term solution to comply with ATS in the future. Stay tuned for updates.
The Login with Amazon team.