Hangs with sprite kit in message extension

Hi,


I am having some issues with hangs when transitioning between expanded and compact mode in my messages extension which uses sprite kit. When I get the hang hitting pause in the debugger will unblock it. It has been fairly sporadic but today I have been getting it constantly and have managed to produce a very minimal example - taking the message extension sample I just import SpriteKit and add the following to willBecomeActive:


let skView = SKView()

skView.frame = view.frame

view.addSubview(skView)


I am testing in the simulator and this produces the hang pretty much every time i try to transition from expanded to compact mode.


Does anyone have any ideas what is going wrong here?


Many thanks!


Neil.

So to answer my own question after having a dig through the SKView header to see if there was anything that I could try changing I discovered 'isAsynchronous' - and indeed setting this to false seems to have solved this issue for me

Hangs with sprite kit in message extension
 
 
Q