Archive for the ‘programming’ Category

iPhone App Development

Monday, July 14th, 2008

Now that the new 3G iPhone has been released into the wild, selling over 1 million phones over the weekend, a number of the NDAs, non-disclosure agreements, have been lifted, and we are free to talk about certain aspects of the iPhone and its development.

I am in the process of implementing an educational game for the iPhone, see below, and releasing it to the AppStore on iTunes.

The AppStore is Apples way of controlling how applications are purchased and transferred to your iPhone or iPod Touch. One great advantage of this concept is that you only have one point of call for all your application needs, though does involve the habit of, “Oh look, I like that”, purchase.

Another, slightly more controversial, approach is in Apple takeing all the cash generated from the AppStore and paying the companies once per month, allowing Apple to get interest on any money generated. It does however freely publish shareware applications for, free.

Individuals or companies looking to sell their product must select from a price band and get to keep 70% on the value of their app and Apple takes 30%. This is to help cover the cost of hosting your aplication and credit card transfers. I think it’s a great deal as it helps put the smaller companies and individuals in the same league as larger companies with hugh budgets.

I’ll keep you all posted on the development

Images of my current educational game, more on this later.
preSchool Screenshots

WWDC

Monday, July 14th, 2008

Well I actually made it to the big WWDC or World Wide Developers Conference this year in San Francisco. This was a very special year for Apple as it’s the first iPhone developers session for all us mad iPhone people.

It was really evident this year that Apple are focusing a lot of their effort on the iPhone as was seen in the Keynote delivered, as always. by Steve Jobs CEO of Apple Inc.

A large number of both companies and individuals from the Windows world were attending and what surprised me was the distinct disinterest in developing for the Apple Macintosh computer, iPhone was fine. In pointing out that the iPhone is in fact a very compact Apple Macintosh and runs the basic operating system as a full blown Macintosh was met with some distaste.

A lot of the sessions and labs at the conference is covered with Apples NDAs, non disclosure agreements. Only information published through the keynote is allowed to be talked about, and this of course includes the iPhone. Of note though, was the release of the new iPhone 3G. This has been much anticipated and with the current lack of purchasable iPhones on the market it is driving another craze almost as bad as the initial release.

New features on the iPhone is of course 3G and GPS. 3G technology is a lot faster that the current EDGE that was supported in the original iPhone. One downside of this is the heavy drain on the battery. Apple has given the user the ability to turn the 3G option off in order to help preserve battery longevity. The GPS feature allows your position to be determined by using satellite triangulation to get you current position and altitude. This technology should open up a wide range or applications especially the social networking group.

iSDK - Beta 5 alive

Thursday, May 15th, 2008

Iphone SDK LogoI usually try and give a few comments on each of the new iPhone software development kits that are released and was putting something together for the fourth version when all of a sudden they released a new one.

The fourth version fixed a large number of bugs within the development kit and made it a lot more stable and even added a proper Interface Builder for the iPhone, but this new, beta 5 version, cements that even more and then some. It may even be getting close to an actual release candidate.

You now use OpenGL | ES on the iPhone simulator and it works a treat. The main thing to remember is that the simulator runs a lot faster than the actual device. I don’t know why they couldn’t have throttled the speed to match more closely the actual device.

I’ve been running the new version 5 for around a week now and haven’t found any real problems with it. It handles certain things differently than before and you end up having to go through everything re-coding your work just to get it working again, but this is, as they say, still a beta version.

iSDK - Third time lucky

Tuesday, April 15th, 2008

Iphone SDK LogoA few days after posting my “Where Fools Fear to Tread” blog a third beta release of the iPhone SDK was released and I have to say that it is a much more stable release than the second. I’ve not had any problems at all with this one. In fact, it seems to compile more quickly and launch faster too.

A friend of mine was so lucky to receive their development certificate. Am I in the least bit jealous, YES. With this little electronic signature I would be able to try out the accelerometers and OpenGL 3D work, but hay, in the meantime I’ll just keep working through the APIs.

Doing a few small projects based on the iSDK just to get my head around the touch interface, Core Animation on such a small screen and a few others. The team at Infurious are hoping to have something ready for the launch of Apples AppStore, or shortly afterwards.

I’ll keep you posted.

Where fools fear to tread

Tuesday, April 1st, 2008

It has been a few days now since I downloaded the most recent beta build of Apples iPhone SDK. I would love to say how much of a change there has been and how much more stable it feels, but not so.

It has to be said, that when developing using a beta release of anything, it’s best to use a dedicated machine. Well, taking this advice on board, I installed the original iSDK on my main machine and it worked fine, rather limited, but worked.

The latest beta release arrived with much anticipation. Feeling and expecting this version to be just as stable, it went on my main machine. Oops. A large number of basic functions had stopped working. Then the crashes started happening, just couldn’t figure what went wrong. It just got to the point that I have to wipe my hard drive and reinstall Leopard and the original version of the iSDK.

Two hours later and my problem iPhone app now works without any hitches. Now to clean up the code and find a development machine to work on.

New iPhone SDK

Thursday, March 27th, 2008

Iphone SDK LogoA new version of the iPhone SDK was released today and the strange thing here is, I’m getting about 1 - 1.5Mb/sec download, so the whole process was about 20ish minutes. Others closer to the source in the states were seeing download speeds as low as 90Kb/per second.

Well the new version has the Interface Builder application, needed to create user interfaces for the phone. Will be interesting to see how this pans out. Looking forward to any improved frameworks as a number of key headers are missing from the original beta release.

More updates soon.

iPhone SDK

Monday, March 10th, 2008

Iphone SDK LogoProbably one of the most anticipated software releases from Apple happened on Thursday 6th March. Apple released their beta version of the iPhone SDK, software development kit.

Steve Jobs, along with Phil Schiller and Scott Forstall, showed what we can expect with the new version 2.0 iPhone/iTouch firmware to be released in June. Phil Schiller kicked it all off by going through the enterprise additions to the iPhone. Here we see practically everything the was missing and then some. This as far as I can tell is going to make a reasonable sized dent in the Blackbury RIM market.

The real interesting bit of the presentation, well at least for me, was the presentation given by Scott. Here he gave a fairly detailed review of the SDK, I’ll cover that in more detail in a later blog post. Let’s just say that it was fantastic. Along with Scott was a few companies that were given a two week pre release of the SDK and asked what could be done with it. The results was really amazing.

(more…)

Accessing Cocoa from Carbon from Cocoa

Sunday, November 4th, 2007

The title of this blog may take a little explaining.

I was looking to include a Carbon routine within my Cocoa application, but this routine needed to have access to both my instance variables and other Class methods. It is straight forward to use Cocoa commands in your Carbon routine, as long as they’re declared from within the routine itself. You have no access to the object reference “self”. This refers to the object in which your code resides.

In order to achieve this you first need to create an object of the Class method and an instance init method within your Class. Here I have a Class called AppController where my Carbon routine is located. I add the following code;

+ (AppController *) sharedController
{
    return sharedController;
}

- (id) init
{
    self = [super init];
    sharedController = self;

    // Any other initialiser code needed

    return self;
}

Now from within my Carbon routine a new AppController ojbect class is created called controller. I can now use this controller object in place of “self”. This gives me access to all my instance variables and methods.

void MyCarbonRoutine
{
    AppController *controller;
    controller = [[AppController alloc] init];
    [controller aCocoaRoutine];

    // Any other coding needed here

    [controller release];
}

Remember to release your controller object before leaving the Carbon routine or you could end up with all sort of problems.

- Thanks to Uli Kusterer for pointing out that they are Objects that are created and released and not the Classes themselves.