开发者

Compiling against iOS SDKS

I have a question regarding compiling against SDK's, which I thought I understood until yesterday.

I have an iPhone app, which the version compiled against SDK v3.2 and running on an iPhone emulator runnning version 4 works fine, but when I recompile the app against SDK 4 the interface starts to mess up.

I thought when you write an app against an SDK/Frameworks like iOS or the Android SDK's, the code you write gets compiles into an app (with any added libs), and then get excecuted on the system. The sdk being present on the dev machine for the purpose of the app being able to compile (and run compile time checks) but not actually compiled into the app code.

What I dont understand is that if this is the way it works, how can just compiling against开发者_JS百科 a newer version of the SDK break the app (bearing in mind whatever version it is compiled against it is still running on iOS version 4) as how is it not still the same compiled app.

Obviously I am missing something here!

Thanks for any pointers


Any number of reasons; when you target a particular version of the OS, it can change the set of APIs that are available and it can change how the app is linked. At runtime, the system can do what are called "linked on or after" checks. If your app was linked with a target of an older OS, the newer OS might preserve some behavior or make sure a bug still exists. If targeted to the newest OS, you get the new behavior.

All of this is to say that you likely have some issue in your code where either you were relying on a bug in the 3.x versions or you are using an API whose behavior has changed between the two versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜