Category Archives: iPhone

One of the big challenges with making a big iPhone game is that to do the graphics justice at the caliber expected by gamers these days is hard. There’s just too much data to package the iPhone/Retina iPhone/4 inch iPhone/iPad/Retina iPad assets all together in one bundle.

So for my latest game I’m kicking things up a notch and adding a fairly complex loading screen which will connect to my web server API and download much of the content of the game from there.

There are of course some downsides to doing this. It requires that my web servers have great uptime, and are performant enough to support all the players connecting. The added complexity means more code to maintain and debug.

However it gives a ton of options for tweaking things on players and improving the game without deploying new versions it through the App Store. It opens the door for the opportunity to split test game play options to find what values create more engagement.

If the game code is flexible enough I will be able to download new assets, change prices, run sales and promotions, and add more complex multi-player interaction.

The mobile gaming market is becoming more sophisticated very quickly and the quality required to stand out in the crowd is amazingly high. Developing something that is just OK will be a waste of your time and flop. Being an indie game developer for mobile is now a difficult undertaking.

When the code for the loading screen is done I may make it available as a component for other developers to use in their projects.

App Control is a Django App that I have been evolving over the last year for a backend service to support my (and my friends) iOS apps.

It allows you to update them, push new content to them, and provide some central storage for building things like a commenting engine and to tie everyone who uses your apps together within a community.

It also works to pull in marketing information, ad revenue, sales, updates, reviews etc and add them together to compute some higher level business numbers such as RPI (revenue per install).

Next features I plan on adding include a generic currency/wallet system and store for dynamically providing in game content and allow price changes without submitting an update to Apple.

I’m wondering if this sort of app would be of interest to anyone else out there who has iPhone Apps.

There’s a lot of people out there who have their favorite technologies and there are few more passionate debates than the issue of using HTML5 or native development for mobile apps.

It’s still early days for HTML5 on a mobile platform, the technologies are still maturing and so there are fewer libraries out there for doing things like writing games or interfacing with the hardware. Due to the nature of HTML and interpreted Javascript, performance will never match that of a native app, but with a fast enough phone and a good performing renderer performance issues will eventually not be issues at all.

Native development allows apps to build on the look and feel that users are used to on their devices. Usability should therefore be better on a native app because buttons will be using standard (tested) sizes and provide feedback that the user expects. Because native apps are compiled and optimized for the hardware they naturally have a performance advantage over HTML.

Personally I prefer to use native stuff whenever possible. But sometimes it is just far easier to hook into a web server to deliver some dynamic content in which case it can be simpler just to display it in it’s HTML form.

The current feature I’m working on is to add a commenting system to a bunch of my apps. Using the django commenting app and jquery mobile I was able to get a pretty good web based commenting system in place in a few hours. Translating that to a native form in Objective-C would have taken much longer. So I’m just going to throw up a web rendering widget in the app to load the webpage.

I see the lines blurring over the next few years in this way. HTML is catching up to native in a lot of ways but native will always have some natural advantages and is also improving. Any new hardware features will first be accessible to native APIs before they are wrapped up by webkit and exposed for use in HTML. And differing platforms will always result in HTML5 apps that have to things like “if iPhone then …”. The main benefit for HTML5 then is centralizing to servers that can be quickly updated with bug fixes and that people have HTML/JS/CSS skillsets and want to work on mobile apps.

Right now is simply too early to jump into a pure HTML5 mobile app for anything serious though. As seen by the HTML5 based Facebook App which is terribly slow on both iOS and Android and got bad user reviews as a result of those performance woes. A native Facebook app is in the works to address those shortcomings. But I would predict that it won’t be until iPhone 7 comes out that HTML5 will be able to compete from a user experience perspective with native apps.

I was surprised that there wasn’t already a script out there to download iAd reports from Apple’s iTunes Connect website.

Apple released a Java based command line tool to download the sales reports for Apps but neglected to provide something similar for iAd publishers. Some Googling around I was further surprised that I couldn’t find any 3rd party scripts to download this data.

I did however find a python script called which is a web scraper that downloads the sales reports. It handled a lot of the nasty http cookies and login stuff that is usually very tricky to do with a script. I modified that script and extended it with a function to download daily iAd reports.

The rather fascinating thing was just how complex the single page of the iAd publisher dashboard is. It was built with GWT which is perhaps the worst thing ever developed. It produced a webpage that contains 40,000+ lines of javascript and all it does is draw a few graphs. The code was terribly convoluted and nearly impossible to reverse engineer. But 6 frustrating hours later I was able to download the files I wanted.

I don’t wish this sort of struggle on anyone so I’m making the code available.

over the last week I have been seeing an odd error usually just once or twice per day out of the 10,000+ requests per day that hit my django web app backend for the iPhone apps.

It appears as though the GET parameters get dropped and I can’t explain why. Hoping someone out there has some suggestions.

The code in my iPhone apps check in to get data from the webserver. This is new content for the app. For each request it needs to have a parameter to determine which app is requesting the data – since there are a few using the same server.

The app code calls a statically defined url string like “”

However, about one in every 10,000 requests that come though create an exception because that app_id is not present.

The other bits seem to be on the mark. They don’t seem to be coming from a web browser manually.

So the most likely culprit is either that some small number of users are doing something sneaky, or there is a bug somewhere.

I’m curious if anyone has seen this issue before, or knows what might be causing it.

Solved – the problem was due to the string encoding on iOS side of things. Needed to enforce a utf8 encoding for all urls.

My mobile app control server is turning into a bit of a powerhouse.  The latest and perhaps most exciting addition to the server has been support for sending Apple Push Notifications and registering devices for those notifications.

The goal of this is to make use of the push notifications for updating the apps, and cross promoting new apps to help build bigger and bigger launches.

One of the things that’s possible to do (but which I have not seen very many examples of yet) is having an alert open a link.  It’s a very powerful feature when you consider how easy it is to link directly to the App Store, – With a LinkShare affiliate link (aff link).  So when I find out about any hot new game release, or sale event I can let my users know about it.

It took a while to figure out how to handle the notification payload so here’s the code snippet:

- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    NSString *link = [[launchOptions objectForKey:@"UIApplicationLaunchOptionsRemoteNotificationKey"] objectForKey:@"link"];
    if (link != nil) {
        //abort app startup and goto link
        NSURL *url = [NSURL URLWithString:link];
        [[UIApplication sharedApplication] openURL:url];

With that bit of code in the App Delegate I can send a notification with a {“link”:””} custom payload and when the user clicks the alert it will direct the user to the website. Because the openURL call can handle lots of custom URL types it becomes possible to link directly into the Facebook App (if it is installed), or link to the app rating page to ask for the user to rate the app in iTunes, open a map location, or even dial a phone number.

Why not use something like urban airship to do all this? Well mostly because I want to consolidate app management as much as possible. The more features I put into my custom server the more likely I will leave it open and make use of it.

Over the holidays I somehow found the time to code up an advertisement server for use with my mobile Apps.  The reason for writing a custom solution for this is that I wanted to use non-standard image sizes which I can then pull into the apps and games in unique ways so that they don’t have the look and feel of an ad.

The custom ads will be popped up in a balloon, animated across the screen or hidden in a drawer waiting to pounce.  With a unique delivery of the ad I hope it can stand out without getting in the way or feel annoying.  With the non-standard sizes I hope it won’t get the immediate “this is an ad” response from people who see it.

One of the things I have learned about doing print advertising and direct mailers is that to be noticed you have to do things unexpected.  Show someone something that they simply can’t ignore.  That’s why the classic 5 cent letters work so well – a nickel attached to a letter will immediately get noticed, and you will surely open it up.  Getting outside of the normal bar style ad along the bottom of the screen is just one simple way to break out of the expected.

Going with the standard ad services out there such as Admob or one of the many other networks is a good way to get paid, but (from my testing) is a terrible way to advertise.  Erroneous and fraudulent clicks are rampant on phones and paying for clicks simply doesn’t come close to breaking even in most cases.

I needed ads that could be targeted and integrated with the look and feel of an app.  To do that I wanted the flexibility of an image. but I also wanted the ability to provide both app specific ads as well as network wide ads.  So for example if there is a free and paid version of the app I can always advertise the paid version on the free app.  But moving the ad to the server allows me to test different images, or run special promotions.

Looking forward to seeing how it performs live in January.

Over the past few months I have released a number of apps to the Apple iTunes Store.  It’s been interesting to go though the submitting process so often and YES I have had some apps be rejected.

In most cases rejections are legitimate omissions on my part.  Missing a support link, not setting up game center correctly and things like that.  Apple does a good job of combing through apps for problems.  And I’m thankful for that because when it gets approved I’m more confident that I didn’t screw things up too badly for people that download my apps.

But on two occasions now I have had apps rejected because of the core content of the game itself.  This is really frustrating.  In one case we were able to rename and tweak the graphics to make it less offensive but it took away most of the fun as well.  The second app may not be salvageable.  It’s a couple weeks worth of work lost.

What options do I have for those rejected apps?  not too much.  I could release them to the jailbroken App Store with an ad supported version.  It would be an interested experiment to see how that would play out.

Having an app rejected sucks, there’s no denying that.  But to put things in perspective, if the iTunes store was a giant supermarket and you went in there some Saturday morning, walked up to the service checkout, put a tray of your home made peanut butter and jam sandwiches on the counter and asked them to stock your sandwiches in the store would you be shocked when they said no?

My suggestion?  Read the guidelines and if your app could be on the edge of one of them, submit it early to get feedback from the Apple gatekeepers.  You don’t even have to publish it – Leave it for developer release.


Having developed a few iPhone/iPad apps now there has been a few things that have tripped me up and created more work than necessary.

One of those is that small bugs in the program such as a bad link, misspelled words or game play tweaks like speeds and frequencies that you want to change after the app has been submitted usually require fixing the code and re-submitting the new binary which takes another week to get reviewed.  Depending on the error it could delay the marketing push on the app and cost you a week of lost revenue.

The week long delay in fixing what can be trivial typo errors can be frustrating.

To counteract that it can be useful to move some of these settings to a plist file and update the values from a website.  It can be as simple as putting a json/xml file on a web server somewhere and loading/parsing that file every time the app comes into the foreground.

This feature has become central to a few of my apps.  allowing me to update the content of the app with fresh information, it has also allowed me to test various minor changes in some games in production, and allowed me to fix a link to include an iTunes affiliate link after it was published without one.

This merging of what makes native apps so great (speed, better controls etc) with what makes web apps great (always up to date, easy to deploy fixes, and tracking) is what I find most interesting about mobile apps.

Late last week my latest game “Whack A Turkey” made it into the App Store.  It’s a really simple game that took just one weekend start to finish to write and do all the graphics for.  I also managed to pull Michael Snow in for a music loop to give it a unique and humorous soundtrack.

The game is just a seasonal take on the whack a mole genre and managing to get it out just in time for the American Thanksgiving was pretty interesting.

Initial downloads were pretty shocking and the reviews were surprisingly good for such a simple game.

Whack a turkey was really just to help me learn how to use Inkscape.  which is what I used to create all the graphics in the game.  I have to say that I was pretty impressed with how easy it is to create interesting vector graphics with the program.  I’ll be continuing to practice with inkscape so look for more games in the future with even more polished animations.

It was a bit of fun to develop Whack a Turkey and it’s currently free, but I may try to change the price in order to help pay for the music assets.