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 没有去主动关闭)
退回到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 没有去主动关闭)
相关文章推荐
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 峰回路转,Firefox 浏览器即将重返 iOS 平台
- 不可修补的 iOS 漏洞可能导致 iPhone 4s 到 iPhone X 永久越狱
- iOS 12.4 系统遭黑客破解,漏洞危及数百万用户
- 每日安全资讯:NSO,一家专业入侵 iPhone 的神秘公司
- [转][源代码]Comex公布JailbreakMe 3.0源代码
- js判断客户端是iOS还是Android等移动终端的方法
- IOS开发环境windows化攻略
- .net平台推送ios消息的实现方法
- 探讨Android与iOS,我们将何去何从?
- Android、iOS和Windows Phone中的推送技术详解
- IOS 改变键盘颜色代码
- 举例详解iOS开发过程中的沙盒机制与文件
- Android和IOS的浏览器中检测是否安装某个客户端的方法
- javascript实现阻止iOS APP中的链接打开Safari浏览器
- IOS开发第三方语音-微信语音
- iOS开发之路--微博OAuth授权_取得用户授权的accessToken
- 基于UIControl控件实现ios点赞功能
- iOS开发中实现邮件和短信发送的简单示例