BuySellAds.com

My book Barcodes with iOS 7 is nearing completion. Buy it now to get early access!
Our DNA is written in Objective-C
Jump

Your Own Delegation Protocol

Usage of delegates is prevalent throughout the SDK’s that Apple provides. A delegate is basically a way to tell a standard object “Hey you, if you need some info or want to inform somebody when something happens, talk to this guy. I’m outta here”.

This achieves three things that are an essential skills in programming:

  • you make use of a component without having to do extra work of subclassing it for customization
  • you appoint somebody else to do the work of one-the-fly customizing (the delegate)
  • you can excuse yourself and go to the pool

A good example of usage of delegates is UITableView. This standard class, to be found in UIKit, knows and speaks two protocols: UITableViewDataSource and UITableViewDelegate. As the names suggest the first deals with questions related to the content of the table to be displayed: number of sections, number of rows, headers, individual row cells et cetera. The second delegate, which is also called delegate, deals with interactions on a higher level, like if you tapped on an individual cell. Even though they are called different, both are delegation protocols and if you like you can assign discrete classes to data source and delegate for a table view.

To make this a practical example I will show how to make a class that informs your code when a headset is plugged in or plugged out.

Read more

Charitable Coding

When his son Roel was diagnosed with Autism 3 years ago, his father (also named Roel) researched possibilities to help him improve the quality of his life and discovered Righteous Pups Australia. This organization trains Autism Assistance Dogs (AAD) which are especially trained to help increase self-esteem, independence and overall well-being of the autistic dog owner.

As we know in IT, training costs money and those dogs need lots of it. About 29.000 AU$ to be exact. That’s approximately the price of 10 luxury MacBook Pros… kind of puts my own financial challenges into a different perspective.

OzSlangNow Roel has published his first app, an Australian slang dictionary dubbed OzSlang. This is a fun and essential tool for everyone who likes to brush up his OZ Slang skills to not stick out like “such a tourist” or to generally sound more like “Crocodile Dundee”.

I think you can see that the maker put a lot of love into it, it is very well made. Roel tells me that 100% of his proceeds (minus Apple’s cut) go to the above mentioned organization so that eventually the cost for a dog for his son can be covered. The details can be found on Paws 4 Roel website.

It was especially disheartening for Roel when he learned that his app had been pirated. The sales dropped and prospects for an AAD for his son deteriorated. Who can now still argue for piracy as a means of getting “trialware”? Very few (if any at all) of the people who download OzSlang from warez sites would eventually contribute to the cause.

In my book you don’t rip off charitable products especially if they are at the lowest price possible. That’s simply bad karma. If you burglarize the donation box, don’t complain if your future projects fail. That’s how karma works.. On the other hand if you want to get karmically ahead or even, it’s as easy as purchasing a copy of this app. :-)

With his next app, which is currently under review by Apple, Roel will try a different approach. Make the app free, but include a charity button. We know that Apple does not like to see money is moving where they don’t get their 30% share. But I’m keeping my fingers that they won’t mind a donation button for charity.

You can do something good by either donating directly, contacting Roel about sponsoring opportunities or purchasing OzSlang via iTunes. If your contribution is a sizable one I will throw in an hour’s worth of iPhone Development consulting for free to be used any way you like. Good Karma anyone?

Which OS Version to Target?

Now that OS 3.0 has been released and we know that the 3.1 bugfix release is on rails we have to re-evaluate the question which platforms we need to be able to support. On the one hand it might be nice to use all the new 3.0 bells and whistles. One the other hand though this could mean we risk losing half of our potential customers who are still on “old software”.

Besides simple disinterest or negligence the main reason for sticking with old software is that people are always waiting to hear from the iPhone Dev Team that a new version can be jailbroken and sim-unlocked. If you are using your iPhone in the network of your own choosing, you would not want to give this up even for the greatest new update.

From the developer’s point of view there are a couple of features (even before version 3.0) where you had to bump up the minimum OS version. I for one implemented the CLLocation properties course and speed in iFR Cockpit which only became available as of 2.2.

Just today Applyzer released an analysis of the required OS version for all apps on the store. Also AdMob frequently publishes metrics on OS versions in use. Let’s check those to get some guidance for our own apps.

Read more

Determining the Hardware Model

Not all Apple Hardware is created equal. For some apps you need to distinguish between different models of iPhones and iPod Touch. But when you query the model property of UIDevice you don’t get enough information to really know what hardware your app is running on.

With a little bit of googling I found an article on Ars Technica explaining how the pros are getting the kind of information that we regular dev guys dream of having at our fingertips. It basically uses barely documented system calls to get the infamous model string from which you can infer the real device model.

We are talking about sysctlbyname which Apple even documents as a standard C library function call to “get or set system information”. iPhone Dev crack Erica Sadun made this UIDevice category extension. We are inspecting it with awe as we see the magic unfold.

Read more

Help Us get an iTunes Connect API!

Apple to create API … if enough people want it!

Ever since my app MyAppSales got rejected I have been lobbying for an official and secure API which would permit us developers or creators of tools like AppViz to interface with iTunes Connect. The current situation, as you are probably well aware, is a real pain in the backside.

According to Apple this is the “expected mechanism for retrieving that data”. So they really expect developers to go to the report site every day and download daily reports manually. Apple makes great software and devices, but I keep asking myself how they can be so far away from the truth of the facts of real developer life?
Read more

MyAppSales Video Demonstration

Right after I e-mailed him the source code for MyAppSales, Moshe Malka responded:

OH MY GOD!
This Application is Extremely AMAZING!
“It puts AppSales Mobile in the trash bin!”

Do you mind If I review this app on my YouTube? — And I Guarantee this wont be a bad one! – Cause I am Flipping off at the amazing work!
Keep it up!

Of course I welcomed this. Long have I been longing for somebody to show the beauty and speed of MyAppSales in a video. Thank you Moshe!

Dr. Touch Fan Video

Sometimes I’ve been known to accept services as payment for services rendered. This is one example where a fan offered to create a promo video for me. He’s probably the youngest member of my Cocoa developer network but seems to be full of creative urges.

Cheesy or Cool? Leave a comment what you think!

PS: If you are looking for Hebrew localization for your apps this young person might be your man inexpensive choice.

How to Rename an Appthe

Andreas asks:

I need to rename my app to something else because the original name is a trademark of a UK-based company. After I replaced all instances of the name where I found it the name of the product is still the same. Now if I build the products stay red and I get “No launchable executable present at path.” I have changed the name EVERYWHERE. How can I fix that?

Apart from the quick fix that I found googling I am going to see if I can fix this in XCode myself. I’ll show all the steps for guidance and the “pro fix” at the end.

Read more

All That Can Go Wrong … All The Rejection Reasons

This is an overview of reasons why Apple has rejected apps temporarily or permanently. Not some theoretic reasons that might be construed from the SDK Agreement, but real instances of passed judgement. For each rejection reason the original paragraph written by Apple is included. I made it as non-judgemental as possible.

Originally this article was written for the Cocoapedia but I am publisizing it here for added exposure because I am hoping for comments informing me of missing reasons. For a reason to be included it must be documented on your blog or website and the link given. There is a website AppRejected.com that seems to be dedicating to collecting such rejection reasons, but there is no way to contact the owner and the list seems to be lacking specific citing of sources and order.

This list may serve as a checklist to help guide the general design principles such that fellow developers can avoid the temporary pitfalls which might delay their apps for two weeks. Also you might check your “killer app ideas” against this list to save you from wasting precious time on ideas that according to this list would in all likelyhood never be permitted into the store.

Read more

Piracy Data Update

In the pro versus contra copy protection debate there are some arguments against the other side’s viewpoint. Arguments that can be proven or disproven if you have some real life data available. Is there a need for piracy detection? Is this a cat and mouse game that single developers can never win?

Pirated versus PurchasedSpeaking for LuckyWheel installation base I have the following statistics available:

2052  (55%) purchased regular LuckyWheel

1661 (45%) pirated the game

3713 total (100%) LuckyWheel installations

66646 downloaded the Lite version

LuckyWheel Lite, limited to ten questions per language, is a great way to try out LuckyWheel for free. One argument I’ve heard a lot is that people will use a cracked copy to evaluate your app and if they like it very much will spend the dollar or two that it usually costs. But is this really the case?

Read more