Objective-C load and initialize

These two static methods of an ObjC class allow you to run initialization logic where you can set up any static state. Both methods are only invoked if implemented and do not need to be declared in the interface of your classes. The differences between them are as follows: In an application, or in a […]

Ports and processes in Ubuntu

This command will show what processes are currently listening on what ports on your Ubuntu box: sudo netstat -lntp If you have installed nmap (sudo apt-get install nmap), you could also run sudo nmap -A -T4 localhost to try and find out the name and version of the services running on each port. The output […]

Custom configuration for Plesk domains

If you ever change your web server configuration files under Plesk manually, your changes will be overwritten the next time you use the administration console and apply any settings through it. This can be solved by adding a configuration file to your domain config folder /var/www/vhosts/<yourdomain.com>/conf/vhost.conf or subdomain config folder /var/www/vhosts/<yourdomain.com>/subdomains/<subdomain>/conf/vhost.conf depending on which element […]

Redeem an AppStore coupon from outside the US

DEC 2010 UPDATE: This article is now obsolete. Apple changed their policy and promo codes can now be redeemed in any App Store worldwide If you have received an AppStore coupon for an iPhone/iPad/iPod Touch application, you will only be able to download your free product if your account is based in the United States. […]

Custom SQLite build and iPad

I have built my own SQLite3 library in order to enable support for full text search for my iDEX app, I compiled and tested on iPhone (iOS 3 and 4) with no problem, but then I switched to the iPad target of the same project under iOS 3.2, where the application would crash as soon […]

Base SDK, Deployment Target, Weak linking and import

With the new release of Xcode for iOS 4, I was disappointed to find out that it’s not possible to select versions of the iPhone SDK prior to 3.2 from the usual build drop-down box. So I decided to take the annoying opportunity to find out more about how to create applications that use a […]

Longitude and latitude from Google maps

Do you need to know the coordinates of somewhere in the world? Open up Google Maps at maps.google.com, find the spot you want and make sure it’s centred in the map, then run this simple JavaScript command in the address bar of your browser… javascript:void(prompt(‘Latitude : Longitude’, gApplication.getMap().getCenter().lat() + ‘ : ‘ + gApplication.getMap().getCenter().lng())); The […]

Internationalise your iPhone apps with Xcode

There are only a few simple steps to follow in order to make an iPhone app easily adapt itself to the language and cultural context of the device, and with Xcode you can quickly add the features that make your code internationalised. But let me set the scene first by briefly clarifying what is meant […]