Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 11.2.1 confused about the minimum deployment target

I have a library and an app in the same workspace. One is dependent on the other. When I compile I get an error saying that the library is build for iOS 11 but the apps deployment target is iOS 10. I change the minimum deployment target for the library. Same error. I change the minimum deployment target for the app. Same error. I clean the build folder, delete the derived data, reboot the computer. Same error. The minimum deployment target can be changed in two places in the project settings, either in the info tab or the build settings tab. They both seem to be in sync. Is there anywhere else it is stored?

like image 955
Geoff Burns Avatar asked Dec 02 '19 10:12

Geoff Burns


People also ask

How do I change deployment targets in Xcode 11?

Change deployment targetSelect your app target and go to General tab, under Deployment Info change target to whatever version you want to support.

Where is minimum deployment target in Xcode?

The General tab contains a section with name Deployment Info. The section contains a dropdown menu and three checkboxes, iPhone, iPad, and Mac. Because I am using Xcode 12, the dropdown menu is currently set to iOS 14.3. That is the iOS deployment target or the minimum deployment target for iOS.

How do I increase deployment target in Xcode?

Deployment Target refers to the oldest version of iOS that is capable of running your project. To change your deployment target, open up your project file in Xcode and check the setting under Build Settings -> Deployment(...) Check this answer to add earlier devices support.

How do I change my deployment target?

To reconfigure an application to a different deployment targets for an application, navigate to Configure > Configure Deployment Target. In the Update deployment target window, select the taget platform(s) to configure or reconfigure the application.


1 Answers

Here is how I fixed it. Right click on your project file (something.xcodeproj), select 'Show Package Contents'. Open project.pbxproj with a text editor and search for IPHONEOS_DEPLOYMENT_TARGET. There will be 4 hits, 2 for Release mode and 2 for Debug mode. One of the Release mode values and one of the Debug mode values will be wrong. Hand edit them to the correct values. After this I checked my other projects. Every single one has inconsistent values for the minimum deployment target. I have a feeling that this is a problem with xcode 11.2.1 as this is the first time I have had this problem, but I am not sure. Has anyone else had this problem?

like image 112
Geoff Burns Avatar answered Sep 28 '22 01:09

Geoff Burns