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

前端 未结 21 1966
醉酒成梦
醉酒成梦 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:29

    I have solved it with adding some key in info.plist. The steps I followed are:

    1. Opened my Project target's info.plist file

    2. Added a Key called NSAppTransportSecurity as a Dictionary.

    3. Added a Subkey called NSAllowsArbitraryLoads as Boolean and set its value to YES as like following image.

    Clean the Project and Now Everything is Running fine as like before.

    Ref Link: https://stackoverflow.com/a/32609970

    EDIT: OR In source code of info.plist file we can add that:

    NSAppTransportSecurity
        
            NSAllowsArbitraryLoads
            
            NSExceptionDomains
            
                yourdomain.com
                
                    NSIncludesSubdomains
                    
                    NSThirdPartyExceptionRequiresForwardSecrecy
                    
                
           
      
    

提交回复
热议问题