开发者

iPhone: Minimum OS, Deployment Target & Base/Active SDK

开发者 https://www.devze.com 2022-12-14 10:32 出处:网络
I\'m a little confused about building an app for the app store and for the correct SDK & OS version. I have submitted my app to the app store, and in the app details screen of iTunes connection it

I'm a little confused about building an app for the app store and for the correct SDK & OS version. I have submitted my app to the app store, and in the app details screen of iTunes connection it says:

"Minimum OS Requirements : 3.1.2"

I haven't开发者_StackOverflow社区 seen any apps on the app store that have 3.1.2 as the min OS, they all say 3.0. I read several things on here before I built it and I thought I understood everything!

Basically, my app doesn't use any code that only exists in > 3.0 so I would like the minimum OS to be 3.0. My build settings were:

Target Info

  • Base SDK: iPhone Device 3.0
  • iPhone OS Deployment Target: iPhone OS 3.0

Xcode Main Window

  • Active SDK: iPhone Device 3.1.2

I've heard about a minimum OS version being put in the Info.plist but I haven't got anything like that in mine.

I build the app exactly like that and submitted it. Are my app settings correct? Will my app display 3.0 in the app store or 3.1.2? I'm a little unsure as to why you set the Active SDK to the latest (3.1.2) when you want to target 3.0 , 3.1 & 3.12 devices, but it's what I read!

Any help advice be greatly appreciated!


Okay I've managed to figure it out after much reading!

Basically, the Active SDK is just a build time override of the Base SDK. By default, when the Base SDK changes it automatically changes the Deployment Target to the same OS as the SDK. So when I wanted to build the app under the 3.1.2 SDK but have it run on 3.0 OS, I changed the Active SDK to 3.1.2, but that had automatically changed the minimum OS (deployment target). I saw this by looking at the Info.plist file in the package contents in my .app file.

So the best thing to do is to set the Base SDK to the latest SDK (currently 3.1.2) and then manually set the Deployment Target to 3.0 OS. Once the 2 are different then it will no longer automatically change.

However, this means that your app can install on a 3.0 device that may have 3.0, 3.1, or 3.1.2 SDKs. Therefore, any frameworks, methods or properties you use that are only available in SDKs greater than 3.0 you will have to use conditionally.

When you get around to building the app, ensure that that Active Target is set as the same as your Base SDK, e.g. Device 3.1.2. But remember to compile your app under Device 3.0, Device 3.1, and Device 3.1.2 just to check for compiler warnings. This will ensure that you don't have any code accessing methods/frameworks that don't exist in any SDKs down to your Deployment Target.

I hope this helps anyone who is in my position and couldn't find a simple explanation of how it all works.

The SDK Compatibility Guide was very useful and informative. However it took just a little extra figuring out for me to be comfortable with the concept and how everything works. This image from the guide is useful:

iPhone: Minimum OS, Deployment Target & Base/Active SDK


(source: apple.com)


Go to the Project Info->Build and look at IPHONEOS_DEPLOYMENT_TARGET property Actually I use 3.1.2 SDK and building an app that work nice on every OS higher than 2.2.1

0

精彩评论

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