When you build for iOS you have two targets to build for:
- Device
- Xcode simulator
When you build for device, the assumption is you plan to either install it on a device (there are several ways) or you want to use XCode’s simulator to run it in. If you were building an app natively in Objective C, you would test your builds using the XCode simulator or device. Because the Corona SDK simulator is faster and tests most things as well as the XCode simulator, people tend to skip using the Xcode simulator. But Corona’s simulator runs as an OS-X app. Things like native.newTextFields use OS-X controls, not iOS controls. The Xcode simulator is much closer to the reality of a device. That is if you click in that newTextField, you will see the iOS keyboard popup. Network activities like Facebook and pretty much anything we say “Only works on device” will probably work in the Xcode simulator. Some people see this as faster than installing and testing on a device. Personally, I do not. I can use XCode’s Organizer and update an app on a device before the Xcode simulator can even start. Your mileage my vary. But if you want to use the XCode simulator, build for it and Corona will automatically launch it and start your app up on it.
Now when you build for device, there are three potential modes:
- Developer Mode
- Distribution: AdHoc
- Distribution: AppStore
Developer mode builds contain debugging information that you can use Xcode tools like Leaks to monitor your app for problems. Corona SDK will spit out a .app bundle (really a folder) that holds the unpacked version of the app. You can use this file to copy directly to your device using XCode’s Organizer. If you want to use iTunes or the IPhone Configuration Utility, you will need to convert the .app bundle to a .ipa file. It’s just a zip file with a particular folder structure. I believe you make a folder named “Payload” (case sensitive). Copy the .app folder inside of the Payload folder. Right click on the Payload folder and Compress it. This will produce Payload.zip. Simply rename it to “MyAppName.ipa” and tell finder, yes you want to use the .ipa extension. Once you have the .ipa file, you can send ti to testers via TestFlightApp, email, dropbox whatever (as long as their device was included in the provisioning profile used to build and sign the app). Many people like to use the iPhone Configuration Utility or iTunes to install their apps to test on their local devices. I don’t get it. XCode’s Organizer is faster and you don’t have to go through this “Make an IPA” step. Developer mode built apps cannot be uploaded to the store.
AdHoc versions are like store versions. They don’t contain debugging information, but like developer mode builds they can be installed directly on devices using the same methods above. AdHoc also produces a .zip file, but in this case, you have the .app file to use for your purposes. I tend to test using AdHoc versions since they are closest to what’s going to go up live.
Store distributions are signed in a way that you can only upload them to the App Store for distribution. They have to be installed on your device by the App Store app. This is where the .zip file comes in to play. Corona SDK will prompt you after building a distribution version to see if you want to upload it to the store. For an AdHoc built version, your only choice is to say no. They cannot be uploaded to the store. However if you did a for the store build, you can (well used to could) launch the Application Loader directly from that dialog box. It’s currently not broken and you have to hand run the Application Loader app and then get the .zip file that is produced (not the .app) and upload that to the store.