I tried running it on device and no luck. Below is the log:
2017-02-15 10:40:59.324410 raconteurv2[392:82836] Platform: iPhone / iPhone7,2 / 10.2.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 95.58 / 2016.2992 / en-US | US | en\_US | en 2017-02-15 10:40:59.693226 raconteurv2[392:82836] playBookEvent 2017-02-15 10:40:59.693612 raconteurv2[392:82836] test name 2017-02-15 10:40:59.693725 raconteurv2[392:82836] /var/mobile/Containers/Data/Application/FBB6A84D-7FE7-48FA-951E-15A5C1882AB8/Documents/ 2017-02-15 10:40:59.695595 raconteurv2[392:82836] WARNING: /var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:18: Failed to find image 'assets/sky.png' 2017-02-15 10:40:59.696132 raconteurv2[392:82836] WARNING: /var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:19: Failed to find image 'assets/ground.png' 2017-02-15 10:40:59.696613 raconteurv2[392:82836] WARNING: /var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:21: Failed to find image 'assets/crate.png' 2017-02-15 10:40:59.696746 raconteurv2[392:82836] ERROR: Runtime error /var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:22: attempt to index local 'crate' (a nil value) stack traceback: [C]: ? /var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:22: in function \</var/containers/Bundle/Application/1D85B32B-DE94-4E76-A56D-67BC8ECF23AE/raconteurv2.app/main.lua:8\> ?: in function \<?:169\>
Here’s the lua code:
--------------------------------------------------------------------------------------- -- A simple physics example in 8 lines! --------------------------------------------------------------------------------------- local physics = require( "physics" ) physics.start() local function handlePlay( event ) if ( event.phase == "play" ) then print( event.name ) --\> pauseEvent print( event.bName ) --\> otherValue print( event.bPath ) --local base = system.DocumentsDirectory --local path = system.pathForFile( "xo/helloCopy.png", base ) local sky = display.newImage( "assets/sky.png", 160, 195 ) local ground = display.newImage( "assets/ground.png", 160, 445 ) local crate = display.newImage( "assets/crate.png", 180, -50 ) crate.rotation = 5 physics.addBody( ground, "static", { friction=0.5, bounce=0.3 } ) physics.addBody( crate, { density=3.0, friction=0.5, bounce=0.3 } ) end end Runtime:addEventListener( "playEvent", handlePlay )