DISTRIBUTING NATIVE MOBILE APPS
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)
iOS Developer
Registration ($99)
Device
registration
(identifies
iPhone)
iOS Distribution
Certificate
(identifies you)
App ID
registration
(identifies apps)
Provisioning
profile (links all
three)
Apple WWDR
(identifies Apple)
(free to
download)
Used to install
apps on device
Basic steps for getting
registered
1. Go to developer.apple.com > 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
developer.apple.com/ios/manage/distribution/
(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
Summary: Submitting to app store
App functions on
your own device
Create new iOS
Distribution
Certificate Provisioning
profile for
distribution
Fixed icons Build for
deployment
(-> archive)
Create iTunes
Connect
registration
Validated archive
Submitted archive
App entry on
iTunes Connect

StackLabs-DataDriven Labs - iPhone App Development Training in Mohali

  • 2.
  • 3.
    Main downside ofnative: 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
  • 4.
    An overview ofdistribution • 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
  • 5.
    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
  • 6.
    Putting apps onyour own iPhone Apple Developer Registration (free) iOS Developer Registration ($99) Device registration (identifies iPhone) iOS Distribution Certificate (identifies you) App ID registration (identifies apps) Provisioning profile (links all three) Apple WWDR (identifies Apple) (free to download) Used to install apps on device
  • 7.
    Basic steps forgetting registered 1. Go to developer.apple.com > 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)
  • 8.
    (Continuation of previousslide) 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 developer.apple.com/ios/manage/distribution/
  • 9.
    (Continuation of previousslide) 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.
  • 10.
    (Continuation of previousslide) 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)
  • 11.
    (Continuation of previousslide) 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.”
  • 12.
    (Continuation of previousslide) 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.
  • 13.
    (Continuation of previousslide) 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
  • 14.
    Distributing to AppStore 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) …
  • 15.
    (Continuation of previousslide) 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
  • 16.
    (Continuation of previousslide) 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
  • 17.
    Summary: Submitting toapp store App functions on your own device Create new iOS Distribution Certificate Provisioning profile for distribution Fixed icons Build for deployment (-> archive) Create iTunes Connect registration Validated archive Submitted archive App entry on iTunes Connect