Logging from device

I see my print statements in the corona console when I run in either the corona simulator or the Xcode tvos simulator, but not when I run on the actual Apple TV device. Probably because it doesn’t automatically launch the app. Is there a way to see my print statements when running on the actual device?

If you have Corona SDK install to the device, it won’t auto run it, but the simulator’s new console window will show device messages until you click away the box that says it was installed and paying attention.

You can always use Xcode’s “Devices” option to view the console log from the device as well.

Rob

The last thing I see in the logs is:

Jan 02 09:06:10.199 Installing ‘/Users/doug/Desktop/Buttermilk.app’ on tvOS device

Jan 02 09:06:18.455 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_sendapp.sh: line 18: [: : integer expression expected
/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_sendapp.sh: line 125: [: : integer expression expected
Installing ‘Buttermilk.app’ on Apple_TV …
Uploading Buttermilk.app package contents… DONE.
Installing ‘(null)’
 - CreatingStagingDirectory (5%)
 - ExtractingPackage (15%)
 - InspectingPackage (20%)
 - TakingInstallLock (20%)
 - PreflightingApplication (30%)
 - InstallingEmbeddedProfile (30%)
 - VerifyingApplication (40%)
 - CreatingContainer (50%)
 - InstallingApplication (60%)
 - PostflightingApplication (70%)
 - SandboxingApplication (80%)
 - GeneratingApplicationMap (90%)
 - Complete

Jan 02 09:06:18.465 ----------  Device Log Starts  ----------

Jan 02 09:06:18.624 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_syslog.sh: line 17: [: : integer expression expected

 

When I launch my app I see no further logging in the console.  Ideas what I might be doing wrong?

I stuck an echo in the ios_syslog script to see what the value of DEBUG_BUILD_PROCESS is.  It’s empty.  Not sure if that’s normal or if it’s the cause of the logging not working.

Jan 02 09:26:05.260 DEBUG_BUILD_PROCESS=

Jan 02 09:26:05.264 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_syslog.sh: line 19: [: : integer expression expected

 

 

 

I was able to view the device logs using Xcode (after discovering where it was – it was collapsed by default).

 

 

But I would still be curious as to why the corona handoff is not working.  I have the ideviceinstaller brew package installed properly.

Oops, that’s a bug :frowning: To work around it you can set a preference for the Corona Simulator like so: [lua]defaults write com.coronalabs.Corona_Simulator debugBuildProcess -string 0[/lua] It won’t change anything but it will stop the script from failing because it’s not set.

Thanks.  I opened up case #44519.  Any idea when this will get into a build? 

This is fixed in Daily Build 2803 and higher.

Ok. Only see 2802 right now, but when 2803 is available I will give it a try. Thanks!

I tried 2807 and it’s working like a charm! Thanks!

If you have Corona SDK install to the device, it won’t auto run it, but the simulator’s new console window will show device messages until you click away the box that says it was installed and paying attention.

You can always use Xcode’s “Devices” option to view the console log from the device as well.

Rob

The last thing I see in the logs is:

Jan 02 09:06:10.199 Installing ‘/Users/doug/Desktop/Buttermilk.app’ on tvOS device

Jan 02 09:06:18.455 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_sendapp.sh: line 18: [: : integer expression expected
/Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_sendapp.sh: line 125: [: : integer expression expected
Installing ‘Buttermilk.app’ on Apple_TV …
Uploading Buttermilk.app package contents… DONE.
Installing ‘(null)’
 - CreatingStagingDirectory (5%)
 - ExtractingPackage (15%)
 - InspectingPackage (20%)
 - TakingInstallLock (20%)
 - PreflightingApplication (30%)
 - InstallingEmbeddedProfile (30%)
 - VerifyingApplication (40%)
 - CreatingContainer (50%)
 - InstallingApplication (60%)
 - PostflightingApplication (70%)
 - SandboxingApplication (80%)
 - GeneratingApplicationMap (90%)
 - Complete

Jan 02 09:06:18.465 ----------  Device Log Starts  ----------

Jan 02 09:06:18.624 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_syslog.sh: line 17: [: : integer expression expected

 

When I launch my app I see no further logging in the console.  Ideas what I might be doing wrong?

I stuck an echo in the ios_syslog script to see what the value of DEBUG_BUILD_PROCESS is.  It’s empty.  Not sure if that’s normal or if it’s the cause of the logging not working.

Jan 02 09:26:05.260 DEBUG_BUILD_PROCESS=

Jan 02 09:26:05.264 /Applications/CoronaSDK/Corona Simulator.app/Contents/Resources/ios_syslog.sh: line 19: [: : integer expression expected

 

 

 

I was able to view the device logs using Xcode (after discovering where it was – it was collapsed by default).

 

 

But I would still be curious as to why the corona handoff is not working.  I have the ideviceinstaller brew package installed properly.

Oops, that’s a bug :frowning: To work around it you can set a preference for the Corona Simulator like so: [lua]defaults write com.coronalabs.Corona_Simulator debugBuildProcess -string 0[/lua] It won’t change anything but it will stop the script from failing because it’s not set.

Thanks.  I opened up case #44519.  Any idea when this will get into a build? 

This is fixed in Daily Build 2803 and higher.

Ok. Only see 2802 right now, but when 2803 is available I will give it a try. Thanks!

I tried 2807 and it’s working like a charm! Thanks!