Xcode7需要注意的地方

来源:互联网 发布:jbf_11sf编程 编辑:程序博客网 时间:2024/06/01 23:04

下面收集到的是个人首次使用Xcode7时碰到的问题:

1.新装的Xcode7 编译程序 出现 #warning: 获取app配置信息失败: The resource could not be loaded because the App Transport Security

这是因为Xcode将以往HTTP协议强制改为HTTPS协议,以后的APP应该都是了,根本解决办法 改协议,临时解决办法在Info.plist中添加  NSAppTransportSecurity 类型  Dictionary 再在Dictionary 下添加  NSAllowsArbitraryLoads 类型Boolean ,值设为  YES。

2.以前的项目 放到Xcode7中运行时可能会遇到以下错误:You must rebuild it with bitcode enabled (Xcodesetting ENABLE_BITCODE)

未来Watch应用须包含Bitcode,iOS不强制,但Xcode7默认会开启Bitcode。

方法一:更新library使包含Bitcode,否则会出现以下中的警告;

<code class="hljs livecodeserver has-numbering"><span class="hljs-number">1</span>(<span class="hljs-constant">null</span>): 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 <span class="hljs-keyword">without</span> bitcode. You must rebuild <span class="hljs-keyword">it</span> <span class="hljs-operator">with</span> bitcode enabled (Xcode setting ENABLE_BITCODE), obtain <span class="hljs-operator">an</span> updated library <span class="hljs-built_in">from</span> <span class="hljs-operator">the</span> vendor, <span class="hljs-operator">or</span> disable bitcode <span class="hljs-keyword">for</span> this target. Note: This will be <span class="hljs-operator">an</span> error <span class="hljs-operator">in</span> <span class="hljs-operator">the</span> future.</code><ul style="display: block;" class="pre-numbering"><li>1</li><li>2</li></ul>

方法二:关闭Bitcode

工程设置中 buildingsetting 中搜索bitcode 选择no

了解更多关于bitcode 可以去这个 http://www.cocoachina.com/ios/20150817/13078.html





(菜鸟文章,个人学习,知识共享,仅供参考,如有雷同,纯属巧合)


1 0