(1)本来用户登陆一点问题没有,可是更新到Xcode7就出现以下的问题:html
这是使用AFNetworking访问网络失败的提示信息:ios
Error Domain=NSURLErrorDomain Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection." UserInfo={NSUnderlyingError=0x7fec987f84d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1022 "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection."xcode
解决方法:安全
Google后查证,iOS9引入了新特性App Transport Security (ATS)
。详情:App Transport Security (ATS)网络
新特性要求App内访问的网络必须使用HTTPS
协议。
可是如今公司的项目使用的是HTTP
协议,使用私有加密方式保证数据安全。如今也不能立刻改为HTTPS
协议传输。app
①在Info.plist中添加NSAppTransportSecurity
类型Dictionary。
ui
②在NSAppTransportSecurity
下添加NSAllowsArbitraryLoads
类型Boolean
,值设为YES
this
(2)加密
使用xcode7运行以前的项目,报错:.net
ld: '/Users/mymac/Documents/iOS_Programs/zhidingkuai/zhidingkuai/Other/AliPay_SDK/AlipaySDK.framework/AlipaySDK' 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
解决:
因为Xcode自身的一些小问题,运行项目时一直报错 错误1的内容.而后我就检查项目友盟这个库的依赖呀.很是确定的确认库已经导入并且在连接的二进制库里面.(就是build phases里面).而后就不断的从新导入clean了好屡次仍是不行.而后我就崩溃了.. 后来把Xcode重启再次运行真正的错误终于浮出水面(毕竟Xcode是beta版).就是错误2的内容.原来是友盟的二进制库不支持bitcode.而Xcode默认是要支持bitcode的,并且若是支持的话,其中全部的二进制库和framework都必须包含bitcode.至于什么是bitcode,请看这里: http://blog.csdn.net/soindy/article/details/48518717
如今咱们把bitcode关掉:
(3)
”xxxxxxx“ is locked for editing and you may not be able to save your changes. Do you want to unlock it?
The file “project.pbxproj” could not be unlocked.
Could not add write permission to the file because you do not own it. Try modifying the permissions of the file in the Finder or Terminal。
解决:找到项目的文件夹,右击鼠标->”显示简介”