开发者

Xcode built app on 10.6 wont run on 10.5.8

I am new here and new in Xcode world.

I made a simple app with Xcode 3.2 on Snow Leopard. The resulting built app works on snow leopard, however it will not even start on leopard (10.5.8) - I get message "You cannot use this version of application with this version of Mac O开发者_开发知识库S X". Is it normal?

Or is there a way to make app that will work both on Snow Leopard and Leopard? Please advise, as I have no way to find out myself

Thanks for any input


You need to change the deployment target in your Build Settings. You should set it to the lowest version of OS X that you're willing to provide support for. You should set your base SDK to the latest available public SDK.

If you do this, you must ensure that you only use new 10.6-only APIs after doing runtime checks for their existence. To do this, you can use functions like NSClassFromString and respondsToSelector:.

Any Frameworks or libraries that are new to 10.6 should be weak-linked. This will prevent the app from trying to load those frameworks on 10.5 and thus cause the program to crash when it doesn't find the frameworks.

All explained in the SDK Compatibility Guide from Apple (Requires (free) login).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜