Xcode问题集锦

Xcode8适配 iOS10新特性

2017-04-17  本文已影响15人  三秋树下

1.Xcode8 :关闭烦人的log日志

解决方式:Xcode ->Product-> Scheme->Edit Scheme中配置OS_ACTIVITY_MODE为disable
不再爱烦人的 log

2.webView崩溃

-(void)webView:(UIWebView *)webView didFailLoadWithError:(nullable NSError *)error

解决方式:删除NSError前面的 nullable

3.ATS

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.

解决方式:容许支持Http 传输方法
<key>NSAppTransportSecurity</key>
    <dict>
<key>NSAllowsArbitraryLoads</key>
      <true/></dict>

** NSAppTransportSecurity ——选择AllowArbitrary Loads(容许任意加载) 设置为 YES**

info.plist里添加 ATS支持

附上ATS的合理解释:http://my.oschina.net/vimfung/blog/494687

4.推送失败

场景:Xcode7.3升级Xcode8后推送失败

Not get deviceToken yet. Maybe: your certificate not configured APNs? or current network is not so good so APNs registration failed? or there is no APNs register code? Please refer to JPush docs.

原因:Xcode8推送默认是关闭的需要手动开启
大家好!我是推送助理:Push Notifications

5.权限配置问题

场景:Xcode8访问媒体库crash

Crash ceason:

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

解决方式:info.plist添加NSAppleMusicUsageDescription
info.plist 权限访问设置

未完待续...

上一篇下一篇

猜你喜欢

热点阅读