迁移到iOS 9后,“无效上下文0x0" [英] 'invalid context 0x0' after Migration to iOS 9

查看:135
本文介绍了迁移到iOS 9后,“无效上下文0x0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将应用程序迁移到iOS 9,它可以照常运行,但有三条日志消息:

I've migrated the app to iOS 9, and it works as usually, but there three log messages:

<Error>: CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
<Error>: CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.
<Error>: CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

也许有助于Crashlytics发出的下一条消息是:

Maybe helps that the next message from Crashlytics is:

[Crashlytics:Crash] Warning: iOS 9 workaround for binary image loading issue in place.

有人知道如何解决吗?

推荐答案

当info.plist中有UIViewControllerBasedStatusBarAppearance的定义为false时,就会发生这种情况.

This happens when there is a definition of UIViewControllerBasedStatusBarAppearance with false in info.plist.

如果不需要此功能,可以在文件中手动将键<key>UIViewControllerBasedStatusBarAppearance</key>设置为true,或者将View controller-based status bar appearance选项从信息"更改为是".

If you don't need this you can set the key <key>UIViewControllerBasedStatusBarAppearance</key> to true in the file manually or change View controller-based status bar appearance option from Info to YES.

此外,我看到一些帖子指出此操作没有问题.据我所知,无法通过代码设置UIViewControllerBasedStatusBarAppearance,所以我想我们必须等到Apple解决此问题.您可以在此处找到更多的信息.

Also, I saw some posts that state there is no problem with this. As far as I know there's no way to set UIViewControllerBasedStatusBarAppearance from code, so I guess we'll have to wait until Apple will fix this issue. You can find more here.

后来看来iOS 9.1解决了这个遇到的错误.从最后一个稳定的Xcode开始,在iOS 9.1上运行不会导致任何错误,而9.0仍然存在上述问题.

Later It seems that iOS 9.1 solves this encountered errors. From last stable Xcode, running on iOS 9.1 result in no errors, while 9.0 still has the problems above.

这篇关于迁移到iOS 9后,“无效上下文0x0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆