native mobile distribution

Main downside of native: installation
• Mobile web apps are trivial to distribute
– Open browser, go to URL, bookmark to home
• Native mobile apps are a pain to distribute
– You need a license to create and distribute
– You need to deploy to app store
– You need to wait for approval
– Users need to find, choose, approve, install app
An overview of distribution
• The goals of this lecture are to…
– Summarize the main challenges of distribution
– Reveal important differences between distribution
of Android and iOS apps
– Give some guidance about how to distribute
• But the lecture is a "snapshot in time"
– Distribution processes can and do change
– Expect that you will have to adjust with the times
iOS Development Restrictions
• Every app developer must be identifiable
– Individual developers are identifiable by the credit
card number that they use
– Companies are identifiable by DUNS number
(registered with the US Federal Government)
• Every app’s developer must be identifiable
– Through public-key certificates
• Every app must be approved before app store
– Reviewed for appropriateness in the app store
Putting apps on your own iPhone
Apple Developer
Registration (free)
Apple WWDR
(identifies Apple)
(free to download)
iOS Developer
Registration ($99)
iOS Distribution
(identifies you)
Device registration
(identifies iPhone)
App ID registration
(identifies apps)
Provisioning profile
(links all three)
Used to install
apps on device
Basic steps for getting registered
1. Go to > Member Center
and register as an Apple Developer (free) so
you can log in
2. Once logged into the Member Center, sign up
as an iOS Developer (not free)
– Pay your $99 by credit card
– Wait 24-48 hours (yes, really)
(Continuation of previous slide)
3. Create iOS Distribution Certificate
The Distribution Certificate is Apple’s permission for
you to install apps on devices
Needed for installation onto your own device (aka
ad hoc distribution) or via the app store
Last time I checked, these steps are documented at
(Continuation of previous slide)
3. Create iOS Distribution Certificate
3.1 On Mac, use Spotlight to open Keychain
3.2 In Keychain, set preferences OSCP=Off, CRL=Off
3.3 In Keychain, use Certificate Assistant to request a
Certificate (2048 bits, RSA), save to hard drive; this
is called a Certificate Request
3.4 Go to the Member Center > iOS Provisioning Portal
3.5 Select Certificates section, Distribution tab, upload
the Certificate Request. Wait 10 minutes.
3.6 Approved certificate should appear on
Development tab.
(Continuation of previous slide)
3. Register a device
You have to register every device that you want to
install onto via ad hoc distribution (i.e., by sending the
binary via email, iTunes, and USB)
3.1 Go to the Devices section of the Member Center
3.2 Create a new Device entry, with a memorable name and
the UUID
• You can find the device’s UUID in iTunes
– Hook it up
– Go to iTunes
– Click on the Serial number so that it mysteriously
changes into the UUID (seriously)
(Continuation of previous slide)
4. Register an app id
App ids identify the developer of apps.
App id = Team ID (you) + bundle id (group of apps)
4.1 Go to the App IDs part of the Member Center and
create a new App ID
4.2 Important: your Bundle ID (second half of the App
ID) should have the form XXXXX.YYYYY.*
example: com.titaniumbits.*
This will let you create many apps, each of whose
names will start with “XXXXX.YYYYY.”
(Continuation of previous slide)
5. Create a provisioning profile
Provisioning profile links you (i.e., your Certificate)
with a device (or the app store) and with a group of
apps (bundle).
5.1 In the Provisioning section of the Member Center,
create a new Provisioning Profile
5.2 For development on your own device, use the
Development Tab.
5.3 For app store distribution, use the Distribution tab.
(Continuation of previous slide)
6. Install on your machine
6.1 Download certificates: your own, and the WWDR
(basically a key identifying Apple)
6.2 Download provisioning profile
6.3 In Finder, double-click the WWDR Certificate to
import it into keychain. Now your Mac trusts Apple.
Then double-click your own Certificate to import.
6.4 In Titanium Studio (or xCode), create a new project
with an appid of the form XXXXX.YYYYY.ZZZZZZZZ
6.5 Run the app on “iOS Device”. When prompted,
provide the provisioning profile you downloaded
Distributing to App Store
1., 2. Register – you already did this
3. Generate another Distribution Certificate – this
one, for the app store
4. Create an appid – you already did this
5. Create another Provisioning Profile – this one, for
app store (using new Distribution Certificate)
6. Install the Provisioning Profile in Titanium Studio
(or xCode)
(Continuation of previous slide)
7. Set up app on iTunes Connect
7.1 Go to Member Center, to iOS Provisioning
Portal, then the iTunes Connect portal
The first time you do this, you’ll be prompted to
accept the iTunes Connect terms of service
7.2 Go to Manage Apps and create an app entry
7.3 View details (near bottom of screen) and
confirm it is ready for upload
(Continuation of previous slide)
8. Build and upload to app store
8.1 Build for distribution
8.2 Xcode Organizer opens. Go to the Archives
8.3 Select app and click validate against your app entry
in the iTunes Connect site
- If it says no suitable app record found, then you
might not have a matching app name, id, version
8.4 If the validator complains, fix the problems
- Probably have to create some additional icons
(see next slide)
8.5 Click submit button to commit to app store
(Continuation of previous slide)
8.4 Fixing those icons
If you are using Titanium Studio, then it probably
will mess up your icons.
Go to your project in Finder
Go into the Resources/iphone subdirectory
Double-click your appicon.png to open in Preview
Use Tools > size to resize to 114 x 114
Use File > export to save a copy as [email protected]
Use Tools > size to resize to 72x72
Use File > export to save a copy as appicon-72.png
Exit Preview
(Continuation of previous slide)
8.4 Fixing those icons
Go back to Titanium Studio
Copy the build/iphone/Info.plist file to the same directory as
your tiapp.xml file
Open the Info.plist file for editing in Dashcode
Add appicon-72.png to the list of icons
<string>[email protected]</string>
– You may need additional icons as more kinds of
devices are invented (i.e., retina and beyond)
– Rebuild and revalidate
Summary: Submitting to app store
App functions on
your own device
Fixed icons
Create new iOS
Build for
(-> archive)
Provisioning profile
for distribution
Validated archive
Create iTunes
App entry on
iTunes Connect
Submitted archive
Android Development Restrictions
• Every app developer must be identifiable
– Developer accounts are identifiable by the credit
card number that they use
• Every app’s developer must be identifiable
– Through public-key certificates
– But your signature isn’t actually registered with
Google, so it doesn’t do much
• Every app must meet basic marketing rules
– No actual checks on the code that you write
Putting apps on your Android device
Google account
Generate your
own key
Sign your app
Android Publisher
Registration ($25)
Upload your app
Upload some
Approve for
Basic steps for getting registered
1. Get a Google account (e.g., sign up for gmail)
2. Sign in to
– Pay your $25 by credit card
– Wait 15 minutes
3. Create a signature
• Signature doesn’t actually seem to be checked at
any step of the process
3.1 Go to command line, cd to private directory
3.2 Run this command (all one line):
keytool -genkey -v -keystore my-releasekey.keystore -alias mykey -keyalg RSA -keysize
2048 -validity 10000
3.3 Answer the questions about your name, etc.
4. Build and upload to Market
4.1 In Titanium Studio, build for deployment. Select
your key file; note alias=mykey
4.2 While app is running in emulator, take 2
screenshots, paste to Paint, resize to 320 x 480
4.2 Get some other 512 x 512 image
(You may need other image sizes, too)
4.3 Go back to Android Market and click “Upload
4.4 Upload all the files, click Publish.
And that is distribution, in a nutshell

similar documents