zoukankan      html  css  js  c++  java
  • 更新到Xcode7.0后遇到的问题

    (1)原本用户登录一点问题没有,但是更新到Xcode7就出现如下的问题:

    这是使用AFNetworking访问网络失败的提示信息:

    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."

    解决方法:

    Google后查证,iOS9引入了新特性App Transport Security (ATS)。详情:App Transport Security (ATS)

    新特性要求App内访问的网络必须使用HTTPS协议。
    但是现在公司的项目使用的是HTTP协议,使用私有加密方式保证数据安全。现在也不能马上改成HTTPS协议传输。

    ①在Info.plist中添加NSAppTransportSecurity类型Dictionary。

    ②在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES

    (2)

    使用xcode7运行之前的项目,报错:

    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。

    解决:找到项目的文件夹,右击鼠标->”显示简介”

  • 相关阅读:
    nginx文件类型错误解析漏洞
    js 获取URL中的参数并转换为对象
    postman
    php curl参数详解
    php 两变量值互换 方法
    PHP 命名空间与spl_autoload_register() 自动加载机制
    php命名大小问题
    PHP实现冒泡排序
    使用 PHPStorm + Xdebug 实现断点调试(二)
    TSPL学习笔记(2):过程和变量绑定
  • 原文地址:https://www.cnblogs.com/sugeladi/p/4886994.html
Copyright © 2011-2022 走看看