If you like my tutorials, you will love my book . It is chockful of advanced programming techniques and the only comprehensive barcode reference for serious iOS developers.
Our DNA is written in Objective-C

MyAppSales 1.0.4

I woke up early and was looking for something useful to do with this extra time that would not take too much brain power. This minor update to MyAppSales addresses a pressing issue and some internal cosmetics.

  • Before this fix the local timezone would be used when interpreting a report date. This could lead to unexpected behavior when travelling and synching reports in an earlier timezone. Now all report dates are interpreted as from timezone “America/Los_Angeles”, which is the timezone of Apple in Cupertino.
  • Cleaned up code of iTunes Connector class as a result of making the exchange rate class a shared instance, ordered the functions therein in a more logical way and added section titles for clarification.
  • Now for finding out if a report already was downloaded only the date and type is used. Before this change also time was used but this would change with different local timezones causing duplicate entries.

Refresh your copy from the customer-only SVN to get this update.

UPDATE: WAIT with updating if you have previously existing entries!!! You will get duplicate entries.  (see third fix above. Let me know if you need help cleaning up duplicate entries from your database)

Don't mention SDK/OS 3.0!

If you have any kind of updates that you are publishing right now, please don’t make the mistake of mentioning something like “made compatible with OS 3.0″. A developer friend of mine had his application update rejected because of this.

If Apple Reviewers see such a statement you will get rejected with a lengthy reply stating that the next version is confidential and you are in breach of paragraph §2.1 SDK Agreement.

“…Apple may provide You with pre-release versions of the SDK that constitute Apple Confidential Information and are subject to the confidentiality obligations of this Agreement.”

It will save you a week if you don’t do the above.

Minutes after I posted this heads-up on a forum I was seconded:

I can confirm this too. Got all our apps caught in this trap.
Don’t mention 3.0. anywhere! =P

So in summary you have to make sure that your apps run on a OS 3.0 device, but you cannot mention that you took this effort in the release notes because even mentioning OS 3.0 is illegal. Coming to think of it, I have mentioned OS 3.0 now 5 times, I hope that Austria is to far off for Apple lawyers to serve me a cease and desist.

“But I meant it well! All in the interest of the community!” will be my famous last words when I will get dragged off to jail.

Date Closest to 'NOW'

Nagarajan asks:

I have needed a SQLite query that returns exactly a time which is very closest to the current time.

From 7:00pm,8:00pm, 9:00am and 10:00pm if the current time is 8:30pm, I will require 10:00pm.

This is more of a SQLite question than related to Cocoa Touch. But since SQLite is the mobile database engine of choice for Cocoa Touch, I’ll entertain this question as well. And follow it up with some Cocoa Code.

Read more

The Definitive List of Sales Report Tools

I am trying to convince somebody (other than myself) to do an in-depth comparison of all the ways you can download your app sales reports from iTunes Connect. I wonder why no blogger ever thought of this, clearly there lots of people with apps in the store and all of these are fed up with the crappy way of manually downloading the reports from Apple.

So far the only blogger who made an effort to compare sales report and ranking tools available was Another one can be found on

All of these would benefit if we could nudge Apple towards creating a Web 3.0 open report download API. Because then we could compete on merit of our tools and not of who does the best marketing or who was able to fool Apple or not.

Read more

Build for OS 2.x and 3.0 at the Same Time

Let’s imagine I have this great MyBookshelf App and now with OS 3.0 coming I am planning to include Storekit so that my users can also purchase new content from within my app. So far, that’s a great idea. Additional features for my customers, additional income through in-app sales.

But maybe I have hundreds of thousands of users who are not immediately willing to upgrade to the new software. The reasons for this are outside the scope of this article but as an active developer you are risking loss of customers if you only concentrate on the new. 

Your choices are:

  1. make a final build for 2.x putting in all the bugfixes you can and then move on. Existing 2.x customers will only receive the latest 2.x version, new customers will have to have a 3.0 iPhone to purchase the new app.
  2. create a new app from the same codebase adding only the 3.0 features there and then continuing to push updates to both the 2.x version and the 3.0 version.
  3. create magic code to dynamically load 3.0 frameworks if they are present. This is highly advanced and only for true pros.

For this article I am focussing on option 2. I want one project to hold my source code and have two targets, one for 2.x and one for 3.0. Only the 3.0 version can include the appropriate 3.0-frameworks and I don’t want to see any compiler problems. Also I don’t want to resort to some fancy art of dynamic loading.

Read more

Adding Numbers to an Array

reembertoparada asks:

I have a loop from 1 to 30 and I want to create an NSArray with those values inside. Can you give me an idea on how to do this.

That’s an easy after-dinner exercise. First you need to take an NSMutableArray instead of an NSArray because regular objects without “mutable” in their class name cannot be changed. This is especially vital to know for arrays and dictionaries.

Read more

CRACKED! (But Surviving)

I woke up this morning finding over two hundred additional LuckyWheel installations. My first thought was that I must have striken a gold mine. I looked around for a new review, or if LuckyWheel got finally featured. Nothing of this sort.

Then I responded to a thread on iphonedevsdk forum regarding crack detection when I dawned on me: CRACKED! And if you google “Luckywheel IPA” you immediately find 3 sites that have posted a cracked IPA:

LuckyWheel Cracked

The right question to ask now is: AntiCrack still working?

And I can respond resoundingly – with proudly swelled chest – YES!

I checked the cracked IPA and found that all copy protection checks are still fully functioning. All those people downloading the cracked IPA are actually getting a limited Lite version without knowing it.

So either the cracker used an old version of Crackulous or it simply does NOT (YET) prevent the prevention. It just removed the Apple shrink wrap.

So what will happen is that all those people will find after 10 rounds that they have downloaded a Lite version and will be prompted to purchase the Full one. My current conversion rate from Lite to Full is 0.7%, so these more than 1000 additional customers might translate into ten or so additional dollars of sales every day. Not a gold mine, but still more business that I would have done without the additional marketing channel.

So the news are good! AntiCrack is still 100% safe and will continue to be because the community forming around it has begun to share knowledge as to make the copy protection even more secure.

App Charts for May 12th

These are the current hottest apps in the whole wide iPhone World for today. Ranking data is provided by a site that is promising to provide ranking information that you can get nowhere else.
Read more

Handling Deprecated Methods for iPhone SDK 3.0

In the past week I received an email by Apple, like my dear developer colleagues, stating that I have to consider whether the code of my apps is compatible to iPhone SDK 3.0. Gosh, the guys from Cupertino got me scared!

And that they can’t take a joke occurred this night: The update of my app Super Trumps, submitted about 8 days ago, has been rejected this night. The friendly associate of Apple stated that my app crashes when using it with SDK 3.0. That means: They’re testing apps already now on compatibility!

Without delay I checked the compatibility of all my existing apps and – lo and behold – in two applications problems occurred.

Read more

The Dr. Touch Tip Jar

I’ve been collecting tips for my work as Dr. Touch in my PayPal account. I found that people are most generous if they receive something in return:

  • Code to add copy protection to your apps
  • MyAppSales source code
  • Help fixing code signing problems
  • Solutions for a wide variety of head-wall-banging problems

But generally people seem to be reluctant to tip me via PayPal, probably because you associate receiving a service or product with PayPal, whereas for tipping you really would require a different and easier scheme for micro payments.

That’s why jumped at the chance of setting up my tip jar with

Here you can see the latest generious givers.