您的位置:首页 > 移动开发 > IOS开发

iOS 9 系统适配

2015-10-09 17:00 411 查看


退回到http协议
在项目的info.plist中添加一个Key:NSAppTransportSecurity,类型为字典类型。
然后给它添加一个Key:NSAllowsArbitraryLoads,类型为Boolean类型,值为YES;
所有的信息明文传播,带来了三大风险:
1.窃听风险(eavesdropping):第三方可以获取通信内容
2.篡改风险 (tampering): 第三方可以修改通信内容
3.冒充风险 (pretending): 第三方可冒充他人身份进行通信
SSL/TLS协议为解决这三大风险所设计
1.所有的信息都是加密传播,第三方无法获取
2.具有校验机制,一旦被篡改,通信双方会发现
3.配备省份证书,防止身份被冒充。
//SSL/TLS协议的区别
http://kb.cnblogs.com/page/197396/
Bitcode
【前言】未来, Watch 应用必须包含 bitcode ,iOS不强制,Mac OS不支持。 但最坑的一点是: Xcode7 及以上版本会默认开启 bitcode 。

什么是 bitcode ?

通俗解释:在线版安卓ART模式。

Apple官方这样定义:

bitcode 是被编译程序的一种中间形式的代码。包含 bitcode 配置的程序将会在 App Store 上被编译和链接。 bitcode 允许苹果在后期重新优化我们程序的二进制文件,而不需要我们重新提交一个新的版本到 App Store 上。

在Xcode上的简介:

当我们提交程序到 App Store上时, Xcode 会将程序编译为一个中间表现形式( bitcode )。然后 App store 会再将这个 bitcode 编译为可执行的64位或32位程序。

Xcode 7 + 会开启 Bitcode。

两种方法适配:
1、更新Library使其包含Bitcode,否则出现警告:
(null): URGENT: all bitcode will be dropped because '/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/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.
报错:
ld: ‘/Users//Framework/SDKs/PolymerPay/Library/mobStat/libSDK.a(**ForSDK.o)’ does not contain 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. for architecture arm64
或:
ld: -undefined and -bitcode_bundle (Xcode setting ENABLE_BITCODE =YES) cannot
be used together clang: error: linker command failed with exit code 1 (use -v to see invocation)



无论是警告还是错误,得到的信息是:我们引入的一个第三方库不包含bitcode。
方法二:关闭Bitcode
Build Settings 搜索 Bitcode   选项Enable Bitcode 设置为NO。
那么 SDK 厂商如何支持 bitcode 呢?答案是只要在 Xcode7上重新编译一下就 ok 了。(请确保默认开启的 bitcode 没有去主动关闭)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  ios