Fengson
Fengson

Reputation: 4912

Xcode 7 Playground error: invalid context 0x0

I am having this error in debug area, even when my playground file is empty:

Sep 23 11:03:50 MyPlayground[68315] : CGContextSaveGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

Sep 23 11:03:50 MyPlayground[68315] : CGContextTranslateCTM: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

Sep 23 11:03:50 MyPlayground[68315] : CGContextRestoreGState: invalid context 0x0. If you want to see the backtrace, please set CG_CONTEXT_SHOW_BACKTRACE environmental variable.

I've seen answers suggesting modifying plist file. However, I am using .playground file, not an ordinary iOS project. There is no plist file inside the .playground. Any sollutions?

I am using Xcode Version 7.0 (7A220).

Upvotes: 22

Views: 1959

Answers (2)

world
world

Reputation: 3952

This appears to be unrelated to your Xcode version as it happens to folks using 7.0 - 7.3. However, it does appear to be related to iOS version. This seems to be a 9.0 issue and upgrading your target to 9.1 or higher should fix it.

Apple reportedly knows about this bug and claimed it to be "fixed" as of 10/29/2015.

See here.

Upvotes: 1

kawabungajohn
kawabungajohn

Reputation: 341

Try going to your app-info.plist. Check thre UIViewControllerBasedStatusBarAppearance and delete it. This may help

Upvotes: -1

Related Questions