The resource could not be loaded because the App Transport Security policy requires the use of a secure connection

前端 未结 21 1627
醉酒成梦
醉酒成梦 2020-11-22 11:37

I am facing the Problem when I have updated my Xcode to 7.0 or iOS 9.0. Somehow it started giving me the Titled error

\"The resource could not be load

21条回答
  •  伪装坚强ぢ
    2020-11-22 12:20

    Transport security is provided in iOS 9.0 or later, and in OS X v10.11 and later.

    So by default only https calls only allowed in apps. To turn off App Transport Security add following lines in info.plist file...

    NSAppTransportSecurity
      
        NSAllowsArbitraryLoads
        
      
    

    For more info:
    https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33

提交回复
热议问题