tags:

views:

319

answers:

2

My app was built with SDK 2.2.1 version even before 3.0 beta appear.

User going to install my app to the last iPhone 3Gs with 3.0 FW version. Will my app behave differently with last iPhone? Will items described here (3.0 OS Release Notes) influence to my app which was build with 2.2.1 SDK?

For example Apple doc tell:
FIXED: UINavigationController won't resize content view automatically if barStyle is changed to/from UIBarStyleBlackTranslucent.

But my app use this style and I saw content view resize before with iPhone 2.2.1 OS...


What does it technically mean when I select 2.2.1 or 3.0 SDK as active in XCode for my project and build? Does SDK corresponded libraries linked statically?

Thank you.

+1  A: 

When you select an active SDK in XCode, it essentially chooses the headers to compile against. The libraries are linked dynamically, so when you run an app built against 2.2.1 on a device running 3.0, it will have the 3.0 library behaviour.

For the specific fix you quoted, it may be that content failed to resize under certain circumstances which never affected you in the first place. But the long and the short of it is that you won't know exactly how your app behaves under 3.0 until you try it.

hatfinch
+1  A: 

Selecting an active SDK in Xcode tells the compiler which version of Apple's libraries and frameworks to build against. If you're using code that Apple changed or marked bugfixes on between 2.2.1 and 3.0, then yes, you will see different behavior in your app.

For example, between iPhone OS 2.2.1 and 3.0 Apple deprecated the UITableViewCell initWithFrame: initializer method. In 2.2.1, code that created table cells using this initializer worked fine. They will still work in 3.0, but you will receive a deprecation warning from Xcode, and you should update your code because Apple may remove deprecated pieces of the framework at any time.

Other changes are more behavioral, like the one you mentioned. If your application relied on a content view resize when you change the bar style, and that resize no longer happens, unexpected things may occur in your app.

The best approach to take is to build your app in 3.0 and test it thoroughly. Go through the compiler warnings and update code as necessary, then look at other changes Apple made and where you use those bits in your code.

Side note: As I understand it, Apple is no longer accepting applications into the App Store that have not been tested on 3.0 (nor have they been for some time).

Tim
Thank you for your prompt answer. Just one comment...In case I will build my app with 3.0 headers (Active SDK) my app will not be longer installable for 2.2.1 users. Correct? ... So I have to learn Apple docs carefully but leave 2.2.1 for own risk in case I wish to be usable for both 2.2.1 and 3.0.
MikZ
Correct - an app built against the 3.0 headers won't be usable on a 2.2.1 device (or if it is, you'll have to be VERY careful about the code you use, even more so than a 2.2.1->3.0 deployment).
Tim