“NSURLErrorDomain” - code: 18446744073709550594 Ajax call on Xcode 7

前端 未结 4 1118
清酒与你
清酒与你 2021-01-18 12:14

I am trying to make an asynchronous call from Xcode 7 as follows and I end up seeing this error \"NSURLErrorDomain\" - code: 18446744073709550594 This code was fine when I u

相关标签:
4条回答
  • @Zeuz10 You are right. The security in ios9 and later does not allow any http calls to be sent. To get around the problem, you need to update your Info.plist The instructions are given in this link

    http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

    Thank you Zeuz10 for giving me the necessary inputs

    0 讨论(0)
  • 2021-01-18 12:42

    this is just -999 , you can deal it with NSURLCancel

    0 讨论(0)
  • 2021-01-18 12:47

    Seems to be a bug, I work around it by keeping under https all requests, hits ios9.0 and 9.0.1 as far as I can tell although you need to allow the url exception as apple documentation suggest in the Info.plist

    ref. https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Security-Technote/

    0 讨论(0)
  • 2021-01-18 12:55

    I got this exact error code when trying to connect to a server with ancient TLS support. Workaround: add NSExceptionRequiresForwardSecrecy to the app's Info.plist:

    <key>NSExceptionDomains</key> 
    <dict>
      <key>MY_SERVER_DOMAIN</key>
      <dict>
        <key>NSExceptionRequiresForwardSecrecy</key>
        <false/>
      </dict>
      <!-- any other exceptions you may have -->
    </dict>
    
    0 讨论(0)
提交回复
热议问题