相关疑难解决方法(0)

iOS 9和iOS 10中的App Transport Security问题

Apple宣布NSAllowArbitraryLoads不会很快工作.因此,在iOS 10中,我在info.plist中有这个:

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>myAPIdomain</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
        <key>NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
    </dict>
Run Code Online (Sandbox Code Playgroud)

这适用于我在UIWebView中的API请求和内容.但是,在iOS9中,NSAllowsArbitraryLoadsInWebContent不受支持,建议包括NSAllowsArbitraryLoadsiOS 9支持.但我认为这会覆盖我的NSExceptionDomains设置?如何在iOS 9和iOS 10上为我的API和UIWebView提供HTTP请求仍然可以遵循Apple的规则?

编辑

支持iOS 9和iOS 10:

<key>NSAppTransportSecurity</key>
        <dict>
            <key>NSExceptionDomains</key>
            <dict>
                <key>myAPIdomain</key>
                <dict>
                    <key>NSIncludesSubdomains</key>
                    <true/>
                    <key>NSExceptionAllowsInsecureHTTPLoads</key>
                    <true/>
                </dict>
            </dict>
            <key>NSAllowsArbitraryLoadsInWebContent</key>
            <true/>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
        </dict>
Run Code Online (Sandbox Code Playgroud)

ios

6
推荐指数
1
解决办法
5552
查看次数

如何在iPad中获得实际的PDF页面大小?

如何在iPad中获取PDF页面宽度和高度?有关如何查找此信息的任何文件或建议?

pdf iphone core-graphics cgpdfdocument ipad

5
推荐指数
2
解决办法
8571
查看次数

标签 统计

cgpdfdocument ×1

core-graphics ×1

ios ×1

ipad ×1

iphone ×1

pdf ×1