Objective-C

Make the date understandable

February 20th, 2015 posted in Apps Developement Objective-C

Dates, they really suck. What I mean is dates can be written many ways. Just mentioning TimeZone or date localization will make even the best programmers shake.
A date written like 3-2-2014 can mean different thing in different parts of the world. In most European countries it would mean the 3 of february 2014 but in the USA it’s the march 2 2014. And then we just covered the numeric date representation.

How does one solve this, in a way that the user isn’t easily confused. You could just write out the hole date, but there isn’t always room for that in you interface.

Read the rest of this entry »

Checking device or system version.

February 3rd, 2014 posted in Apps Developement Objective-C

Sometimes you need to check the system version, because some a newer version of the SDK adds new methods or worse deprecates one in favour of a new one. I often see example like this one:

if ([[[UIDevice currentDevice]systemVersion]floatValue]<5.0) {
   [self presentModalViewController:errorView animated:YES];
} else {
   [self presentViewController:errorView animated:YES completion:nil];
}

In this example you’ll see that the system version is casted to a float and checked where it is lower than 5.0.

Read the rest of this entry »

My firs Mac

January 27th, 2014 posted in Apps Developement Objective-C

Let me start off by saying I’ve not been a mac user since the beginning. The first PC at our home was a Commodore PC 20-II. Which my dad manage to crash the first day we got it back in 1987.

Commodore pc 20II

My first every Computer

Read the rest of this entry »

To translate or not

June 4th, 2012 posted in Objective-C

Creating a lot of apps have taught me some important lessons.

One being also keep in mind that you may have to translate your app.
I tent to use NSLocalizedString for every string I write in code just so that when its needed I can easily translate the app. Which has been a time saver many times.

I don’t really use the multilingual NIB (adding localised versions of NIB files). Because, especially in early stage if development, you have to maintain two or more files. I just do it in code and adjust the UI if needed.
Getting the size of a string is fast en easy.

Retrieving files for document directory

March 21st, 2012 posted in Apps Developement Objective-C

Ever had the need to retrieve data stored in the document directory of you iOS application. Well surprisingly Xcode can help you.
Read the rest of this entry »

Deprecating uniqueIdentifier is a good thing.

March 9th, 2012 posted in Apps Developement Objective-C

Since iOS 5 was first in beta many developers started complaining about the fact that the [[UIDevice currentDevice] uniqueIdentifier] got deprecated.
Some developer even stated that is was the worst idea Apple ever had.

Well I don’t agree with them, this is about the smartest thing they did. If only for the privacy of the user.

Read the rest of this entry »

My Interview got published

February 28th, 2012 posted in Appsterdam Developement Objective-C

My Interview in iPhone magazine
Just before the end of the year iPhone Magazine interviewed me for there magazine.
Its about my work as an iOS developer at Oberon, they add at a “Meet the developer” in this issues.
They will be adding this section to all there upcoming issue, hopefully this wil give user some idea of what it takes to develop an app.

The magazine is in Dutch and you can buy it online.

Running iOS 5 build apps on the orignal iPhone, iPod touch and iPhone 3G

December 27th, 2011 posted in Developement Objective-C

With the introduction of the iPhone 3GS Apple made a major switch in processor architecture, they went from armv6 to armv7.
Now that we have all update to Xcode 4 with iOS 5, Apple seems to be of the opinion that you can drop support of the armv6 architecture.

Well this isn’t always the case, especial if you want to keep support for those device that can run iOS 4.*. Luckily there is an easy solutions for this.

Read the rest of this entry »