Lab - Deploy and Distribute
Mission: In this lab, you will deploy an app for testing on physical devices and follow the critical steps for publishing that app to the Android Market and iTunes App Store.
Specification: You will need the following resources to complete all aspects of this lab:
- An Android device and USB cable
- An iOS device and USB cable
- A Google Play (Android Market) account
- An iOS Developer’s Account
|1: Download the app starting code from http://assets.appcelerator.com.s3.amazonaws.com/app_u/code/TiBountyHunter.zip and the 512x512 icon. Import the project into Titanium Studio. Build and run the app in the iOS or Android simulator/emulator to confirm that the files were downloaded correctly and you created the project successfully.|
|2: Connect your Android device and deploy the app to it. Test the app. It should offer the same functionality, considering Android platform specifics, as you see in the iOS simulator.
With your Android device still connected, open ddms and select your device in the top-left pane. Choose Device, Screen Capture. Save two representative screenshots to your desktop or home directory. Close ddms. Disconnect your device following your operating system’s procedure for safely removing USB devices.
|3: Log onto your Apple Developer account and access the iOS Provisioning Portal. Create a developer’s certificate and install it to your keychain. Determine your iOS device’s UDID and register that device in the Provisioning Portal. Create an AppID for the TiBountyHunter using a wildcard CF Bundle ID. Create a Development Provisioning profile associating your certificate, device, and AppID. Download it to your computer.
Connect your iOS device. Using Titanium Studio, install the provisioning profile to XCode. Then install the app to your device. Test the app. It should offer the same functionality as you see in the iOS simulator. Disconnect your device following your operating system’s procedure for safely removing USB devices.
|4: Using the Android SDK keytool utility, generate a key pair, storing the keystore file in your home directory or other location of your choice. Use tibh as the alias and titanium as the password (or use your existing password if you have a keystore already). When prompted, enter your name, company name, and location information. Use keytool to verify your keystore.
Using Titanium Studio, package the app for Android distribution. Use the keystore you created, entering the alias and password into the fields in Studio. When done, use jarsigner to verify the APK file.
|5: Visit http://market.android.com/publish and log onto your Android Market account. Click Upload Application and then upload your APK. If prompted to, use zipalign to align your APK file then re-upload. Upload your two screenshots. Upload the 512x512 icon that you downloaded at the start of this lab. Name the app TiBountyHunter and enter a description of your choice. Select an application type and category, such as Games, Casual. Select Everyone (or Low Maturity) for the Content Rating. Check the two consent checkboxes to acknowledge Google’s terms and agreements.
Observe, but do not click the Save and Publish buttons. You won’t actually publish the app (the Market doesn’t need a thousand TiBountyHunter apps published by all our students). Click Delete or simply navigate away from the page to cancel.
|6: Log onto the iOS Dev Center and access the iOS Provisioning Portal. Create a Distribution certificate and install it to your keychain. Create a Distribution Provisioning profile associating your distribution certificate and AppID. Download it to your computer.
Using Titanium Studio, install the distribution provisioning profile to XCode. Select your distribution certificate and then package the app for distribution.
|7: Build and run the app in the iOS simulator and then use ⌘↑4 to capture a representative screenshot of the app. Using Preview, crop the screen to 320x480. Alternatively, you can use a tool like the iOS-Simulator Cropper listed in the Resources section below to automate the screen capture process.|
|8: In the iOS Dev Center, access the iTunes Connect portal. Using the Manage Your Applications page, create an app entry for TiBountyHunter, noting the correct Bundle Seed ID and Suffix. Enter a description and select Games as the Primary Category and Educational as the Subcategory. Select None for each of the audience rating options. Upload the required screenshot and large icon (from the lab’s graphic assets). Save your changes.
Open Xcode and display the Organizer window. Click the Archives button. Your packaged app should be listed. Click Validate and enter your iOS Dev Center credentials when prompted. It can take considerable time for your app to be available for validation after entering it on iTunes Connect. If that process hasn't finished, the validation will fail with an “app not found” message.
Do not upload the app. Apple will likely reject the app and the App Store doesn’t need lots of copies of TiBountyHunter anyway.
In this lab, you worked through the steps to publish an app to the iTunes App Store and the Google Market, now called Google Play.
- iOS Simulator/Cropper, an optional but helpful tool for capturing iOS simulator screenshots in the correct sizes: http://www.curioustimes.de/iphonesimulatorcropper/
- Guides: Preparing for Distribution: http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Preparing_for_Distribution