Package App
After creating and testing an app that was creating using HTML5, CSS3 and Javascript in a browser, the next process is to package the app by creating an *apk (Android) or *.ipa (iOS) that are loaded on a device directly, side-loaded or through an app store. These packages (apk and ipa) are compressed files and folders:
- an app configuration file (an xml file (e.g. config.xml) that details that app's version, description, etc.)
- a signed certificate (verify the developer identity) using a keystore that is created automatically for an Android debug version but must be created manually for an Android released version.
- platform code (for given Android SDK version)
- compiled classes
- app resources
- graphics
- other compiled and uncompiled file
NOTE: Apps that don't have any native code can be installed on all devices.
Deploy Debug Version on Android Device
Deploying a debug version on an Android device device is easy. There are two methods for installing the ipa onto an iOS device:
- Using a QR code reader
- Pluging Device to Computer
NOTE: When you are ready to deploy the app to the app store, you will need to REBUILD your application using the released certificate and not the debug certificate.
Scan App
Scanning an app is the easiest method to get the app onto a device:
- Use a QR reader to install the app directly onto the device.
- Click the OK button when prompted to download the app onto the device. You may have to click the OK button several times to start the download progress.
- From the Settings panel, click the download option. You may see the following prompt if you have the app already on your phone, click the INSTALL button:
- Preview the app on your device to see if it is working correctly.
Download App
Another way to load an app onto a device is to connect it with a USB cable. However, an Android device have to have its security setting changed to allow apps from unknown sources which is not turned on by default. (See Prep for Android menu option for details). Once this setting has been changed, the app can be installed onto a device.
- Plug device to your computer using a USB cable.
- Click on the apk button to download the app to your computer.
- Copy apk to device storage and then use a File Explorer app to open the app on the device.
- Preview the app on your device.
ALTERNATIVE: Upload app to a server and then navigate to app' s URL and select the link. You can also copy the apk to a Dropbox folder, open Dropbox on your device and then select the apk to install it.
Deploy Development Version on iOS Device
Deploying on an iOS device is a bit more involved. Unless Android which automatically create a debug key, you should already have a development version of the apk using the signing keys to deploy the app on a device. There are two methods for installing the ipa onto an iOS device:
- Using a QR code reader to load device
- Using iTunes and sync to device
NOTE: When you are ready to deploy the app to the app store, you will need to REBUILD your application using the deployment certificates and not the development certificates.
Using a QR Reader:
- Use a QR reader to install the app directly without the need of going through iTunes.
- Preview the app on your device.
Using iTunes:
- Select the signing keys from the list in PhoneGap Build.
- Plug the device into your computer.
NOTES:
-
They were
already uploaded when you did Prep for iOS under the Test menu.
- PhoneGap Build will rebuild the iOS app using these digital certificates.
- Click the ipa button to download the ipa file to your computer.
- Open iTunes and drag the ipa to the iTunes window to have it ready to be installed onto your actual device.
ALTERNATIVE: Select Files > Add to Library from the menu and click the Open button
- Plug your device into your computer.
- Select the Apps menu item to ensure app is listed to be installed on the device.
NOTE: You should see the app ready to be synced to your device.
- Click Install to
install the app onto your iOS device.
- Preview the app on your device to see if if is working correctly.