How can I add NSAppTransportSecurity to my info.plist file?

前端 未结 14 1299
野趣味
野趣味 2020-11-22 12:48

https://developer.apple.com/videos/wwdc/2015/?id=711 @5:55

I can\'t seem to be able to add this to my info.plist. There is no value it. I\'m running XCode Version 7.

相关标签:
14条回答
  • 2020-11-22 13:45

    Open your info.plist file of your project with any editor of your preference, then add this code at the end of the file before the last

    <key>NSAppTransportSecurity</key>
    <dict>
       <key>NSAllowsArbitraryLoads</key>
    <true/>
    </dict>
    
    0 讨论(0)
  • 2020-11-22 13:46
    <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>uservoice.com</key>
                <dict>
                    <key>NSIncludesSubdomains</key>
                    <true/>
                    <key>NSExceptionRequiresForwardSecrecy</key>
                    <false/>
                </dict>
            </dict>
        </dict>
    
    0 讨论(0)
提交回复
热议问题