You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xcodebuild -version: Xcode 14.2 Build version 14C18
Are you using --no-build? No
Are you using --no-use-binaries? No
Are you using --use-submodules? No
Are you using --cache-builds? Yes
Are you using --new-resolver? No
Are you using --use-xcframeworks? Yes
Cartfile
github "apollographql/apollo-ios-xcframework"
Carthage Output
*** Building scheme "Apollo" in Apollo.xcworkspace
*** Building scheme "Apollo" in Apollo.xcworkspace
Actual outcome
Carthage builds Apollo twice though it only produces one .xcframework.
Expected outcome
It should only build the scheme once.
It appears to be caused by there being two schemes in the workspace with the name Apollo. Running xcodebuild -list in the repo shows the following.
Information about project "Apollo":
Targets:
Apollo
ApolloAPI
ApolloSQLite
ApolloWebSocket
Build Configurations:
Debug
Release
If no build configuration is specified and -scheme is not passed then "Release" is used.
Schemes:
Apollo
Apollo
Apollo-Dynamic
ApolloAPI
ApolloSQLite
ApolloTestSupport
ApolloWebSocket
InstallCLI
One is the shared scheme in the project and the other is autogenerated from the swift package target also called Apollo. Carthage then builds each scheme it finds that has the same name as a shared scheme in the project. Since two have the same name, it builds them twice.
Carthage could remove duplicate scheme names before checking for a shared scheme with the same name.
A workaround seems to be renaming the scheme before running Carthage, then there's only one listed scheme that matches the name of a shared scheme.
which carthage
: /opt/homebrew/bin/carthagecarthage version
: 0.39.1xcodebuild -version
: Xcode 14.2 Build version 14C18--no-build
? No--no-use-binaries
? No--use-submodules
? No--cache-builds
? Yes--new-resolver
? No--use-xcframeworks
? YesCartfile
Carthage Output
Actual outcome
Carthage builds Apollo twice though it only produces one .xcframework.
Expected outcome
It should only build the scheme once.
It appears to be caused by there being two schemes in the workspace with the name
Apollo
. Runningxcodebuild -list
in the repo shows the following.One is the shared scheme in the project and the other is autogenerated from the swift package target also called
Apollo
. Carthage then builds each scheme it finds that has the same name as a shared scheme in the project. Since two have the same name, it builds them twice.Carthage could remove duplicate scheme names before checking for a shared scheme with the same name.
A workaround seems to be renaming the scheme before running Carthage, then there's only one listed scheme that matches the name of a shared scheme.
Related issue apollographql/apollo-ios#3308
The text was updated successfully, but these errors were encountered: