Xcode7的一些修改

昨天 xcode 升级为7之后,真机编译过不去,模拟器能编译过,编译不过,

方法一:更新library使包含Bitcode,否则会出现以下中的警告;

(null): URGENT: all bitcode will be dropped because ‘/Users/myname/Library/Mobile Documents/comappleCloudDocs/foldername/appname/GoogleMobileAds.framework/GoogleMobileAds(GADSlot+AdEvents.o)‘ was built without bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. Note: This will be an error in the future.
方法二:关闭Bitcode

工程设置中 buildingsetting 中搜索bitcode 选择no

另外 http 支持有问题,需要配置支持 http,

方式一: 使用文本编辑Info.plist, 在当中添加:


NSAppTransportSecurity

NSAllowsArbitraryLoads


方式二: 在Info.plist中添加:

以上两种方式所实现的效果是一致的, 但是并不严谨, 建议有选择的允许HTTP请求(这个操作方法与上文"方式一"相同):

NSAppTransportSecurity

NSExceptionDomains

域名.com


NSIncludesSubdomains


NSTemporaryExceptionAllowsInsecureHTTPLoads


NSTemporaryExceptionMinimumTLSVersion
TLSv1.1



当然, 以上方法都是建立在所访问的请求是HTTP类型的基础上, 一劳永逸的方法就是让服务端升级使用TLS 1.2 SSL加密请求的HTTPS协议.

服务器已支持TLS 1.2 SSL ,但iOS9上还是不行,还要进行链接里的适配操作。”那是因为:ATS只信任知名CA颁发的证书,小公司所使用的 self signed certificate,还是会被ATS拦截。对此,建议使用链接中给出的NSExceptionDomains,并将你们公司的域名挂在下面。

你可能感兴趣的:(Xcode7的一些修改)