The “What’s New” notes for Xcode 7.1.1 include this interesting note:
Now you can go beyond the simulator to test your app on an iPad, iPhone, Apple TV, or Apple Watch — for free. Simply enter your Apple ID into the Accounts preference pane, then attach a device to your Mac using a Lightning cable. You can use the same Apple ID you already use for iCloud, iTunes, or the App Store, or create a new one. Join the Apple Developer Program when you’re ready to distribute or submit your apps to the App Store.
Will Corona Labs support this new capability and allow Corona SDK applications to be tested on physical devices without requiring developers to enroll in the Apple Developer Program?
I’ve spent some time searching through the forums and docs, but I can’t find any information on how to actually do on-device debugging. I’ve been enrolled in Apple’s Developer Program before, but I’d much prefer to debug on a device without signing up again.
Is there a blog post, forum entry, or some documentation that I haven’t been able to find that describes how to do this? I’m not really familiar with Xcode, (I just the Organizer window previously), so I’m looking for some newbie level guidance here. Something along the lines of "open this file on your Mac with Xcode, then on this menu, select your device, then click option foobar, etc., etc.)
Step 2: Build for iOS and select “Copy to device” as the build option.
Step 3: Do not close the window that comes up. Instead, look at the console. We’re now feeding you the output from the device logs.
Or if you want to look at the syslog yourself:
Step 1: Launch Xcode
Step 2: Use Cmd+2 to launch the devices window
Step 3: Select your device, and make sure that the console is displayed. There’s a small triangle button in the lower left of the window (but to the right of the devices list) that shows/hides it.
Almost there… I found this helpful post on StackOverflow: http://stackoverflow.com/a/4952845/5420. That got me through the necessary Xcode configurations. I was able to prove the setup was right by getting Apple’s sample game project installed and working on an iPhone 6 Plus and an iPad Air 2.
Now on to Corona. I installed the latest daily build (version 2015.2775), loaded up an old project, and tried a build with “Copy to device” selected. Everything was looking good, but the last step, to install on the device, failed with the message:
ERROR: can’t find ‘ideviceinstaller’ at '/usr/local/bin/ideviceinstaller’
Here’s a copy/paste of the last few lines of my build output:
Nov 21 10:18:20.591 iOS build succeeded
Nov 21 10:18:21.199 Error running /Applications/CoronaSDK-2775/Corona Simulator.app/Contents/Resources/ios_sendapp.sh (
“/Users/jeffk/Desktop/Tumblers_2014.app”
): (null)
Nov 21 10:18:21.216 ERROR: can’t find ‘ideviceinstaller’ at ‘/usr/local/bin/ideviceinstaller’
Nov 21 10:18:21.582 ERROR: App Installation Problem: *ideviceinstaller* encountered an error installing the app:
ERROR: can’t find ‘ideviceinstaller’ at ‘/usr/local/bin/ideviceinstaller’
I used the default install locations for CoronaSDK and Xcode. I went so far as to use ‘find’ from the Terminal app to see if the ideviceinstaller program was even on the machine. Nope.
This is almost working, but I don’t know where to go from here… Does anyone have the final clue?
I think I got more than I wanted, but it’s installed nonetheless…
Now, my build doesn’t fail, and the app is installed on the device. But when I start the app on the phone, a dialog box is displayed with this message:
<Warning>: Runtime Error: Runtime error: /Users/jeffk/CoronaProjects/Tumblers_2014/main.lua:14: execute() is not available on this platform
Nov 22 10:07:09.386 ---------- Device Log Starts ----------
Nov 22 10:07:57.387 Nov 22 10:07:57 JeffKs-iPhone Tumblers_2014[5164] <Warning>: Platform: iPhone / iPhone7,1 / 9.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 75.10.11 / 2015.2775 / en-US | US | en_US | en
Nov 22 10:07:57.397 Nov 22 10:07:57 JeffKs-iPhone Tumblers_2014[5164] <Warning>: Runtime Error: Runtime error: /Users/jeffk/CoronaProjects/Tumblers_2014/main.lua:14: execute() is not available on this platform
Does anyone know what this means? Is CoronaSDK failing to bundle it’s runtime into the app that’s being copied to the device?
By the way, Google returns _ nothing _ when searching for that message – a very rare occurrence!
Shame on me, not suspecting my own code first… I had included a call to os.clear() to clear the debugging terminal each time I restarted the app in the simulator. I think I found that in some forum post somewhere, but I don’t see that call documented in the Corona API docs.
Anyway, I removed that call and am now in business.
I’ve spent some time searching through the forums and docs, but I can’t find any information on how to actually do on-device debugging. I’ve been enrolled in Apple’s Developer Program before, but I’d much prefer to debug on a device without signing up again.
Is there a blog post, forum entry, or some documentation that I haven’t been able to find that describes how to do this? I’m not really familiar with Xcode, (I just the Organizer window previously), so I’m looking for some newbie level guidance here. Something along the lines of "open this file on your Mac with Xcode, then on this menu, select your device, then click option foobar, etc., etc.)
Step 2: Build for iOS and select “Copy to device” as the build option.
Step 3: Do not close the window that comes up. Instead, look at the console. We’re now feeding you the output from the device logs.
Or if you want to look at the syslog yourself:
Step 1: Launch Xcode
Step 2: Use Cmd+2 to launch the devices window
Step 3: Select your device, and make sure that the console is displayed. There’s a small triangle button in the lower left of the window (but to the right of the devices list) that shows/hides it.
Almost there… I found this helpful post on StackOverflow: http://stackoverflow.com/a/4952845/5420. That got me through the necessary Xcode configurations. I was able to prove the setup was right by getting Apple’s sample game project installed and working on an iPhone 6 Plus and an iPad Air 2.
Now on to Corona. I installed the latest daily build (version 2015.2775), loaded up an old project, and tried a build with “Copy to device” selected. Everything was looking good, but the last step, to install on the device, failed with the message:
ERROR: can’t find ‘ideviceinstaller’ at '/usr/local/bin/ideviceinstaller’
Here’s a copy/paste of the last few lines of my build output:
Nov 21 10:18:20.591 iOS build succeeded
Nov 21 10:18:21.199 Error running /Applications/CoronaSDK-2775/Corona Simulator.app/Contents/Resources/ios_sendapp.sh (
“/Users/jeffk/Desktop/Tumblers_2014.app”
): (null)
Nov 21 10:18:21.216 ERROR: can’t find ‘ideviceinstaller’ at ‘/usr/local/bin/ideviceinstaller’
Nov 21 10:18:21.582 ERROR: App Installation Problem: *ideviceinstaller* encountered an error installing the app:
ERROR: can’t find ‘ideviceinstaller’ at ‘/usr/local/bin/ideviceinstaller’
I used the default install locations for CoronaSDK and Xcode. I went so far as to use ‘find’ from the Terminal app to see if the ideviceinstaller program was even on the machine. Nope.
This is almost working, but I don’t know where to go from here… Does anyone have the final clue?
I think I got more than I wanted, but it’s installed nonetheless…
Now, my build doesn’t fail, and the app is installed on the device. But when I start the app on the phone, a dialog box is displayed with this message:
<Warning>: Runtime Error: Runtime error: /Users/jeffk/CoronaProjects/Tumblers_2014/main.lua:14: execute() is not available on this platform
Nov 22 10:07:09.386 ---------- Device Log Starts ----------
Nov 22 10:07:57.387 Nov 22 10:07:57 JeffKs-iPhone Tumblers_2014[5164] <Warning>: Platform: iPhone / iPhone7,1 / 9.1 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 75.10.11 / 2015.2775 / en-US | US | en_US | en
Nov 22 10:07:57.397 Nov 22 10:07:57 JeffKs-iPhone Tumblers_2014[5164] <Warning>: Runtime Error: Runtime error: /Users/jeffk/CoronaProjects/Tumblers_2014/main.lua:14: execute() is not available on this platform
Does anyone know what this means? Is CoronaSDK failing to bundle it’s runtime into the app that’s being copied to the device?
By the way, Google returns _ nothing _ when searching for that message – a very rare occurrence!
Shame on me, not suspecting my own code first… I had included a call to os.clear() to clear the debugging terminal each time I restarted the app in the simulator. I think I found that in some forum post somewhere, but I don’t see that call documented in the Corona API docs.
Anyway, I removed that call and am now in business.