41
www.folio3.com Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

Www. Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

Embed Size (px)

Citation preview

Page 1: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.com

Folio3 IPhone TrainingSession 2

Testing App on device

Presenter: Imam Raza

Page 2: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Joining the iphone Developer programmer Enroll for iphone developer programm at below

URL http://developer.apple.com/programs/iphone/

Enrollment into this program currently costs $99 per year

After completing enrollment process:– Navigate to http://developer.apple.com – Click on the Member Center link located near the

top right hand corner of the screen.– On the resulting page enter the Apple ID and

password associated with your iPhone Developer Program membership to access the member center home page as illustrated in the following figure.

Page 3: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 4: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Familiarizing with Vocabulary

Provisioning Profile Certificate is a combination of:

Developer Certificates Devices UUIDs AppIDs

Page 5: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Developer Certificate

Page 6: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Creating an iPhone Development Certificate Signing RequestAny apps that are to be installed on an iPhone

must first be signed using an iPhone Development Certificate.Below are steps to generate it:

Generate a Certificate Signing Request (CSR).

– Begin this process by opening the Keychain Access tool on your Mac system

– This tool can be found in the Applications -> Utilities folder

See below figure:

Page 7: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR)

Page 8: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR)Within the Keychain Access utility, perform the

following steps: Select the Keychain Access -> Keychain Access ->

PreferencesPreferences menu and select Certificates in the resulting dialog:

Page 9: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR) Within the Preferences dialog make sure that

the online Certificate Status Protocol (OCPS) and Certificate Revocation List (CRL) settings are both set to Off, then close the dialog.

Select the Keychain Access -> Certificate Keychain Access -> Certificate Assistant -> Request a Certificate from Assistant -> Request a Certificate from a Certificate Authoritya Certificate Authority.

Page 10: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR)

Page 11: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR)Clicking the Continue button will prompt for a

file and location into which the CSR is to be saved.

Page 12: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Generating Certificate Certificate Request(CSR)Verify that the 2048 bits key size and RSA

algorithm are selected before clicking on the Continue button.

Page 13: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Submitting the iPhone Development Certificate Signing Request Having created the Certificate Signing

Request (CSR) the next step is to submit it for approval.

Under Developer Program Resources on the main member center home page select iPhone Provisioning PortaliPhone Provisioning Portal.

Within the portal, select the Certificates link located in the left hand panel to display the following page:

Page 14: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Submitting the CSR

Page 15: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Submitting the CSR In previous figure Click on the Request Request

Certificate Certificate button. Scroll down to the bottom of the text under

the heading Create an iPhone Create an iPhone Development CertificateDevelopment Certificate click on the Choose File button.

In the resulting file selection panel, navigate the certificate signing request file created in the previous section and click on Choose.

Page 16: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Submitting CSR Once your file selection is displayed next to

the Choose File button, click on the Submit button located in the bottom right hand corner of the web page.

At this point you will be returned to the main Certificates page where your certificate will be listed as Pending Approval Pending Approval as shown in below figure.

If you are not the Team Admin, you will need to wait until that person approves your request

Page 17: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 18: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing certificate on iphone

Page 19: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing an iPhone Development Certificate Download the certificate from the iPhone

Provisioning Portal by clicking on the Download button located on the certificates page as shown in previous figure.

Once the file has downloaded, double click on it to load it into the Keychain Access tool. The certificate will then be listed together with a status as shown in next figure:

Page 20: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 21: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Adding Devices on Portal

Page 22: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Adding Devices on portal Apple restricts developers to 100 devices per

year. The UDID for a device may be obtained

either via Xcode or iTunes.

Page 23: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Getting Device UUID from XCode Connect device with Mac. Once Xcode has launched the Organizer

screen will appear displaying summary information about the device.

The UDID is listed next to the Identifier label as illustrated in the following figure.

Page 24: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 25: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Getting UUID from ITunes launch iTunes Select the device in the left hand pane and

review the Summary information page One of the fields on this page will be labeled

as Serial Number. Click with the mouse on this number and it

will change to display the UDID.

Page 26: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Adding Device on portal

On the Add Devices page enter a descriptive name for the device and the 40 character UDID.

Page 27: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Creating App id

Page 28: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Creating Application ID Why need to create App ID.

– This ID allows your app to be uniquely identified within the Apple iPhone application infrastructure.

Steps to create App ID:– select the App IDs link in the provisioning portal – click on the New App ID button to display the

Create App ID screen as illustrated below figure:– Enter a suitably descriptive name into the

Description field and then make a Bundle Seed ID selection

– Enter the Bundle Identifier e.g com.folio3.myApp

Page 29: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 30: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Iphone Development Provisioning Profile

Page 31: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Iphone Development Provisioning Profile What is it?

The provisioning profile defines which developer certificates are

allowed to install an app on a device, which devices can be used and which apps can be installed.

Once created, the provisioning profile must be installed on each device on which the designated app is to be installed.

Page 32: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Creating Provisioning Profile select the Provisioning link in the Provisioning

Portal and click on the New profile button In the resulting Create iPhone Provisioning

Profile screen, perform the following tasks:– In the Profile Name field enter a suitably

descriptive name for profile you are creating.– Set the check box next to each certificate to

specify which developers are permitted to use this particular profile.

– Select an App ID from the menu.– Select the devices onto which the app is

permitted to be installed.– Click on the Submit button.

Page 33: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing provisioning Profile click on the Download button next to your

new profile and save it to your local system Once saved, either drag and drop the file to

the Xcode icon in the dock or into the Xcode Organizer window, which may be accessed using the Xcode Window -> Organizer menu option.

Once the provisioning profile is installed, it should appear in the Organizer window as follows:

Page 34: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing provisioning Profile

Page 35: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Activating device for development To activate this device for development,

select it from the left hand panel under the DEVICES sub-heading to display summary information.

Page 36: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Activating device for development To enable the device for development

testing, click on the Use for Development button and wait while Xcode connects to the device and gathers some information.

Once the activation is complete, the indicator next to the device will change to green and the device summary information will update to provide information about the device and provisioning profiles that are available for use on the device:

Page 37: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 38: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing Provisional Profile on Device Click on the “+” button on shown at bottom

of previous diagram Navigate to the .mobileprovision.mobileprovision file that

was downloaded from the iPhone Provisioning Portal .

Page 39: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Associating an App ID with an App Before we can install our own app directly onto a

device, we must first embed the App ID created in the iPhone Provisioning Portal and referenced in the provisioning profile into the app itself.

Below are the steps for it:– right click on the app name located under

Targets in the Groups and Files panel located on the left hand side of the Xcode main window

– select Get Info from the resulting menu– In the info window, selecting Properties will

display the following window.– In the Identifier field enter the App ID you created

in the iPhone Provisioning Portal.

Page 40: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Page 41: Www.  Folio3 IPhone Training Session 2 Testing App on device Presenter: Imam Raza

www.folio3.comwww.folio3.com

Installing App on the Device Located in the top left hand corner of the main

Xcode window is drop down menu which, when clicked, provides menu of options to control the target run environment for the current app.

Select the device connected in this menu. Click Build and Run.Once the code is built, Xcode

will need to sign the app using your developer certificate. If prompted with a message that reads codesign wants to sign using key <key codesign wants to sign using key <key name>name> in your keychain select either Allow or Always Allow. Once signing is complete the status will change to Installing <appname>.app on Installing <appname>.app on iPhone..iPhone..