Search code examples
iosxcodecarthage

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.


Solution

  • 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.