Symbiatch - maailma on rikki

Apple betas are annoying :P

04.08.2010 15.23 - mobiili ohjelmointi 

Apple naturally wants developers to try their new betas of the iOS and SDKs. That's fine. One thing that is not clear to all is that once you start testing those, your normal workflow is disrupted completely. Could be that this is old news to many, but wasn't for me. I've been doing my real work with decent tools so I didn't even think that things could be this bad. But I should've known. It is Apple we're talking about.

I installed iOS 4.1 beta2 on my phone. Naturally after that you can't use the phone for development unless you install the beta2 SDK too. So let's install it. Since it's an Apple product, it naturally won't support the previous versions. You can select the minimum required OS version for the app, but that doesn't help much.

You can't use the machine you installed the beta SDK for sending applications to the App Store. XCode uses the installed beta SDK for compiling and Apple won't allow that. No matter if you use any beta features or not. Great. So you need to have a whole new system to use with the supported SDKs to compile the apps.

Now, I want to make an application that works with iPhone OS 3.1. I can do that with the iOS 4.0 SDK. But what is impossible is to get a realiable feeling about the things that will work and what won't. Since the application is compiled with the 4.0 SDK, you can use any 4.0 features and YOU have to make sure that you don't use anything that isn't in 3.1.

Naturally Apple has mentioned that you should test if the classes are available. That's simple, right? Wrong. Since it's Objective-C, all binding is done runtime. You can use any classes that are available, any selectors that are available. Even if they are not available during compilation. This is one thing I don't like. I like hard bindings. But is it just a question of preferences? Nope, as one developer noticed (I don't have the link here right now, I'll add it later).

iOS 4.0 has new classes, that are only usable in iOS 4.0. That's what they tell you but it's not the reality. There are classes that exist on earlier SDKs, but they're just not public. So, if you do the suggested thing of testing if [SomeClass class] is not nil and use the features then, you're getting into trouble. You might not get nil for the class, since it exists and you have access to it, but it might not be the same class. So you can't call the methods you think you can.

So, if you want to support previous versions (naturally Apple doesn't want this, they want you to upgrade immediately to a new versio), you have to some nasty voodoo. And the tools don't help at all.

There is a new XCode coming up though, which has some things fixed that I personally don't like in the current one. But it's still far from a tool that I'd like to use. And at the moment it doesn't look like any of this SDK mess is going to be fixed. And why should it, since you can always just use the newest SDK. Who cares about the previous ones. It's not like the iPad still only has OS 3.2.

Kommentoi

Kommentit

Jutut.fi  |  Omat jutut  |  Muiden jutut  |  Kategoriat  |  kirjaudu