Carthage: Downloading .framework instead of building a .xcframework

Created on 23 Feb 2021  路  4Comments  路  Source: Carthage/Carthage

  • carthage install method: [ ] .pkg, [x] homebrew, [ ] source
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.37.0
  • xcodebuild -version: Xcode 12.4 Build version 12D4e
  • Are you using --no-build? no
  • Are you using --no-use-binaries? no
  • Are you using --use-submodules? no
  • Are you using --cache-builds? no
  • Are you using --new-resolver? no

Cartfile

github "abbeycode/UnrarKit" "2.10-beta7"

Carthage Output

> carthage update --use-xcframeworks
*** Checking out UnrarKit at "2.10-beta7"
*** xcodebuild output can be found in /var/folders/ws/fnd6nj7n1fb5ds5tjp1plnd00000gn/T/carthage-xcodebuild.f1PJ32.log
*** Downloading UnrarKit.framework binary at "v2.10-beta7"

Actual outcome
Carthage downloaded the .framework (not an xcframework) attached to the release, even though I specified the --use-xcframeworks flag

Expected outcome
Carthage should build an xcframework when one isn't available for download (which doesn't look possible yet, according to #3130)

Most helpful comment

I get that's why it's happening, but I look at it like this: downloading the framework is what the library author chooses as the default behavior (simply by publishing the binary in the first place), while using an xcframework is the chosen behavior or the library consumer. When they're in conflict (as they are in this case), surely the library consumer should win.

Or another way to think of it - there are settings for Carthage at more general and more specific levels - the most specific level should win, and in this case, that's the argument specified when you run Carthage.

All 4 comments

You should pass additional argument --no-use-binaries to ensure carthage will build xcframework

Thanks, I鈥檓 using that as a workaround, but I still think Carthage should take care of it seamlessly.

Because carthage still prioritize the framework as default so it makes sense for this case

I get that's why it's happening, but I look at it like this: downloading the framework is what the library author chooses as the default behavior (simply by publishing the binary in the first place), while using an xcframework is the chosen behavior or the library consumer. When they're in conflict (as they are in this case), surely the library consumer should win.

Or another way to think of it - there are settings for Carthage at more general and more specific levels - the most specific level should win, and in this case, that's the argument specified when you run Carthage.

Was this page helpful?
0 / 5 - 0 ratings