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
When apollo-ios-xcframework is added as a dependency using Carthage, it is built two times even though it only produces one framework.
Version
1.7.1
Steps to reproduce the behavior
Add apollographql/apollo-ios-xcframework as a Carthage dependency in a project.
Run carthage build
See that it builds Apollo twice.
Logs
*** Building scheme "Apollo"in Apollo.xcworkspace
*** Building scheme "Apollo"in Apollo.xcworkspace
Anything else?
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.
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.
Summary
When
apollo-ios-xcframework
is added as a dependency using Carthage, it is built two times even though it only produces one framework.Version
1.7.1
Steps to reproduce the behavior
apollographql/apollo-ios-xcframework
as a Carthage dependency in a project.carthage build
Logs
Anything else?
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.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 Carthage/Carthage#3358
The text was updated successfully, but these errors were encountered: