iOS NSAppTransportSecurity
See original GitHub issueHey there,
Im getting a networking error when trying to upload to S3 from my react-native
app running on my device.
Error
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)
From Googling around there are suggestions to add the AWS domains to the NSExceptionDomains
in the info.plist
. Ive tried the following xml
in the plist
but am still experiencing the same issue.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>amazonaws.com</key>
<dict>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>amazonaws.com.cn</key>
<dict>
<key>NSThirdPartyExceptionMinimumTLSVersion</key>
<string>TLSv1.0</string>
<key>NSThirdPartyExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSTemporaryExceptionMinimumTLSVersion</key>
<string>1.0</string>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
What NSAppTransportSecurity
do you use for uploading to S3?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
NSAppTransportSecurity | Apple Developer Documentation
NSAppTransportSecurity. A description of changes made to the default security for HTTP connections. iOS 9.0+ iPadOS 9.0+ macOS 10.11+ ...
Read more >How can I add NSAppTransportSecurity to my info.plist file?
App Transport Security, or ATS, is a feature that Apple introduced in iOS 9. When ATS is enabled, it forces an app to...
Read more >App Transport Security | CodePath iOS Cliffnotes
In iOS 9, Apple introduced "App Transport Security," or ATS. ... You can poke holes in ATS by adding a NSAppTransportSecurity dictionary to...
Read more >Guide to iOS App Transport Security (ATS) - NowSecure
A security analyst's guide to NSAppTransportSecurity, NSAllowsArbitraryLoads, and App Transport Security (ATS) exceptions.
Read more >App Transport Security | iOS - Google Developers
plist file to disable ATS restrictions. <key>NSAppTransportSecurity</key>
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@benjreinhart so I fixed the issued I was experiencing.
This error:
Was due to an untrusted local react-native server development certificate:
To which there is an advised:
Solution Repo
@phoenixbox very nice, thank you for the detailed follow up!