Some newbie questions

Hello,

I have some newbie questions and need help.

  1. Recently I managed to get a Mac to build apps for iOS, I can build a folder (projectName.app) from corona.

 Do I need to build ipa files to publish them on App Store? What format exactly do I upload? Can I just point to the folder?

  1. If I want to install my iOS app for test, do I have to have my device registered in the relative provision file?

  2. Why is the apk file a lot bigger then the ipa file? especially after graphic 2.0 update. The kernel uses 6MB+ for an apk file.

thanks a lot for reading my post, and Merry Christmas!

edit:

3 questions are answered.

Just want to ask a quick question.

Does the feature that auto submit your app to apple store while build for iOS work in recent builds?

I’m still using build 2014 2189 now.

Thanks!

  1. Once you make an iOS build with Corona, you get a ZIP file. Use Application Loader (Xcode > Open Developer Tool > Application Loader) to submit that file to Apple. Don’t press the button saying something like “Submit to the App Store” offered by Corona after the build.

  2. You need to sign your Corona build with a development provisioning profile which has your test device added to it. 

  3. Don’t know, maybe someone from the Corona dev team could answer this.

Merry Christmas!

To add to what @Sundraw said for #2, you can also use a Distribution “AdHoc” profile for testing as well, but your device will need to be in that profile and you will have had to have downloaded it and restarted Corona SDK afterwards.

As for #3, I’m not sure why the Android APK is bigger than the iOS App bundle.  Are you including any Android specific plugins?  It’s also possible that all of the required shader code and such is more expensive on Android than it is on iOS (more libraries needed to be included, etc.).  I’ll ask and see if I can get an answer.  It is the Christmas holidays and most people are out of the office.

Rob

I did have some questions in my mind when building my very first Corona Android app. The app is very simple. It has a bunch of quotations from a book I happen to like, about 50 of them, and it displays one of them randomly, using newText. Almost a hello world. Still, this trivial app was over 7Mb heavy. The most puzzling fact is that when installed on a device, the app was taking twice more space, over 15Mb. I’ve discovered that when deleting it during testing. If you could shed some light on this, Rob, it would be highly appreciated. Thanks, Alex

On Android, the .apk file is a zip file.  We extract some of the content out to be able to access it via Corona SDK API calls.  It’s this expansion that is likely causing this increase. 

Rob

Understood. Still, 50 sentences of plain text taking 7Mb? I bet you are packing in Lua interpreter there. By the way, it seems to me that forum messes up submissions from iPad, ignoring paragraph breaks. Let’s see if that will happen with this post. Thanks, Alex

Yep, it did.

Well I know that we include SQLite for Android and use it built in on iOS, so it’s possible.  I’ve asked Engineering, but don’t expect an answer for a while.

Rob

Haha surely, not everyone keeps thinking about Corona on Christmas evening!

Thanks for reply.

I built a puzzle game like candy crush with graphic 1.0 (old sdk,not compatible mode).

The game is simple and I didn’t use any plug-in.

And the apk file is 4.4MB.

And now I use current build (graphic 2.0), i just set anchor points and the apk became 6.9MB, installed space takes 10MB+ in the device. :open_mouth:

The unzipped iOS build folder (graphic 2.0) is only 2.9MB;

Zipped ipa is 1.57MB.

I just make a Payload folder and zip it.
Still, I can’t get a zip file from corona, I just got a projectName.app FOLDER.
 

And if I tried to install the “folder” via Xcode, I drag the projectName.app folder to my device and the app can be installed just fine.

Did I miss something?

I forgot something…

Build for —  Xcode Simulator or Device

What’s the different?

Which one do I use for publishing to the app store?

Does the manual zipped one  work?

Thanks! :slight_smile:

When you build for iOS you have two targets to build for:

  1. Device
  2. 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:

  1. Developer Mode
  2. Distribution: AdHoc
  3. 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.

@Sundraw

Even though your app is only 50 lines of text, we still include everything else in there.  For example all the networking code, store code, etc. are always in the app itself even if its not used.  It wouldn’t be feasible to have multiple builds each with different version of the code in there.  This is why even if your app was trivial, it is still so large in size.  The flip side is that even if you were to add code that used the store, network, etc. apis, it won’t add much to the size of the apk.

Clear and very useful!

Thank you Rob! :slight_smile:

Thank you very much, @dchan, this makes plenty of sense to me.

  1. Once you make an iOS build with Corona, you get a ZIP file. Use Application Loader (Xcode > Open Developer Tool > Application Loader) to submit that file to Apple. Don’t press the button saying something like “Submit to the App Store” offered by Corona after the build.

  2. You need to sign your Corona build with a development provisioning profile which has your test device added to it. 

  3. Don’t know, maybe someone from the Corona dev team could answer this.

Merry Christmas!

To add to what @Sundraw said for #2, you can also use a Distribution “AdHoc” profile for testing as well, but your device will need to be in that profile and you will have had to have downloaded it and restarted Corona SDK afterwards.

As for #3, I’m not sure why the Android APK is bigger than the iOS App bundle.  Are you including any Android specific plugins?  It’s also possible that all of the required shader code and such is more expensive on Android than it is on iOS (more libraries needed to be included, etc.).  I’ll ask and see if I can get an answer.  It is the Christmas holidays and most people are out of the office.

Rob

I did have some questions in my mind when building my very first Corona Android app. The app is very simple. It has a bunch of quotations from a book I happen to like, about 50 of them, and it displays one of them randomly, using newText. Almost a hello world. Still, this trivial app was over 7Mb heavy. The most puzzling fact is that when installed on a device, the app was taking twice more space, over 15Mb. I’ve discovered that when deleting it during testing. If you could shed some light on this, Rob, it would be highly appreciated. Thanks, Alex

On Android, the .apk file is a zip file.  We extract some of the content out to be able to access it via Corona SDK API calls.  It’s this expansion that is likely causing this increase. 

Rob

Understood. Still, 50 sentences of plain text taking 7Mb? I bet you are packing in Lua interpreter there. By the way, it seems to me that forum messes up submissions from iPad, ignoring paragraph breaks. Let’s see if that will happen with this post. Thanks, Alex