zl程序教程

您现在的位置是:首页 >  其它

当前栏目

NSAllowsArbitraryLoadsInWebContent NSAllowsArbitraryLoads

2023-09-11 14:18:45 时间

By specifying NSAllowsArbitraryLoadsInWebContent, you are overriding NSAllowsArbitraryLoads on iOS 10.

In iOS 10 and later, and macOS 10.12 and later, the value of [the NSAllowsArbitraryLoads] key is ignored if any of the following keys are present in your app’s Info.plist file:

  • NSAllowsArbitraryLoadsForMedia
  • NSAllowsArbitraryLoadsInWebContent
  • NSAllowsLocalNetworking

Source: App Transport Security dictionary primary keys (Apple)

Additionally, the NSExceptionDomain dictionaries you have provided don't seem to match the current documented format. Specifically, the keys don't match:

  • NSTemporaryExceptionAllowsInsecureHTTPLoads should be NSExceptionAllowsInsecureHTTPLoads

  • NSTemporaryExceptionMinimumTLSVersion should be NSExceptionMinimumTLSVersion

  • NSTemporaryExceptionRequiresForwardSecrecy should be NSExceptionRequiresForwardSecrecy

https://stackoverflow.com/questions/40509013/app-transport-security-allow-arbitrary-load-not-working-after-upgrade-to-ios-10/40623879#40623879