Carthage: is it possible to build specific targets/platforms?

Created on 9 Feb 2017  路  9Comments  路  Source: Carthage/Carthage

  • carthage version: 0.18.1
  • xcodebuild -version: 8.2.1
  • Are you using --no-build? no
  • Are you using --no-use-binaries? yes
  • Are you using --use-submodules? no

Cartfile

<YOUR CARTFILE>

Carthage Output

<OUTPUT>

I know is possible to build specific target using --platform ios or --platform tvos.

but, what about to build more than a target, I mean, if I have added frameworks are supporting many platforms (iOS, tvOS, macOS, watchOS), and I only want/need to build iOS and tvOS targets, is it possible?

I've tried:

carthage update --platform ios, tvos
carthage update --platform ios tvos
carthage update --platform [ios, tvos]
carthage update --platform (ios, tvos)

Thanks in advance.

question

Most helpful comment

Just --platform ios,tvos (no space) or --platform "ios, tvos" (with quotes).

All 9 comments

Just --platform ios,tvos (no space) or --platform "ios, tvos" (with quotes).

Awesome {^_^}. Thanks for clarifying Sir.

I don't see the --platform options documented in the ReadMe. I'm just wondering if it's macos or mac or osx when targeting a Mac app. :)

No, it's for all commands where this selector makes sense. I will go thought the Readme and verify. Thanks for reporting.

@cliftonlabrum all those (macOS, Mac, OSX) are aliases for each other (case-insensitively) in regards to the --platform flag.

I don't use Carthage extensively but this is the only framework that fails with this tvOS issue. Is this a common thing that I should have my app set up to avoid, or is it something with PureLayout? Is there a solution beyond specifying the platform? It seems odd to me that I can't just use carthage update

I checked all options, its still making four folders in Build. Any update in command?

Hey there,

I'm still running into problems with this.
The command is: carthage build --no-skip-current --cache-builds --platform iOS

It's building tvOS, macOS and other targets besides iOS. Furthermore one of the macOS targets fail to find the import of while the same targets works fine using Xcode directly, but I could ignore that, because I would just need the iOS platform.

I also tried putting it into quotes with no luck.

I'm building a static framework here by exporting an xcconfig before with MACH_O_TYPE set to staticlib, so maybe that's the cause of the issue.

Any idea?

Was this page helpful?
0 / 5 - 0 ratings