Introducing HTML and XHTML

Download Report

Transcript Introducing HTML and XHTML

Publishing
CIS 136 Building Mobile Apps
1
Preparation
2
Finalizing the assets
Code cleanup





Remove unnecessary comments, and obsolete code
Remove unnecessary files
Ensure you have only ONE config.xml file, in the WWW folder
Ensure that the correct reference to phonegap is in your
index.html
<script src="phonegap.js"></script>
or
<script src="cordova.js"></script>

3
Make sure the config.xml file is correct
The config file
<widget> is the root of the XML file


id: a unique identifier for your app




4
To support all supported platforms, this *must* be reverse-domain
name style (e.g. `com.yourcompany.yourapp`)
version: for best results, use a major/minor/patch style
version, with three numbers, such as `0.0.1`
name: Name of your app
description: description of the app
5
Platform
By default PhoneGap Build builds your application for
every platform


6
to build for certain platforms you can specify these platforms
with the gap:platform tag
Preferences
PhoneGap utilizes the <preference> tag to customize your
application configuration


all <preference> tags in your config.xml are copied to the
platform-specific configuration files
phonegap-version: the version of phonegap you are using

orientation: device orientation




7
Default – both landscape and portrait are enabled
Landscape
Portrait
Preferences
8

fullscreen: makes the app fullscreen – hides the status bar at
the top

Android specific and iOS specific preferences
Icons and splash screens
each platform will try to use the default icon.png during
compilation – if missing will use Phonegap logo
<icon> tag: can have many





9
src attribute: specifies location of image
width attribute: width in pixels
height attribute: height in pixels
Icons and splash screens

iOS supports classic, retina, iPhone 5 and iPad displays
10
Icons and splash screens

Android supports resource qualifiers

11
Refer to device density and language
Icons and splash screens

Windows has a regular icon and a tile image
12
Icons and splash screens

Splash screen tags have a src, width, height, and
gap:platform attribute

each platform will try to use the default splash.png
13
Plugins

PhoneGap Build supports a white-listed selection of
PhoneGap Plugins



Your plug-in may not be supported across all PhoneGap
platforms


http://buid.phonegap.com/plugins
http://plugins.cordova.io
ensure that the experience degrades gracefully for users who
do not have the plugin available
Verify the versions of phonegap your plugin works with
14
Plugins

Two steps to including a plug-in



Import native code using config.xml
Reference the JavaScript code
Do not include the actual plugin files in the zip or
repository which you submit to PhoneGap Build.
15
Plugins

Importing native code

add the correct <gap:plugin> tag to your config.xml file



Attributes:
name: reverse domain format as in com.phonegap.plugins.barcoder
version: the version you are using



16
if omitted, the newest version will be used
source: pgb or plugins.cordova.io (optional)
params: some plugins require paramteres
Plugins

Reference the JavaScript code
17
Signing the app
18
Obtaining certificates


In order to get it to a play store, you’ll need to provide the
correct certificates and/or signing keys for distribution
apps must be digitally signed with a certificate before
they can be installed



the certificate is used to identify the author of an app
the certificate does not need to be signed by a certificate
authority
apps often use self-signed certificates


19
the app developer holds the certificate's private key
all apps can be signed using the same key
iOS signing

Once you have downloaded the Apple iPhone developer
certificate from Apple

export it to the P12 keystore format


20
(might need to convert it to a PEM certificate file first)
you will need to create a password for it
Android signing




21
Download and install Java, and set the java home directory
In a command prompt window, run the keytool generator
program, substituting in your info in the brackets
You will need to create a password, provide your name,
location, etc.
Signing key will be generated
Applying the certificate

In phonegap build, Go to the Account > Edit Setting >
Signing Keys' tab to register it
22
Applying the certificate

In phonegap build, Go to the Account > Edit Setting >
Signing Keys' tab to unlock it
23
Publishing to a play store
24
Publishing in the Google Play store

Register for a publisher account




Play.google.com/apps/publish
Accept the Developer distribution agreement
Pay a $25 one-time registration fee using Google Wallet
Once registered you can sign in to the console
25
Publishing to the Apple Store

Becoming a registered iOS developer is a lengthy process and is sometimes repetitive

Join an Apple Developer Program


Enroll in the iOS developer program ($99 each year)



http://developer.apple.com/devcenter/ios/index.action
http://developer.apple.com/membercenter/index.action
You’ll eventually get an email with information on how to sign in to iTunesConnect
Submitting your app to the Apple Store or Mac App Store is a multistep process

sign in to iTunes Connect to create an app record and enter necessary information

If you’re selling your app on the store, you also enter the information for your
reimbursement in iTunes Connect

create an archive and sign it with your distribution certificate

upload your app using Application Loader

Use iTunes Connect to submit your app to the store

26
When your app is approved, use iTunes Connect to release it by setting the date when
the app will be available to customers
Create your final binary, publish, and
start making a name for yourself!
27