The Elusive Quick and Dirty iPhone App
November 9, 2009 4:05 PM   Subscribe

What is the most painless route to developing and selling an iPhone app?

I'm interested in building a game similar to the ones made by Storm8. As far as I can tell, those games are just web apps -- HTML, JavaScript, and some server-side scripting. The apps used to access them are just simple skinned browsers with some hooks for device ID authentication. Since almost all of the game is managed server-side, Storm8 can push updates to all players instantly without requiring them to download a software update.

I know HTML, JavaScript, and PHP. I have a killer game idea that seems to fit into that model and I don't see why I couldn't make it happen with my current skill set. So, where do I go from here? How do I painlessly build a client app to connect to my web interface, and get it in the App Store? I don't want to touch Xcode or Objective-C if I can avoid them. I'm willing to outsource development of that part if the price is right (meaning: extremely, ridiculously low).

How can I avoid the nightmare of complicated legal gymnastics I've heard some devs go through? Where can I find the official list of guidelines Apple supposedly follows when deciding to accept or reject apps? I should probably make sure my idea complies before I start coding. What else do I need to know before I enter the strange, intimidating land of iPhone development?
posted by The Winsome Parker Lewis to Computers & Internet (21 answers total) 12 users marked this as a favorite
 
Why not expand your skillset? Objective-C isn't difficult, Cocoa is amazing, etc. WebKit's JS performance is nice, but you can get better performance out of native code. (Just because your game might be simple does NOT mean performance doesn't matter on my phone.) PHP is completely out of the question (terrible performance, even if it did exist on the phone).

I know this is just going to set off a bunch of replies that tell me how utterly wrong I am, but:

Any good programmer can learn new languages and frameworks easily. If you can learn JavaScript, you can learn Objective-C. There are some seriously powerful tools provided by Apple that you get to use if you don't do everything in your power not to use them—both in terms of language, frameworks, and development tools (UI, coding, debugging, and performance profiling).

Grab a Cocoa book, read the Objective-C programming guide, and dive on in. The water's nice.
posted by Mikey-San at 4:28 PM on November 9, 2009 [1 favorite]


Blatant self link starts here!.
posted by schwa at 4:35 PM on November 9, 2009


"Objective-C isn't difficult" assuming you know C, C++ or similar. Not sure how I'd feel about Objective-C if I was coming from a JS/PHP background though. Definitely worth picking up a learn Objective-C book and getting your feet wet. The water's nice.
posted by schwa at 4:38 PM on November 9, 2009


Mikey-San: I may look into learning a new language but for now I'm just interested in the shortest distance between two points using my current skillset. Free time is at a bit of a premium for me these days.

In case I wasn't clear: I wan to build the game as a web app running off a remote server. The PHP would run there, not on the phone. The phone app is just a client, basically a web browser configured to run only one site.
posted by The Winsome Parker Lewis at 4:38 PM on November 9, 2009


If you are certain your application can be done using HTML, Javscript, and PHP then you could start by writing that portion and testing it on an iPhone. Since it's a web app you don't need a dev account or anything to get going. You will probably need to use some of the extra junk Apple added to WebKit so you can store the application and it's data on the phone for play offline.

I'm pretty sure you can't distribute webapps via the appstore. You'd need to build something that wraps that all up. (So something that loads up webkit and your locally stored HTML files and junk.)
posted by chunking express at 4:41 PM on November 9, 2009


Also, wouldn't your game only work when players have net access?
posted by chunking express at 4:41 PM on November 9, 2009


chunking express: Yes, you're describing exactly what I'm trying to do, with a WebKit wrapper. That's the Storm8 game model as well. I'm not even sure I'd need any local HTML files if everything's remote. Maybe a "loading" screen to display initially while the server is first contacted. And yes, this game can only be played online, but it's an MMO and that's basically the whole point of what I have in mind anyway. :-)
posted by The Winsome Parker Lewis at 4:50 PM on November 9, 2009


You're just talking about making a web game at this point, from what I can tell. There's nothing iPhone-specific here. What would you need an app for that Safari itself wouldn't do?
posted by Mikey-San at 5:03 PM on November 9, 2009 [1 favorite]


You can definitely dev and test the app just using MobileSafari.

You'll need Xcode obviously to build the finished product. You'll going to have to spend _some_ time learning how to use Xcode and configure projects. (Configuring a project for release on the appstore is a bit convoluted - esp. for first time devs).

You need to be really upfront with prospective customers and with Apple. Customers do not tend to like being sold apps that are just website wrappers. Apple may not allow your app onto the store - they _could_ potentially disallow it for not working when not online (your app will need to gracefully handle no network access).

Why is an app compelling to the user and not just a website? What does a user get from this?
posted by schwa at 5:04 PM on November 9, 2009


schwa: Good questions. I need to be user-centered or my game will fail. I'm not sure what advantage users would see in an iPhone app vs. a traditional web app. I am of course interested in the huge potential audience of the App Store, and its painless (see a theme here? haha) ecommerce system. I haven't worked out a payment model yet but it'll probably be free for the basic game with extra functionality available for $0.99. A full app and a "lite" version in the store.

I suppose users might appreciate the convenience of finding the game in the App Store too. If they're looking for a new game they can play on the go, they're more like to search there than on the broader Internet. Plus I am designing the interface specifically for the iPhone screen, so it would feel strange if used in another environment (and I want to wall it off so it's only playable through the iPhone client). If I design it well it won't feel like a web app at all.
posted by The Winsome Parker Lewis at 5:21 PM on November 9, 2009


If you're not familiar with Storm8 I suggest you check out Kingdoms Live or one of their other games (they're all fundamentally similar). I'm not copying those games, as the gameplay mechanics of my idea are totally different. But I keep mentioning Storm8 to show that there is already much precedent for skinned web apps for sale in the App Store. I'm not describing a radical departure from what's already been done many times already.
posted by The Winsome Parker Lewis at 5:29 PM on November 9, 2009


Honestly, you might want to look at doing payment stuff outside of the app store and just do everything on your own. I mean, what exactly does the appstore bring to the table? Questionable visibility and payment processing, for which Apple will charge you 30 cents on the dollar.

Anyway, I think you will at some point want to learn how to launch a webkit view that will load your HTML. I am sure there are tutorials to do that online. I don't think that would be a huge amount of coding. You'd need to spend $100 on a developer account at some point, but you can put that off till you have a game working and actually need to build the iPhone app portion.
posted by chunking express at 6:15 PM on November 9, 2009


I'll just say for the love of god please don't make another freaking ***Wars clone. They spam up the app store and are a bane on the very principal of the app store. They have 50 differently themed versions of the same damn game and 50 different versions of each of those with different reward points. The games themselves are unimaginative in concept and no better than spam.

Also, do some reading on how many app developers have failed at making much at all on the app store. Hint...its more than those that have made money, but that's Apple's dirty little secret.
posted by Elminster24 at 7:47 PM on November 9, 2009 [1 favorite]


In the iPhone SDK, you can wrap the WebKit component. I don't remember what its called, but it actually is ass-easy to make an 'app' that is really just a wrapper around webkit, if what you're trying to do is make a webapp you can sell for a buck on the App Store. Ok, looking it up now: the section in the PragProg iphone book is called "Building a Browser in 10 Minutes with UIWebView".

I'm normally the last person to be like "programming stuff is easy!", but if you already know a whole bunch of other programming nonsense, downloading the iPhone SDK and getting a little app to show a UIWebView hardcoded to load your site is actually pretty easy. I bet it will take you more time to work out all the noise with code-signing and actually getting your hello world to run on your phone than it will take you to get this running in the simulator.

Still, no reason why you can't just start hacking on the app in web-only mode for now to make some progress. Anyway, this is what you need:

- Apple Dev Tools. Download the newest version at developer.apple.com/iphone. You have to make a free account. The DL is like 2.5G so it takes a while.
- Some sort of a book or tutorial about creating simple one View apps with UIWebView. You can download the PDF of the book I'm talking about from pragprog, the section you want is Chapter 12, page 235.
- (your whole web app aka the hard part)
- A hundred dollar iPhone developer program membership. At the moment, you can't buy this, cause the goddamned developer apple store is broken. But Apple says sit tight, maybe it will work tomorrow. You need this to run code on phones, submit code to the app store, etc.

Mastering Objective-C, all of Cocoa Touch and the other frameworks, etc. is hard. Its like any other rich platform: it will probably take ten years to really become good at it, and by then, it will be irrelevant. However, you don't need to do any of that. You just need to open XCode and Interface Builder, add like a line of code here, line of code there, and that's it.

Disclaimer: I have no idea about any of the market/Apple approval issues with this. I'm just saying from a technical basis, even without some special toolkit, making a skinned browser app for the iPhone is shockingly easy.
posted by jeb at 8:17 PM on November 9, 2009 [2 favorites]


Nokia's Ovi Store allows you to publish widgets which are basically html, javascript and css. They are operate in much the same way as Operas widgets but with some phone specific code available. Their version of this is called WRT if you want to look it up.

I realise this doesn't answer your question directly, but it may be an alternative for you. I know that the iPhone has a firm footing in many countries, but Nokia obviously have a large installed userbase worldwide.
posted by Gomez_in_the_South at 12:47 AM on November 10, 2009


It's extremely easy to build an app that just loads a web page. Add a UIWebView and send it a request to load a URL. It'd take you 5 minutes tops.

See here.
posted by wongcorgi at 2:12 AM on November 10, 2009


These 5 lines would do it for you after you added a UIWebView in Interface builder and created an outlet for it (named webView)..

NSURL *url = [[NSURL alloc] initWithString: @"http://your/url"];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL: url];
[webView loadRequest: request];
[request release];
[url release];

Add them to your viewDidLoad and you're done.
posted by wongcorgi at 2:16 AM on November 10, 2009


Great answers, all! I'll go back and mark "best answers" after any final posts have had a chance to trickle in.

For now, I think I will go ahead and build my game in PHP and figure out the WebKit wrapper part later. I really like the idea of just outsourcing that part, maybe to schwa's group. If it's so simple to build that, I'd imagine it would have a pretty low price tag. And could be built extremely quickly. So I'll just cross that bridge when (if) I come to it. The bigger task in front of me right now is, obviously, programming the game itself. Since this is just a hobby/cool idea I had, I'm not even sure if I'll see it through all the way. But if I do, I'll post it to MeFi Projects. :-)

If anyone's still reading this thread, I have two follow-up questions you might be able to help me with:

First, some have suggested that WebKit on Safari has special properties or functions available to JavaScript developers. Or maybe I just misread. What special iPhone-only stuff can I do with JavaScript? I'm particularly interested in authenticating users automatically by device ID; can that be done with JS or would something special need to be built into the wrapper app?

Second, if I outsource the actual wrapper development, wouldn't the developer actually be the one paying the $100 and agreeing to Apple's SDK terms and whatnot? How does that work? If I'm not even touching the iPhone dev environment, how many hoops would I have to jump through myself?
posted by The Winsome Parker Lewis at 7:50 AM on November 10, 2009


If you want to sell apps in the app store (and collect the money), you have to sign up for a developer account. I guess you could get the dev to do it, but then every month they will have to figure out how much you sold, and then pay you. (And you'd better trust them.)
posted by kamelhoecker at 3:15 PM on November 10, 2009


First, some have suggested that WebKit on Safari has special properties or functions available to JavaScript developers. Or maybe I just misread. What special iPhone-only stuff can I do with JavaScript?

If you're writing a game, you might want to check out the CSS 3 webkit transforms and animations.

Also, it has document.querySelectorAll, which retrieves DOM elements by CSS selector, so you don't necessarily have to use one of the javascript libraries for that.

There's also a geolocation api.

I really like the idea of just outsourcing that part, maybe to schwa's group. If it's so simple to build that, I'd imagine it would have a pretty low price tag.

While you could go this route, I'd recommend against it. I stumbled around for about two days with probably less information than you've got in this thread and managed to put together a web browser controlled by five buttons, each tied to a function-specific location on our web app. It really isn't a big investment, you'll learn something, and you'll have a foundation for trying to do something else.

wouldn't the developer actually be the one paying the $100 and agreeing to Apple's SDK terms and whatnot?

You almost certainly don't want to do this unless you work out a partnering agreement with the developers in question; that account is how you manage your app's deployment, how you communicate with Apple about it, and how you collect revenue.
posted by weston at 3:39 PM on November 10, 2009


Thanks again to everyone. This has been an informative and helpful thread!

I feel compelled to mention, for no particular reason than to defend my own pride, that my game idea is not another Mafia Wars clone. I hate that spammy recruit-everyone-you-know crap as much as anyone. I couldn't live with myself if I was developing something like that. I think my idea could be an innovative and fun stats-based trade simulation game, and that's all I can really say about it now. I have to start building this thing and fleshing out the game mechanics before I'll even know if the concept holds water. :-)
posted by The Winsome Parker Lewis at 9:35 AM on November 11, 2009


« Older Staunching a potential anxiety attack?   |   Best firefox add-on for previewing tabs? Newer »
This thread is closed to new comments.