Tuesday, September 18, 2012

Phonegap for IOS

Hello Again

So today we start on IOS we have already created our html and have gone through the ios guide. The sample app is a little bit different from the previous way which had templates that were incorporated into xcode. The new way is a little more tricky but follow the guide step by step and you will get there.

One thing to take note of is the quirks that phonegap documentation warns you about do not gloss over them as it can save you a lot of trouble.

The second thing to keep in mind is the whitelisting of the urls that you plan to use within your phonegap application. If you look in your Cordova.plist file you will see there is a property ExternalHosts add your urls in here.

Lastly I will explain this in detail later but if you are planning to upload your app you will need to create a developer account with apple. So that you can deploy to the app store.

More to come ....


So your application is ready for the app store where do we start?

Step 1: Enroll in the apple development program.
Step 2: Go through the steps in link
Step 3: Assign your code in the info tab of your program settings
Step 4: Archive your code
Step 5: Setup your app on apple connect (upload pictures and description)
Step 6: In your Archives click distribute follow the instructions to finalize your application 

So after a long wait apple has approved your application. Now you are ready for the next version.

Notifications

I looked and urban airship and push woosh but both left me missing something plus you have to pay for them so after looking around a bit I found this plugin here is the link. This plugin is very well explained and works very well.

Unfortunately we are not out the water yet although we can setup the device to receive quite easily we need to push to the device. Luckily for us we have apns for php download the code from this link then once you have got your head around it go to this link and follow the instructions very carefully as this will instruct you on how to create a .pem file which is needed to send the notifications.

Don't worry if you are still struggling as later on I will do a step by step tutorial that you can follow.

So you have configured your push account and created your .pem file which you have included in you code finally you are receiving notifications.

Custom Methods

Ok so you are now a phonegap guru, not really but you might think you are, so we move onto the next step.

Plugins in phonegap are very well documented and nice and easy to create

More to come...


No comments:

Post a Comment