views:

325

answers:

2

I'm building my iPhone app under SDK 3.1.3. My Base SDK and iPhone OS Deployment Target are both set to OS 3.0, but when I build, the info.plist in my bundle shows a MinimumOSVersion of 3.1.3. What could cause this?

A: 

Did you check other projects, libraries, that are included in your project, that they all compiled/linked with the same Base SDK & Deployment target version? I had same problem, till I realized, that I had a library that was built with a higher version.

Nava Carmon
I did. All of the built-in libraries and frameworks I'm using are referencing the 3.0 SDK versions. The only other library I'm using is Three20. The project and target in its .xcodeproj show that it's building with a Base SDK and Deployment Target of 3.0.Any other ideas?
cduhn
Well, i took a look on the picture and now it's pretty clear. Look at the popup menu which says what is your base SDK. You can see it on the top of your project window. It says Device-3.1.3 | Distribution! Change it to Device - 3.0 | Distribution and everything will work out I believe
Nava Carmon
Thanks for the suggestion, but building using an old SDK isn't the right solution. The iPhone Development Guide says: "To build your application using the iPhone Device 3.0 SDK but allow it to run on iPhone OS 2.2.1, set Base SDK to iPhone Device 3.0 and iPhone Deployment Target to iPhone OS 2.2.1. When you build your application, your deployment target selection is reflected in the MinimumOSVersion entry in the application’s Info.plist file." I actually managed to solve this myself, so I'll go ahead and post my solution.
cduhn
+1  A: 

I was ultimately able to solve this problem by switching my iPhone OS Deployment Target to some other version (e.g. 3.1), building, then switching it back to 3.0 and building again. Somehow this coerced XCode into behaving as documented. I don't really know why this fixed the issue, but it did. Perhaps it resolved some kind of corruption somewhere inside the .xcodeproj.

cduhn
I just had the same problem and your solution worked great. Thanks!
Matt Rix