当前位置: 移动技术网 > 移动技术>移动开发>IOS > Xcode8、iOS10升级问题记录

Xcode8、iOS10升级问题记录

2019年07月24日  | 移动技术网移动技术  | 我要评论

1、webview的代理方法:

  升级前: - (void)webview:(uiwebview *)webview didfailloadwitherror:(nullable nserror *)error

  升级后: - (void)webview:(uiwebview *)webview didfailloadwitherror:(nserror *)error

  要删除nserror前面的 nullable,否则报错。

2.关于触屏事件的一些操作:

  升级前: - (void)touchescancelled:(nullable nsset<uitouch *> *)touches withevent:(nullable uievent *)event

  升级后: - (void)touchescancelled:(nsset<uitouch *> *)touches withevent:(uievent *)event

  此处也是修饰词更改即可。

3、运行工程,控制台输出许多无关日志,去掉的方法:

  edit scheme -> run -> arguments, 在environment variables里边添加 os_activity_mode = disable

  如果写了之后还是打印log,请重新勾选对勾,就可以解决了

4、注释快捷键⌘+/失效

  这个是因为苹果解决xcode ghost。把插件屏蔽了。

  解决方法:命令运行 sudo /usr/libexec/xpccachectl

  然后必须重启电脑后生效。

5.权限以及相关设置

  我们需要打开info.plist文件添加相应权限的说明,否则程序在ios10上会出现崩溃。注意,添加的时候,末尾不要有空格.

  麦克风权限:privacy - microphone usage description 是否允许此app使用你的麦克风?

  相机权限: privacy - camera usage description 是否允许此app使用你的相机?

  相册权限: privacy - photo library usage description 是否允许此app访问你的媒体资料库?

  通讯录权限: privacy - contacts usage description 是否允许此app访问你的通讯录?

  蓝牙权限:privacy - bluetooth peripheral usage description 是否许允此app使用蓝牙?

  语音转文字权限:privacy - speech recognition usage description 是否允许此app使用语音识别?

  日历权限:privacy - calendars usage description 是否允许此app使用日历?

  定位权限:privacy - location when in use usage description 我们需要通过您的地理位置信息获取您周边的相关数据

  定位权限: privacy - location always usage description 我们需要通过您的地理位置信息获取您周边的相关数据

  定位的需要这么写,防止上架被拒。

6.推送

  所有的推送平台,不管是极光还是什么的,要想收到推送,这个是必须打开的

  处理推送的代理方法也变化了

以上所述是小编给大家介绍的xcode8、ios10升级问题记录,希望对大家有所帮助

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网