iOS 9 系统适配

本文深入探讨了SSL/TLS协议如何保护移动应用数据传输的安全性,以及Bitcode技术在iOS应用开发中的应用与适配策略,包括其原理、优势、常见问题及解决方法。

退回到http协议
在项目的info.plist中添加一个Key:NSAppTransportSecurity,类型为字典类型。
然后给它添加一个Key:NSAllowsArbitraryLoads,类型为Boolean类型,值为YES;
所有的信息明文传播,带来了三大风险:
1.窃听风险(eavesdropping):第三方可以获取通信内容
2.篡改风险 (tampering): 第三方可以修改通信内容
3.冒充风险 (pretending): 第三方可冒充他人身份进行通信
SSL/TLS协议为解决这三大风险所设计
1.所有的信息都是加密传播,第三方无法获取
2.具有校验机制,一旦被篡改,通信双方会发现
3.配备省份证书,防止身份被冒充。
//SSL/TLS协议的区别
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)
046.png
无论是警告还是错误,得到的信息是:我们引入的一个第三方库不包含bitcode。
方法二:关闭Bitcode
Build Settings 搜索 Bitcode   选项Enable Bitcode 设置为NO。
那么 SDK 厂商如何支持 bitcode 呢?答案是只要在 Xcode7上重新编译一下就 ok 了。(请确保默认开启的 bitcode 没有去主动关闭)


评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值