views:

519

answers:

2

We just released our first iPhone app update, and a few users have complained that--after installing the update--the app crashes right after launching. Apparently, rebooting the phone solves the problem.

The only change we made to the AppDelegate was the addition of the Pinch Media Analytics library, which doesn't seem to be the culprit. We've found articles online that say this used to be a common problem and that it has to do with DRM issues or something like that.

Our app requires OS 2.2.1, but the Pinch Media documentation said to change the "Base SDK" to 3.0 and the "Target OS" to 2.2.1 within the Xcode build settings. I haven't heard of this technique causing problems. Maybe I'm just in the dark here?

Any advice would be greatly appreciated!

A: 

I'm fairly confident that changing the Base SDK to 3.0 means your app will only be compiled to run against the 3.0 firmware (or greater). I think the "target OS" setting dictates what will be shown in iTunes as the minimum supported firmware but it doesn't actually mean that it will run on < 3.0.

Luke Redpath
Also, FWIW, I ran into this confusion with my own app. My app *does* require 3.0 and I changed the base SDK accordingly. However, I forgot to update the "Target OS" setting which means in iTunes the minimum required version still shows as 2.2.1. However, it still compiled properly for 3.0 meaning those on 3.0 will have no problems but those trying to run it on 2.2.1 will see it crash on startup.
Luke Redpath
It is possible to compile against the 3.0 SDK but have it run on a 2.2 device. You 'just' have to conditionally circumvent 3.0-only API at runtime, and work around any behavior changes between the two OS's. (This is non-trivial, to say the least). You may want to do this if you want to include extra 3.0 features for 3.0 devices only without having to release two separate binaries.
Daniel Dickison
A: 

You should be fine changing the target operating system to 2.21, but changing the Base SDK will compile (and run) your application utilizing the actual headers from the 3.0 release.

The Base SDK setting refers to the version of the SDK that xCode will use when compiling the application. Any application that you are going to release onto the store must work under the 3.0 SDK as per Apple's current requirements. An application built using the 3.0 Base SDK may not run properly, or even compile, if you attempt to do so with an earlier SDK version. Although an application written for the 2.21 SDK should only need to be recompiled to run on a phone with 3.0 installed.

You can find more information out in the Running Applications section on the iPhone Reference Library on Apple's developer's network website. It is a very good resource for tutorials, forums, videos, and even example code. It also contains the Changelogs for the different versions of the SDK (there are a few beta releases out right now, for example).

John Bellone