項目運行在ios9上需要在info.plist文件中配置加入如下信息,
App Transport Security Settings
Allow Arbitrary Loads = YES
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
設置 UserAgent(用戶代理)
用戶代理: 把硬件的一些信息告訴瀏覽器
// 注冊代理, 在某些情況點擊菜單沒有交互, 不妨設置看看
[self.yourSite setValue:@"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C)" forKey:@"applicationNameForUserAgent"];
如果在ios9上也可以這么設置,不過只能用再ios 9及以上的系統當中
if ([[[UIDevice currentDevice] systemVersion] isEqual: @"9.0"]) { self.yourSite.customUserAgent = @"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C)"; }