Solar2D Build For Device
Solar2D Build For Device
Kwik generates lua files for Solar2D. Please read this guide about building & distribution with Solar2D
Project Build Settings | Kwik outputs build.settings & config.lua, you may customize them better |
Generating Live Builds | Please follow the instruction to load your app into devices |
Provisioning and Building-iOS | Please follow the instruction to load your app into devices |
Signing and Building-Android | Please follow the instruction to load your app into devices |
Signing and Building-Kindle Fire | Please follow the instruction to load your app into devices |
Creating macOS Desktop Apps | Kwik does not output settings, you need to edit the setting file |
Creating Win32 Desktop Apps | Kwik does not output settings, you need to edit the setting file |
Advanced Build Settings | Kwik does not include these setting, you may edit the setting file to include them |
Apple TV / tvOS | Kwik does not output settings, you need to edit the setting file |
Building Launch Screens-iOS | Kwik does not output the setting |
App Localization-iOS | Kwik does not output the setting |
About iOS11 and Solar2D updates
Here is the overview description and the advanced tips from Hayzie’s blog
Android
In this tutorial, Kwik user Aaron Terry teaches how to create a release key and publish apps to Google Play Store. Thanks Aaron!
Amazon
In this tutorial, Kwik user Aaron Terry teaches how to publish apps to Amazon Store. Thanks Aaron!
Apple
How to submit your app to Apple store?
Quick Hints
Make sure you have the latest versions of Xcode, Solar2D and Kwik No spaces in your development folder names. (Including parent folders all the way down to the root of the hard drive.)
1. Certificates
provisioning profiles and building process
Follow this tutorial from Solar2D: Provisioning and Building — iOS
There is a tutorial video on the process: Building for iOS Devices
2. Setup Your app
Log into developer.apple.com and go to “iTunes connect” and “Manage Your Apps” and set up your app. You should have all the necessary information by this time to set up the app correctly. You’ll need to keep the mobile provisioning identifier handy… what ever you decided to use.
e.g. com.name.silly_app
Once you enter all the information about your app and submit, the app will be in the “Preparing to Upload” state. Before you build your app from the simulator you MUST click on the “Ready to Upload” button/link. Which you’ll find by clicking into the app you just setup in iTunes Connect.
3. Build
Make sure you have your app done and have created icons and default screen (if needed) – the Project Properties window in Kwik helps you to do that. Then, in the Simulator, go to File->Build (you have learned about it above).
Once the build is complete, which creates the .zip that the Application Loader needs, it should prompt the next step for uploading to iTunes Connect. Just follow the prompts and you will be done.
ADVANCED TIPS
One of our user, known in the forums as Hayzie, was kind enough to share all the steps to get success while creating certificates and submitting an app. Here’s his guest posting:
After having some trouble uploading my app to iTunes Connect I was asked by some users to do a tutorial of the steps I went through, so here it is.
I am by no means an expert in this
I’m not a coder and this is the first time I’ve uploaded an app. I just like to figure things out and understand them.
That being said, I’m sure there are many other ways to do this but this is the one that worked for me. I hope it will work for me next time too :)
I’ve tried to remember all the steps I went through (cutting out the ones that sent me in circles). So I hope it helps someone else save a bit of time, if not and I’ve missed something, let me know and it might have been a step I forgot to put in.
This is the step by step that I followed (found it online) with changes to the bits that steered me wrong or didn’t work with our process in Kwik.
Quick Hints
- Make sure you have the latest versions of Xcode, Solar2D and Kwik
- No spaces in your development folder names. (Including parent folders all the way down to the root of the hard drive.)
- Voodoo: You may have to be signed in to the provisioning portal (via safari) when using Application Loader. Before the running the Application Loader, your app must be in “Ready to Upload” status in itunes connect.
1. Clean up your certificates
provisioning profiles
- Open “Keychain Access” and find your old “dist” and “dev” certificates and remove them (You’ll make new ones.) * The certs in Keychain are named “iPhone Distribution: Your Name” and iPhone Developer: Your Name”
- Keychain > (Side Bar: Category) > Certificates (or “my certificates”)
- You can also click in “Keys”
- Key Chain > (Side Bar: Category) > Keys
- …and remove the keys that just say Your Name.
The trick I missed the first 30 times of trying to build my app was to find the extra certs that didn’t show in the above steps. So click Certificates then type ‘iPhone’ in the top right search area and it should show any you missed.
2. Reboot
It’s a voodoo thing. Rebooting is fun too!
3. Create new certificates.
Yes, go ahead and revoke the old ones, then follow the steps to get new ones. You’ll need one for “development” and one for “distribution”. Be sure to have your exact name and email used for your iOS account.
iOS Prov Portal > (Side Bar: Certificates) Create new or revoke wait a few minutes then refresh and follow the instructions. NOTES:
-
Pay close attention to the name and email address you use when setting up your certificates. (Use the ones you used when setting up your developer account.)
-
When creating the certificate authority request files, use the same names and emails as above. You can use the same certificate you download from iTunes Connect for both development and distribution certs.
4. Set up your App IDs
Use something that looks like com.name.myappname (Like a regular web address, but backwards. You don’t need an actual domain name, just make one up.)
NOTE: Don’t put any of this info in your “build.settings” file as plist keys… Solar2D takes care of all that when you build by reading the mobileprovisioning profile data.
5. Provisioning
-
Jump through the hoops to get the files. Make all three kinds: dev, hoc and store. Just to cover your bases.
-
It’s handy using friendly reminder names for your provisioning profile titles like:
- silly_app_dev
- silly_app_hoc
- silly_app_store
That way you can easily identify which files are which.
6. Check what you’ve got
Don’t install any of the provisioning profiles or certificates until your sure you’ve got everything handy. You should have the following files:
- developer_identity.cer
- distribution_identity.cer
- silly_app_hoc.mobileprovision
- silly_app_dev.mobileprovision
- silly_app_store.mobileprovision
7. Don’t install the files manually
I found if you install them manually (double click or drag and drop) you end up with duplicates. Which is what caused problems.
Once you have created them in iTunes Connect just open “Organizer”
Xcode > Window > Organizer and click the refresh icon in the bottom right.
Then you should see the certs n Keychain and profiles in Organizer.
8. Setup Your app
Log into developer.apple.com and go to “iTunes connect” and “Manage Your Apps” and set up your app. You should have all the necessary information by this time to set up the app correctly. You’ll need to keep the mobile provisioning identifier handy… what ever you decided to use.
e.g. com.name.silly_app
Once you enter all the information about your app and submit, the app will be in the “Preparing to Upload” state. Before you build your app with the Simulator you MUST click on the “Ready to Upload” button/link. Which you’ll find by clicking into the app you just setup in iTunes Connect.
9. Build
Follow the instructions in Solar2D docs for creating the app. You’ve been pretty much doing the build for iTunes when doing the test build of your app for on your device. Just with a couple of alterations.
IMPORTANT: If you get an error message like “application failed codesign verification”, check your output file doesn’t have any spaces or quotation symbols. You may use ‘_’ underscore instead of a space.
Illegal paths examples:
- /User/name/Desktop/I’m dumb/silly app i’m working on/main.lua
- /User/name/Desktop/I’m dumb/build the silly app/my silly.app
All other errors referring to issues with certificates are due to complications with multiple mobile provisioning profiles, certificates and keys in Key Chain and XCODE so check them all again.
END
I hope this helps some of you with the upload process. For me it seemed like it was a lot harder than actually making my App with Kwik. Good luck and I look forward to seeing your apps in the store.
Thanks a lot Hayzie!