Archive for the 'iphone development' Category

Using Admob to monetize your iPhone Application

Sunday, December 13th, 2009

Couple of weeks ago I signed up with Admob to try out their iPhone In-App advertising system. Since then Admob has been bought by Google, btw…

I implemented the Admob API into one of my most downloaded free apps, which was really easy. Just add a few libs and classes, place a view and you are ready to go.

The interesting part, of course, was how much money can be made through Admob. Admob uses a CPC-based system, much like Google Adsense. Advertisers book ads on the network, they are shown in your app, as soon as somecone touches the add, he is taken to the advertisers website or to his app in the Appstore. And of course you earn some money.

The App I tried it on has been on the Appstore for about 9 month and has constantly been downloaded roughly 600 times a day. This sums up to about 150.000 downloads.
I have never used any tracking techniques to see how often the app was actually started each day. So I was in for a little surprise when I saw the actual ad impressions for the first day.
I have set the App to display a new ad every 30 seconds. This ads up to about 10.000 ad impressions per day, which was quite a bit higher than I expected.
Click-Through-Rate was also at a rather high 4-5%.

All In all this adds up to a revenue of $20 per day for this app.

So here’s the revenue over the past few days. In the last 3 days revenue went up due to higher CPC and more impressions.
admob-revenue

Here’s the sales stats for the past few months (courtesy of AppViz)
app-sales-appviz

So, suffices to say I am quiet pleased with this return. Not getting rich on this, but it’s still quite some money. With this steady income I estimate the app to pay off after about a month, considering the time I spent developing and after that it’s nice passive income for the time being.

Of course 150.000 downloads is pretty good for an app which has never gotten any widespread exposure. But still it stays in the Top-50 of it’s Appstore category in the major markets and gets a decent amount of downloads.

So probably you are wondering if it’s really that easy to replicate this (although small) success. Well, frankly I think it’s luck that my App seems to be used that much. You need to come up with an idea for an app that is used by a very broad range of users and on a regular basis.

Overall I am pleased with the income from my little app and think that Admob can very well be an alternative for monetizing an iPhone app. With now over 100.000 apps in the store the space on the sales charts gets very tight for paid apps and making even $20 per day from a $-,99 App can be quite difficult.

Random int in Cocoa on the iPhone

Friday, May 1st, 2009

So you just need a random int value in Objective-C? Here you go. The following code produces a random int between 0 and 4:

srandom(time(NULL));
int i = random()%4;

Please note, this is NOT a very efficient way to get randoms. Use it only to get a relativly random number every now and then ;)

iPhone OS 2.X version usage

Friday, April 17th, 2009

I just wondered how many people might still use iPhone OS versions below 2.2. So I analyzed the traffic for one of my larger websites to get the distribution of the different iPhone OS versions. There where 862 samples (unique visitors) from 10.04.2009-17.04.2009. Please note, that the traffic is mainly from Germany, but I guess the distribution should be roughly the same worldwide. So here are the numbers:

iPhone OS 2.0: 1.04%
iPhone OS 2.1.X: 2.20%
iPhone OS 2.2.X: 96.75%


Looking good for 2.2 :)

How the AppStore handles developer-rejected Apps

Wednesday, February 18th, 2009

As every iPhone developer knows it takes Apple quite a while until a new version of an iPhone App is reviewed and released to the AppStore. Sometimes it can take so long, that you already have the next version number of the App ready for submission.
While your App is in review you can “reject” the submitted version yourself and thereby pull it from Apple’s review process. After you pulled your App, you will only be able to upload a new version with the same version number as the previously pulled!
So, if you submitted version 1.5.1, keep developing and have version 1.6 ready before the 1.5.1 update was released you need to submit the update with version 1.5.1 in the Info.plist file. IF you don’t do this Apple will contact you and they can change the version number on Apple’s website, but this will again take some time.
So, if you reject your App, don’t change the version number!

Using ASIHTTPRequest on the iPhone

Sunday, February 15th, 2009

ASIHTTPRequest is a great wrapper around HTTP requests on OS X which also supports the iPhone API. If you want to use it on the iPhone you need a Framework, that is usually part of CoreServices on OSX. CoreServices is not available in the iPhone API though. What you need to do is adding the “CFNetwork.framework” to your iPhone project in Xcode or ou will run into errors when linking the project. The framework is usually located here (iPhone SDK version can change, obviously):

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/Frameworks/CFNetwork.framework

Mirror a UIView with the iPhone API

Tuesday, January 6th, 2009

Just a very brief note on how to mirror UI elements on the iPhone with Cocoa. You need to apply a CGAffineTransform to flip the element horiziontal or vertical, like in the examples:

view.transform = CGAffineTransformMakeScale(-1, 1);

iPhone AppStore promo codes for Speedbox

Sunday, December 21st, 2008

Yesterday I released a big update to my iPhone App SpeedBox. Since over 6000 users updated to this new version, I guess this application is still kind of popular.
So I’d like to give away 10 promotion codes for a free version of SpeedBox. US-based users can redeem these codes in the AppStore and download SpeedBox for free. Unfortunately Apple only offers promo codes for US customers. I will be more then happy to give away some codes to international users, as soon as Apple allows, though.
So, without durther ado, here are the codes. Grab them while they are hot. If iTunes tells you that a code is not valid anymore, someone else was faster.

4RYHP9TWW7NK
HFRK3HY6HLKY
ML7KEARW9X3W
HWFKP94KT4WP
9X3MEEXWNF47
JNTEKWEA3YAP
7P6X7WR6JLAP
3WYTF9763PTK
FJE6A7ETHXPH
LLPKLRHTPXKY

  1. Copy a code
  2. Open iTunes, go to AppStore
  3. Click “Redeem” on top right
  4. Try another code when yours is not working
  5. Tell me if you liked the app via the contact form ;)

SpeedBox displays the current speed you and your iphone are traveling with. With the latest update it will show you an anlog speedometer, both for mph and km/h mode. You also get a handy graph that shows you how fast you where going in the last minutes.
While this may look quite silly at first, it can be really entertaining to track your speed. Probably not while walking to your neighbor shop, but in trains or airplanes for example.

SpeedBox

Make your CALayer invisible to hittest

Sunday, December 21st, 2008

Just a short tipp for iPhone developers. Maybe you’ve got several stacked (by CALayer addsubview) CALayers and want to get touch events for some sublayers, but need to make other CALayer see-through for hit-testing with the CALayer hittest method.
All you need to do is implement the containsPoint method to your CALayer subclass and return FALSE. This will make hittest look farther down the Layer stack for touchable layers.

- (BOOL)containsPoint:(CGPoint)p
{
return FALSE;
}

Make a CALAyer transparent for hittest.

How to install OS X iPhone Disk Image for development

Monday, July 21st, 2008

The FAQ at the iPhone Developer Programm says to “Download the OS X iPhone Disk Image (.dmg) from the iPhone Dev Center “.
Unfortunately the FAQ is kind of out of date here. The DMG is presently not available for direct download. WHat you’ve got to do, to get a working .ipsw is looking into ˜/library/iTunes/iPhone Software Updates and choose a proper .ipsw (for iPhone 2.0) from there. If you (like me) have not upgraded to 2.0 with iTunes and there is no proper ipsw in the folder, you need to do a “Restore” in iTunes. This not only backups your iPhone (which is a good idea to do before putting it into development mode), but also downloads the latest iPhone build to ˜/library/iTunes/iPhone Software Updates. You have to choose this file (presently iPhone1,2_2.0_5A347_Restore.ipsw) instead of the ipsw that the FAQ tells you to download.
I spent like 15 minutes looking for the damn dmg on the Developer Website…