{"action":"created","issue":{"url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/8","repository_url":"https://api.github.com/repos/benjreinhart/react-native-aws3","labels_url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/8/comments","events_url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/8/events","html_url":"https://github.com/benjreinhart/react-native-aws3/issues/8","id":165000601,"number":8,"title":"iOS NSAppTransportSecurity","user":{"login":"phoenixbox","id":2892213,"avatar_url":"https://avatars.githubusercontent.com/u/2892213?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixbox","html_url":"https://github.com/phoenixbox","followers_url":"https://api.github.com/users/phoenixbox/followers","following_url":"https://api.github.com/users/phoenixbox/following{/other_user}","gists_url":"https://api.github.com/users/phoenixbox/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixbox/subscriptions","organizations_url":"https://api.github.com/users/phoenixbox/orgs","repos_url":"https://api.github.com/users/phoenixbox/repos","events_url":"https://api.github.com/users/phoenixbox/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixbox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-12T06:03:02Z","updated_at":"2016-07-12T18:23:55Z","closed_at":null,"body":"Hey there,\r\n\r\nIm getting a networking error when trying to upload to S3 from my `react-native` app running on my device.\r\n\r\n#### Error\r\n```\r\nNSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9843)\r\n```\r\n\r\nFrom 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.\r\n\r\n```xml\r\n<key>NSAppTransportSecurity</key>\r\n<dict>\r\n  <key>NSAllowsArbitraryLoads</key>\r\n  <true/>\r\n  <key>NSExceptionDomains</key>\r\n  <dict>\r\n    <key>amazonaws.com</key>\r\n    <dict>\r\n      <key>NSThirdPartyExceptionMinimumTLSVersion</key>\r\n      <string>TLSv1.0</string>\r\n      <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>\r\n      <false/>\r\n      <key>NSTemporaryExceptionRequiresForwardSecrecy</key>\r\n      <false/>\r\n      <key>NSTemporaryExceptionMinimumTLSVersion</key>\r\n      <string>1.0</string>\r\n      <key>NSIncludesSubdomains</key>\r\n      <true/>\r\n      <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>\r\n      <true/>\r\n    </dict>\r\n    <key>amazonaws.com.cn</key>\r\n    <dict>\r\n      <key>NSThirdPartyExceptionMinimumTLSVersion</key>\r\n      <string>TLSv1.0</string>\r\n      <key>NSThirdPartyExceptionRequiresForwardSecrecy</key>\r\n      <false/>\r\n      <key>NSTemporaryExceptionRequiresForwardSecrecy</key>\r\n      <false/>\r\n      <key>NSTemporaryExceptionMinimumTLSVersion</key>\r\n      <string>1.0</string>\r\n      <key>NSIncludesSubdomains</key>\r\n      <true/>\r\n    </dict>\r\n  </dict>\r\n</dict>\r\n```\r\n\r\nWhat `NSAppTransportSecurity` do you use for uploading to S3?"},"comment":{"url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/comments/232135048","html_url":"https://github.com/benjreinhart/react-native-aws3/issues/8#issuecomment-232135048","issue_url":"https://api.github.com/repos/benjreinhart/react-native-aws3/issues/8","id":232135048,"user":{"login":"phoenixbox","id":2892213,"avatar_url":"https://avatars.githubusercontent.com/u/2892213?v=3","gravatar_id":"","url":"https://api.github.com/users/phoenixbox","html_url":"https://github.com/phoenixbox","followers_url":"https://api.github.com/users/phoenixbox/followers","following_url":"https://api.github.com/users/phoenixbox/following{/other_user}","gists_url":"https://api.github.com/users/phoenixbox/gists{/gist_id}","starred_url":"https://api.github.com/users/phoenixbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoenixbox/subscriptions","organizations_url":"https://api.github.com/users/phoenixbox/orgs","repos_url":"https://api.github.com/users/phoenixbox/repos","events_url":"https://api.github.com/users/phoenixbox/events{/privacy}","received_events_url":"https://api.github.com/users/phoenixbox/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T18:23:55Z","updated_at":"2016-07-12T18:23:55Z","body":"@benjreinhart Hey 👋 there, Im on `react-native 0.29`\r\n\r\nso I tried again, when `NSAppTransportSecurity` is empty then the Simulator cant connect to localhost so I added the selected fix to the `info.plist` which is\r\n\r\n```\r\n    <key>NSAppTransportSecurity</key>\r\n    <dict>\r\n        <key>NSExceptionDomains</key>\r\n        <dict>\r\n            <key>localhost</key>\r\n            <dict>\r\n                <key>NSTemporaryExceptionAllowsInsecureHTTPSLoads</key>\r\n                <false/>            \r\n                <key>NSIncludesSubdomains</key>\r\n                <true/>\r\n                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>\r\n                <true/>\r\n                <key>NSTemporaryExceptionMinimumTLSVersion</key>\r\n                <string>1.0</string>\r\n                <key>NSTemporaryExceptionRequiresForwardSecrecy</key>\r\n                <false/>\r\n            </dict>\r\n        </dict>\r\n    </dict> \r\n```\r\n\r\nWhen using that and the sample code, the error persists:\r\n\r\n```\r\n NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)\r\n```\r\n\r\nNot sure whats going on 😟 \r\n\r\nDo you happen to have a public repo RN app which uses your lib that you could share? I could clone and see if I can get to work on my local machine?"}}
{"actor":{"display_login":"phoenixbox"}}