Search Posts in my Blog

Wednesday, 7 March 2012

Installing an app to iPhone Device



In this post we will see how to deploy an application to your iPhone device, just select any application of your choice that you have created and would like to deploy that application into the iPhone so here the the following steps that will guide you to do the same.

Note: Before beginning with the deployment I hope that you have your app id and if not then please get it and then come back

Step 1: you have to make a keychain certificate and submit that certificate to the apples portal so here’s how you will do it.

a)   Open Finder, select applications their will be a list of apps that are present in your computer in front of you also their will be a folder called as utilities so go ahead open that folder and run the application called as the Keychain Access in a nutshell the entire path is somewhat like this
Finder-> Applications->Utilities->Keychain Access.



List of applications

KeyChainAccess

b)   Once you run the keychain access from the menu select the keychain access their will be a dropdown menu in front of you and from the menu please select the Certificate Assistantwhich will open a submenu and from the submenu kindly select the Request a Certificate From a Certificate Authority, the entire picture looks like the one given below

Request Certificate


c)    Now there will be a form in front of you with the title set toCertificate Assistant and with some more options so we won’t discuss what the options are for here and will come straight to the point just enter your email in the User Email Address section and select the option Saved to disk  and then hit the Continue button here’s a pic of what we discussed just now.




After the continue button is pressed your certificate will be created and the application will ask you the location to save that certificate, just select desktop or any preferred area where you want to save this certificate (I have selected desktop) and then minimize the keychain application.

Step 2: In the Step 1 you have created a certificate which you will send it to the apple’s development portal, in step 2 you will learn how to setup your application before it gets deployed to the device so let’s begin

a)   Go to http://developer.apple.com their you will see Member Center 

Member Center
    
     just click it and you will be traversed to the login page so just supply in your credentials and we are ready to go.


Login Screen



b)   After entering your credentials you will see a screen which will be just like the one given below 


After Login



c)    From here please select the iOS Provisioning Portal this portal will guide you in getting the provisioning profile for your application based upon your device id and with the help of that provisioning profile you will be able to deploy the application into your device only this is because you are giving your device ID.


Provisioning Portal



d)   After coming to the iOS Provisionig portal page you will see a bunch of menus on the left hand side of the page these menus look like this 


Menus


     from their select the Certificates menu which would be the second menu in the list you will be traversed to a page where you can request a certificate for deployment from apple. In that page their will be a button called as Request Certificates hit that button (in case you don't see that button and see some other application certificate their then in that case press the revoke button their and then refresh the page and then you will see the Request Certificates button) and when you do that you will see a step by step procedure of what we did till now, at the bottom of the page you will see a Browse button pleas click that button and submit the certificate that you created earlier by using the KeyChain access and then click on submit button. 

e)   After you submit the certificate you will get a IOS development certificate from apple which would be available for download so just click the download button and save the development certificate from apple into your computer. 


Issued Certificate
     The file name would be “developer_indentity.cer” right click the file and select the open option from the menu their will be a form in front of you that will ask you a question which would be like “Do you want to add the certificate(s) from the file developer_identity.cer to a keychain?” just select the Add button, now if you open your keychain you can see a development certificate added into your keychain.

f)     After this select the Device menu and add your device ID to it (if the device is already added into your development portal then you may skip this step and continue reading the next step). Select the Add Devices button 
      
Add Device


     after hitting that button you will be traversed to a page which will ask you for the device name and the Device ID, 

New Device


     in the device name you can put anyname of your choice and for the device ID part you have to open the xcode and open the organizer in their you will find the Devices section and from their you will get the Device ID so just copy that ID and paste it into the Device ID text box and hit the submit button present in the bottom of the screen.

Step3: Please go through the step 2 and make sure that you haven’t missed out any step and then proceed reading further:
a)   Select the App IDs menu and select the New App ID button 
  
NewAppID




 and give your appID a name also you will see another textbox for the bundle identifier for the in this textbox you can give your Bundle identifier ID like com.RTech123.Productname or any name of your choice and after that you can hit submit.


Note: The bundle identifier that you are giving here should match the bundle identifier inside your applications plist file else you will get an error while deploying the app into the device, so take your time open your application and select the xcode project file and then select the Targets and then traverse to the info menu their you will see the Custom IOS properties menu expand that menu and select the Bundle identifier.


   

b)   The next and the last step is to select the provisioning menu and create a application profile, please selecting the New Profile button


Provisioning Profile




     after you select the New profile button you will be traversed to the Create iOS Development provisioning Profile section their you can put in your app credentials like what is the Profile name, certificates etc also make sure that you are selecting the device because that would be the device in which you will be deploying the application, once you have filled in every details just hit submit and download the provisioning profile that you have created.

c)    After downloading the provisioning profile right click on it and select the open option which will run the provisioning profile in xcode.

Step 4: Once you have run the provisioning profile its time to run the app into your device but before running the app select option from simulator to device and then run the application, it will take sometime to run the app because it will be installing the app into the device.

Step 5: If the app is not installed and is throwing you some error then you need to perform some of the following checks:
1.    Make sure that there is only one provisioning profile into your keychain access, it might create some conflict while deploying the app.
2.    The OS version of your device may also be the cause like if your SDK is of higher version and your OS is of lower version or vice versa then it might cause some trouble the solution is to upgrade your device or Xcode.

I hope that this post was helpful in letting you deploy an app into a device 

No comments:

Post a Comment