51

I'm fairly new to Xcode as I use CocoonJS to build my HTML5 iPhone game but I want to know how to correctly set the minimum iOS version. I've set my deployment target to 8.0 and did a clean and then a build but when I submit to the app store it says the minimum iOS version is 6.0.

The next thing I tried was manually updating this value in the info.plist but then I get an invalid binary in iTunes Connect saying

Minimum OS Version Mismatch - The minimum OS version (LC_VERSION_MIN_IPHONEOS) in the binary ('6.0') for architecture ('armv7') differs from the MinimumOSVersion ('8.0') in the Info.plist

How do I update the minimum iOS version correctly without screwing up my binary? I've checked other threads but they all just say to update just the deployment target.

shim
  • 9,289
  • 12
  • 69
  • 108
JamesR
  • 950
  • 1
  • 7
  • 17
  • 1
    What version do you want as minimum, 6.0 or 8.0? – nhgrif Apr 19 '15 at 22:59
  • Are you compiling against the latest SDK? Which version of Xcode are you using? – Black Frog Apr 19 '15 at 23:02
  • I want to set it to 8.0, I'm using the latest version of XCode. I'm not sure which SDK I'm using. I'm at work and it's on my personal computer but I think it's the latest one (I'll double check when I get home) – JamesR Apr 19 '15 at 23:10
  • Form the command line, use `-mios-version-min=6.0`. – jww Oct 03 '15 at 17:52
  • 3
    Possible duplicate of [How to set minimum required Ios version?](http://stackoverflow.com/questions/14276220/how-to-set-minimum-required-ios-version) – jww Oct 03 '15 at 17:53

2 Answers2

31

Assuming you're building against the 8.x SDK, and you have set the deployment target to 8.x or higher, that'll be enough.

However, I'd imagine you set the deployment target the wrong place in Xcode. You'll need to set it under your Project and not under your Target. Alternatively, if you have a .xcconfig file, you can change it by setting

IPHONEOS_DEPLOYMENT_TARGET = 8.1

If you don't have a .xcconfig, you can verify the deployment target, by opening your project.pbxproj file, and search for IPHONEOS_DEPLOYMENT_TARGET, and check if it's set to your expected value.

Claus Jørgensen
  • 25,882
  • 9
  • 87
  • 150
  • 1
    CocoonJS cloud compiler gives me a .xcodeproj project so I can only seem to find the project.pbxproj inside. Everything looks fine here, all are set to 8.0. I've tried again with no luck. When I update the deployment target in the build settings should I expect to see the MinimumOSVersion in the Info.plist automatically change? Because it's not changing from 6.0 unless I manually change it. That seems a little weird to me (but I'm no iOS dev). In fact, the UIDevice family in the Info.plist still has both iPad and iPhone in there even though I set it to only iPhone in the build settings – JamesR Apr 20 '15 at 11:44
  • We don't use `MinimumOSVersion` in our projects, and they're explicitly 8.x or higher when we deploy them to the app store. – Claus Jørgensen Apr 20 '15 at 12:29
  • Do you mean that they show up in iTunes Connect as 8.x or higher, or that they just get restricted in the app store itself? I've tried everything to get the MinimumOSVersion to update correctly but nothing seems to work. If the deployment target will restrict it anyway then I wouldn't really care – JamesR Apr 20 '15 at 22:35
  • I don't know about iTunes Connect. It shows up in TestFlight being restricted to 8.x. – Claus Jørgensen Apr 20 '15 at 23:05
  • I can't remove the MinimumOSVersion itself or XCode has a conniption submitting to iTunes Connect. Is there a way to change the LC_VERSION_MIN_IPHONEOS setting manually? – JamesR Apr 21 '15 at 12:19
26

If you have Xcode .xcworkspace setup, say coming from ReactNative background, you would need to make sure:

  • iOS Deployment Target set to 14.1 or whatever version you want to be minimum inside the Project > Build Settings > Deployment for all instances.
  • iOS Deployment Target set to 14.1 or whatever version you want to be minimum inside the Target > Build Settings > Deployment for all instances.
  • The deployment info in Target > General > Deployment Info is set to the minimum support version before the iPhone checkmark.

iOS Minimum Deployment Info

To Verify the minimum version is set properly.

  • Archive the project.
  • Validate and Distribute the Development version of the app.
  • Locate the folder where the ipa was exported
  • Open the .ipa with some archive utility software (example The unarchiver)
  • Drag or Open the Info.plist in any code editor
  • Search for MinimumOSVersion and check whether the minimum os version reflects the required version.

MinimumOSVersion in Info.plist

Even after updating the Deployment Targets the archive doesn't update with the set version, force exit xcode and re-open the workspace/project. Check if the settings from previous session were applied, look for every instance where 14.x or whatever the current minimum version is present and update to the one required. Probably quit the Xcode once again and re-open. Generate the archive again and it should be reflect this time.

Animesh Singh
  • 8,382
  • 1
  • 17
  • 20