Building a Enabled PhoneGap App - Part 5

This post is more than 2 years old.

Welcome to my final entry on using services with PhoneGap. I apologize for taking so long to get this entry out the door. Blame Germany. (I blame the Maß.) In this entry I'll be wrapping things up and discussing what should be done to get the application to market. Both on the PhoneGap side as well as Parse. Let's begin with the PhoneGap side.

Preparing Your PhoneGap App

I mentioned that I was making use of PhoneGap Build to create applications out of my source code. In order to publish to the Android and iOS markets, you need certificates for both. Instructions for how to do that are beyond the scope of this blog entry, but you can find good documentation for both.

Android - Signing Your Applications
iOS - App Store Resources

The Android set up is relatively simple and can be done in about 5 minutes. For iOS you will need a developer account ($99) to even read the docs behind the link above. I find the iOS certificate process quite a bit more confusing than Android, but after doing it a few times, I've gotten it down to about a half hour process.

The good news is that once you have created the certificates for both platforms, PhoneGap Build makes it super easy to use them. You simply upload the proper documents and then edit your project to ensure they point to them.

Once you've done that, you can generate release builds just as you would any other build. Simply update your code and PhoneGap Build will do the hard work for you.

Submitting to the various app stores is also a bit out of scope for this post. As we all know, Android makes this relatively easy. You're app can be public in about half an hour. iOS is more of a waiting game. (Details on my own app at the end of this entry.)

Locking Down Parse

In this series (and other blog entries), I've raved about how darn cool Parse is. But you may be wondering - if code can be used to generate any type of object, what happens when someone gets a hold of my JavaScript code and creates ad hoc data? Thankfully, Parse's dashboard has a way to handle this.

The very first thing you will want to do is go into your application setting and disable "Allow client class creation."

This will prevent hackers and ne'er-do-wells from adding random types of data to your storage. (In case you're wondering - I did this for my application.)

The second option you have is a bit more involved. Parse allows for full ACLs (Access Control Lists) over data. By default it's free for all. Anyone can make anything. You can disable this globally in the settings by disabling anonymous users:

But most likely you want to provide more fine-grained control. Parse allows you to control access at the type and object level. Here is a screen shot of the permissions screen for the TipObject.

As you can see, you have incredible control over your data and how people will be able to interact with it. I disabled both Delete and Add Fields. But you have many more options here. You can assign users and roles to specific permissions based on whatever your application's needs are.

The main point is - even with this being an open source JavaScript-based application - still allows me to lock down access to prevent people from going crazy with the application. That's an awesome feature and truly makes the service worthwhile I think.

Wrap Up

So - I actually did submit my application to both the Google app store and iOS. Unfortunately, Apple turned me down. Why?

We found that your app encourages fraudulent or reckless activity, which is not in compliance with the App Store Review Guidelines.

In all fairness, they're probably right. Most cow tipping would probably involve a bit of trespassing, which is, technically, against the law.

Luckily Google ain't a prude like those fellows over at Apple!

You can download the app right now if you're really, really into actually tipping cows.

So - that's the end of this series. I do plan on doing more blog posts though. Specifically, I'd like to demonstrate how to connect PhoneGap/ apps to Facebook. I imagine that would be of interest to folks. I'm also open to any suggestions about what topics to cover. Just let me know!

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA

Archived Comments

Comment 1 by Pete posted on 10/25/2012 at 11:01 AM

"but after doing it a few times, I've gotten it down to about a half hour process."

I don't think I'll ever get it lower than that, and that's only if I've already got the key chain access rubbish sorted out on the mac before hand.

I've not tried an Android app submission yet, I look forward to trying it.

Comment 2 by Raymond Camden posted on 10/25/2012 at 6:04 PM

Given what you have to do to sign up for Apple's Dev program, I'm surprised they haven't built a simple form for this. I mean, they _do_ have nice forms and stuff, I just mean like a 'one click form'. Then again - I'm lazy. :)

Comment 3 by sam posted on 10/26/2012 at 6:50 AM

awesome series! Looking forward to the FaceBook integration tutorial!!
On a side note. Do you know of any mobile app theme templates out there? I can't even find them for ios, as it would be too hard to tweak css to make a html5 app look native..

Comment 4 by Raymond Camden posted on 10/26/2012 at 4:13 PM

There are a couple. The ones I'm familiar with are jQuery Mobile and Twitter Bootstrap's responsive stuff.

Comment 5 by april j posted on 10/29/2012 at 12:49 AM

Nice series! Thanks. I feel like I am armed with enough info now to prototype an idea out using

Comment 6 by Jim posted on 10/30/2012 at 6:20 PM

Great series of articles - if you get a minute - any chance or a tut on a)client database/storage synchronisation with parse for offline/online use b) login authentication using parse. Or both as Christmas is coming up!

Comment 7 by Raymond Camden posted on 10/30/2012 at 6:36 PM

a) I already did one. :)

b) I'm working on a user demo now. Spoiler - Parse's built-in "user" support is freaking incredible. They cover everything.

Comment 8 by Alex posted on 10/31/2012 at 9:41 PM

I would love to see a facebook login authentication using parse and phonegap at the same time (they don't seem to like each other, regarding the passing of the authtoken etc.) and of course, how you can make use of the powerful parse push notification feature in conjunction with phonegap. I just stumbled over your blog, love it. Greetings from Germany!

Comment 9 by Raymond Camden posted on 10/31/2012 at 10:07 PM

Alex, just today I blogged on Parse/User stuff. I don't cover Facebook/Twitter yet, but I plan to next.

Comment 10 by Nick McIntosh posted on 11/5/2012 at 8:56 AM

Thanks for the excellent blog posts, I'm using them to start making an app. It would be teriffically helpful to have a post on integrating Facebook with a phonegap/parse app.

It's difficult to know how to get either the Phonegap Facebook plugin to play with Parse, or how to get the Parse Facebook SDK to work without requiring a site URL.

The phonegap plugin sounds great, utilising the single sign on facility on iOS. And obviously Parse's automated User creation using Facebook details is great too.

Your help via a blog post would be very much appreciated, I'm sure.

Comment 11 by Brandon Murray posted on 11/27/2013 at 6:00 PM

Did you ever get a chance to work on the Facebook integration?

Comment 12 by Raymond Camden posted on 11/28/2013 at 5:38 PM

No, sorry, I didn't.