Friday, 9 January 2015

Using SceneKit in Swift playground for the first time

Happy 2015 everyone!

Was playing with "SceneKit in Swift playground" for the first time by following David's answer for this stackoverflow question the other day. However it was quite frustrating as nothing seem to work.

David added new comments about enabling "Run in full simulator" later, which I tried, but still can't see the 3D object....



Strange.... Was stuck for a while, then I noticed on the upper left hand side window of the image David posted (with the 3D red donut) has the same icon as "Show the Assistance editor" (the one with a suit and bow tie).



Clicked on it, and it magically appeared on the screen and starts spinning! Yeah! Why does Apple have to make it so difficult??!!


However, sometimes it just crashed for no reason when I played around with a few parameters, keep getting this error...

One more thing, in case it just stuck and wouldn't move, try "Editor" => "Execute Playground" as shown below.

Did some further investigation, as shown in video below, this is what happened:
1) first only runs XCode 6.1, finder, terminal and quicktime player
2) clicked on the playground file, and XCode automatically runs iOS simulator
3) clicked on "Show the Assistance editor"
4) waited for about 20 seconds, and you can see the 3D red donut starts spinning in both XCode and simulator.
5) The quality of the image in simulator is quite awful as it keeps flickering, tried turn to landscape, but doesn't make any difference.
6) when clicked on XCode to show the version number, the spinning donut on simulator stops, but the one in XCode still running.
video
To be honest, the way that it keeps flickering/flashing, is really awful, any idea what have I done wrong? This kind of quality is quite shocking...

In case you wonder, my MacBook Pro is running OS X 10.9.5. It was running everything quite smoothly when it was OS X 10.8.x, after upgraded to 10.9 the performance and stability declined quite badly.

Don't know about you but it seems I also have more XCode 6 crashes than XCode 5...  Apple, can you please slow down a bit and focus more on the quality rather than fixed annual release schedule? Quite agree that the quality of Apple software is getting worse in every release....

Let me know if you found other tricks, good luck and have fun!




1 comment:

  1. Thank you!

    This was exactly what I was looking for :)

    I was trying to prototype animations on a Playground but I couldn't "see" anything. THANK YOU VERY MUCH!!!

    ReplyDelete