Archive for the ‘cocoa’ Category

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 - 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.

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.