升级iOS10和Xcode8遇到问题以及解决办法

来源:互联网 发布:高校 人工智能专业 编辑:程序博客网 时间:2024/04/27 19:27

1、iOS10 隐私权限问题 闪退 崩溃:

***This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

 

2、使用Xcode8的同学应该发现以往习惯command+/来快捷注释代码 的功能失效了!这个是因为苹果解决xcode ghost,把插件屏蔽了。解决方法

命令运行:  sudo /usr/libexec/xpccachectl ,重启Mac或Xcode后生效

3、控制台输出各种⚠警告,看不懂

(1)、打开Product ---> Scheme ---> Edit Scheme


(2)、选择 RUN ---> Evironment Variables


添加键值对 : OS_ACTIVITY_MODE   disable

4、Xib文件的注意事项

使用Xcode8打开xib文件后,会出现下图的提示。


大家选择Choose Device即可。
之后大家会发现布局啊,frame乱了,只需要更新一下frame即可。如下图


注意:如果按上面的步骤操作后,在用Xcode7打开Xib会报一下错误,

解决办法:需要删除Xib里面
  • <span style="background-color: rgb(255, 255, 255);"><code class="xml" style="padding: 0px; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px; background-color: transparent; border: none;"><span class="hljs-tag" style="color: rgb(0, 102, 102);"><<span class="hljs-title" style="color: rgb(38, 139, 210);">capability</span> <span class="hljs-attribute" style="color: rgb(181, 137, 0);">name</span>=<span class="hljs-value" style="color: rgb(42, 161, 152);">"documents saved in the Xcode 8 format"</span> <span class="hljs-attribute" style="color: rgb(181, 137, 0);">minToolsVersion</span>=<span class="hljs-value" style="color: rgb(42, 161, 152);">"8.0"</span>/></span></code></span>
    这句话,以及把< document >中的toolsVersion和< plugIn >中的version改成你正常的xib文件中的值



2 0
原创粉丝点击