Ad

Our DNA is written in Swift
Jump

__MyCompanyName__ Treats Warnings as Errors

I finally figured out three XCode settings that I’ve been dreading to change for quite a while now. See if you didn’t think of changing them yourself as well, but could not be bothered to Google them.

Are you still working for __MyCompanyName__?

If not you might want to change what XCode puts into the standard header which is being generated for all new files.

//
//  Report.m
//  ASiST
//
//  Created by Oliver Drobnik on 24.12.08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

There is no UI method of changing this string which is kept in the XCode preferences file. Instead you have to use a command like this.

defaults write com.apple.Xcode PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "Drobnik.com";}'

The result being that from now on all code belongs to your company, even if it’s just a company of one.

Read more

Tripple your Sales in 2 Weeks

geocorder adLong time ago I created GeoCorder to have an app to record GPX tracks. These tracks can be mailed to an e-mail address in your address book and get attached to the mails. Something that was not possible before iPhone OS 3.0.

When I put it on the store for free the downloads skyrocketed only to crack on 0 as soon as I set the price to tier 1. That’s where sales stayed for many months, mostly 0, on some days as high as $2 in revenue. MyAppSales tells me that the daily average was around $1.50 in royalties from GeoCorder.

Enter AdMob. Andreas Heck of Super Trumps fame told me about his positive experience with integrating AdMob ads in his products, so I felt compelled (or shall I say envious) if his earnings. I made a couple of improvements of the GeoCorder codebase and added a new target that would display one AdMob cell in the table that shows the recorded tracks. As usual Apple wanted to play ball, so it went back and forth until finally GeoCorder [FREE] hit the store on June 7th.

Read more

Display Local HTML file in UIWebView

Stefan87 asks:

Is it possible to display a HTML File which was created by the application in a UIWebview?

I would like to provide a helpfile in HTML-Format in the webview.

I’ve read the documentation, but it seems that every loadprocess requires a URL ?

I wanted to do the very same thing for displaying the instructions in LuckyWheel. After some experimentation I found the following way to be the simplest for me.

Read more

You Have All The Trumps … in one single XCode Project!

I recently helped Andreas Heck to unify 4 of his projects into a single one. Before this intervention he would copy the project from a previous “Super Trumps” app and modify parts of it to fit the new theme. But of course this would multiply the effort necessary to do updates with every iteration of the process.

Top Trumps Cars Top Trumps Guns
Top Trumps Bikes Top Trumps Aircraft

It was for this surgery that I researched and discovered the method of Target-specific Headers and many of the techniques in this article about compiling for 2.x and 3.0 from the same project. Now he can happily concentrate on just collecting artwork and information for new sets and can keep 95% of his code unchanged.

Andreas Heck is doing beautiful work on the contents of his apps, you can purchase them by clicking on the images above. Now that his first 4 “Super Trumps” games are live on the app store I checked up on them on Applyzer because I was interested which geographic preferences could be gleaned.
Read more

A signing identity matching this profile could not be found in your keychain

NOTE: You might want to check out my guide to fix code signing problems.

I am getting tons of reports of developers who had to renew their expired certificates and who now find their new profiles unusable. Also affected a developers who had to add new devices to their ad-hoc profile.

Even though everything is done by the book, they are  get a “A signing identity matching this profile could not be found in your keychain”.

Yellow Bar

I experienced certificate expiration first hand, but that was some time before WWDC and so I had no problem creating new certificates and provisioning profiles. But last week, right after WWDC, Apple amended the online process to accommodate new provisioning profiles for push-enabled apps. You have to create a new app id and thus provisioning profile for each and every push-enabled app you want to distribute.

It currently seems as if this change to the process causes non-push-enabled profiles to be faulty in a way that even though the poor developers do everything right they still wind up with the above error message and no way to fix it. Not even my handy guide on how to fix code signing errors helps. I know because I went through it together with several affected developers.

Read more

LuckyWheel 1.1.0

Lately LuckyWheel has been seeing wonderful growth in a couple of markets as I am able to see on Applyzer.

Applyzer Growth

New Player Screen

That was enough reason for my partner Michael and me to give the UI a major pimping and add a couple of bonusses some of users have been wishing for a long time.

  • Fixed: Continue Button might not get enabled even though continue is possible
  • Fixed: If player finishes round the bonus and score would not be shown correctly
  • New: UI Look redesigned
  • New: Play now against 1 or 2 AI opponents with random difficulty level
  • New: Question language can now be chosen from inside the game

I’m especially proud of the latter two. Inventing a good AI that is a challenge to play against is really hard. And the language selector is a scroll view which you can switch either with two arrow buttons on either side or with your finger.

It’s been submitted to Apple today, let’s see how long they are taking now to approve updates with the 3.0 rush going on.

We have one more thing planned for the update after this on. I want to redo the score screen and show this after each round. So if you hit the bankrupt field you only lose the current round’s points. Also I will to some more animations there. As usual let us know what

UPDATE  June 16th

Of course I missed something that Apple could use to reject the update.

Thank you for submitting LuckyWheel and LuckyWheel Lite to the App Store. We’ve reviewed LuckyWheel and LuckyWheel Lite and determined that we cannot post these versions of your iPhone applications to the App Store because of an Apple trademark image. We want to remind you of the importance of following Apple’s posted Guidelines for Using Apple’s Trademarks and Copyrights: <http://www.apple.com/legal/trademark/guidelinesfor3rdparties.html>

As an example of my trademark infringement they attached an image similar to the one above with the new player setup screen. Can you guess what their problem is? It’s the icon symbolizing a computer player! Apple does not like that it looks like an iPhone. We’ll have to think of something more original to symbolize switching between human and computer player.

UPDATE June 26th

After 10 days of waiting (probably Apple being swamped with 3.0 updates) LuckyWheel 1.1.0 finally got approved.

Detecting Internet Connectivity

For the latest version of GeoCorder Apple required me to show an alert if there was not internet connection. This is meant to prevent “user confusion” which would occur if the user is expecting something to happen staring at his screen, but nothing happens because of lack of data connectivity.

There is a good example from which you can steal the technique, but it took me some experimenting to find the right mix. For some reason that escapes me the regular connectivity check would only work within the sample, but not in my own code.

Read more

WWDC 09

I’ve been watching the WWDC Keynote presentation together with a couple of friends and one other iPhone developer and here’s the general consenus: We are disappointed. But are we righteously so?

Most of the otherwise exciting news was leaked to the public in the weeks preceding the event which unfortunately caused expectations to be way too high. Apple can do magic, but some things just take time. Like a fully recovered Steve Jobs or even a 10″ Mac Tablet we have been lusting for.

These where the biggest surprises that where met with a certain degree of enthusiasm:

MacBook Line Refresh

  • All Unibody MacBooks are now called “Pro”, dropped in price and get better CPUs
  • SD-Card Slot is now standard
  • The return of the Firewire port
  • The new “7 hour battery” technology not found in all Macs

Safari 4

I’ve been using Safari 4 for a while now but I had a problem where I would not be able to insert links into articles on my WordPress dashboard. But since I updated to the release version of Safari 4 I am happy to report that this problem is gone.

Safari is the fastest and most standard-compliant browser currently available. There is a strict benchmark called the Acid 3 which gives Safari 4 a whopping 100 out of 100 points. Safari 3 scored 76 and the new Internet Explorer 8 even less.

Also the performance of Safari when it comes to rendering and JavaScript is way ahead of the competition. Ah, and btw there are 150 new features. I especially like the new coverflow search of your browsing history. A great method to quickly find a page you recently looked at by typing a few words.

Snow Leopard

The name similarity might be meant as a hint as to the similar 64-bit underpinnings of OSX between the current version Leopard and the soon to be released Snow Leopard. The general theme is to squeeze every additional drop of performance out of the hardware. In Leopard the built-in apps still where 32-bit, but now they are recompiled with 64-bit causing a slightly better performance.

So there is special support with a new technology built into the core named “Grand Central Dispatch” which cares to more efficiently distribute loads between multiple cores. And with OpenCL it is possible for the first time to also use the graphic processing unit (GPU) to offload specific processing tasks.

Quicktime X is the newest version of Quicktime, the video playing and recording infrastructure in OSX. Again, the focus is on additional performance. Many people got annoyed that they needed to pay extra for Quicktime Pro, but this is now a thing of the past.

What I list most, personally, is that now Exchange-compatibility is complete. In Leopard you need Entourage to access your Exchange calendar and contacts. With Snow Leopard no longer. This is great news for people like me who has the family on Exchange as well as people would take their Mac to work because now they can work as an equal without having to install Microsoft Office.

There are also a couple of additional new things related to Exposé and Stacks.

But the greatest thing is Apple’s impeccable timing and pricing. Existing Leopard users get the update for just $29 in September, one month before Windows 7 is being released. The family license will cost an enormous $49.

iPhone 3GS

A great video tour on the iPhone is available on the Apple website.

  • Faster
  • Better Battery
  • Better 3 Megapixel Camera with Auto-Focus, or tap-to-focus for close-ups
  • Video Recording, Editing, Sending (MMS, E-Mail or direct to YouTube)
  • Voice Control (Press-and-hold Home) for dialling or controlling music playback with voice synthesis feedback
  • Magnetic Compass, Google Map now orients in correct direction you are facing
  • Digital Compass

OS3-specific (i.e. for all iPhones)

  • Copy&Paste
  • Voice Memos
  • MMS (finally, but who needs it?)

Summary

So in summary we CAN be happy with Apple, we’ll got a free new Safari and will get the new iPhone OS in the next two weeks. It’s again a good time to buy a new Mac right now because for $29 it does not pay to wait to get Snow Leopard with a new machine. And the new iPhone 3GS is just compelling enough to nudge speed and feature freaks to shell out.

On the minus side there are a couple of things that still take some time. I am phrasing it like that because we still want to see: Steve Jobs’ return, a Mac Tablet or Mac Netbook and maybe something really mindblowing.

Right now Apple does what every smart dealer of drugs for the technophile is doing: Give a little more every time there is a Keynote presentation. Up the dosage without overloading the audience. And on this strategy they have delivered once again.

Wait a Week

Moshe asks:

“How can make my app show a message 1 week after an event? I want to show an alert view the first time the app is launched after at least 1 week has expired and the event is still true.”

This technique can be used for any kind of action you don’t want to do right away or somehow should be based on a value determined in a previous run of your app.
Read more

Sending E-Mail Attachments

Ravikumar Gajjavelly asks:

I want to send email It contains image as an attachment.How can we send am email.how to attach image.can anybody please give solution.

When creating my app GeoCorder I was faced with the exact same dilemma of needing to attach a file to an email. I did some research and this is what I found.

Read more