Gusutafu
Gusutafu

Reputation: 755

Select deployment target for Carthage dependency

My iOS app uses certain frameworks via Carthage (AudioKit, PromiseKit, Dollar etc) and I'm now trying to change the deployment target of the app from 10.x that we used previously, to 9.3. Since the frameworks are built by Carthage and not from inside Xcode, the new deployment target doesn't trickle down to the frameworks, at least not without some special action, and I get this error for several of the frameworks:

Module file's minimum deployment target is ios10.1 v10.1:

Do I need to manually go into the Carthage projects and change this, or is there a better way? I've noticed that some of the frameworks' projects don't even have schemes for iOS, so I'm thinking that even for those that do have them, they might be ignored.

Upvotes: 4

Views: 3513

Answers (2)

Gusutafu
Gusutafu

Reputation: 755

It seems that the proper answer is that Carthage builds using the deployment target of the project. At least if that is possible. So simply rebuilding with Carthage after changing the deployment target in XCode should work.

https://github.com/Carthage/Carthage/issues/1629

The reason it didn't seem to work for me seems to have been that the Dollar framework is incorrectly prepared for Carthage. I noticed earlier that the plist of the built framework lacks a bundle version value for some reason (making submission impossible) so it could be that it's just sloppily put together.

Upvotes: 1

Parth Adroja
Parth Adroja

Reputation: 13514

You might have created a target after updating Xcode, which made 10.1 the iOS Deployment Target in Build Settings for that target.

Try Below steps:

  1. Setting the iOS Deployment Target to 9.0 (Which is the same as the rest of the project)
  2. Doing a clean (Command+Shift+k) and build

If a clean+build doesn't fix it, switching the device/simulator that you are deploying to from the scheme menu and building again should help.

Upvotes: 0

Related Questions