Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing issue with framework generation #19

Merged
merged 2 commits into from
Sep 13, 2024
Merged

Fixing issue with framework generation #19

merged 2 commits into from
Sep 13, 2024

Conversation

BobaFetters
Copy link
Member

@BobaFetters BobaFetters commented Sep 12, 2024

Fixing an issue where the make command for building the apollo-ios framework was failing, also fixing issue with carthage not being able to find shared schemes to build from.

Closes apollographql/apollo-ios#3439
Closes apollographql/apollo-ios#3427

@CraigSiemens
Copy link

CraigSiemens commented Sep 12, 2024

I updated the script to test it out with carthage.

pushd "$(mktemp -d)" || exit
echo 'github "apollographql/apollo-ios-xcframework" "fix/issue-3439"' > Cartfile
carthage bootstrap --platform iOS --use-xcframeworks

It appears it's building each scheme twice again because the shared scheme has the same name as scheme Xcode generates for the targets from the swift package.

Would it be possible to rename the schemes tuist generates so they are unique? Maybe adding the suffix -xcframework? That was the workaround I found last time. Though we'd be fine continuing to do that in our project, we've already got that code in our makefile.

@BobaFetters
Copy link
Member Author

Hmmm ok, wondering if I create the xcode schemes manually in the tuist configuration and disable the auto-generation if it would avoid the issue with the spm package schemes, ill give that a shot and see, odd that Apollo is the only one being duplicated and not the other targets from the spm package

@BobaFetters
Copy link
Member Author

Actually no that wont work at least for the duplication, but doing the schemes manually and adjusting the names as you suggested seems like a good solution.

@CraigSiemens
Copy link

Oops, I should have included the logs, it builds every target twice.

*** No Cartfile.resolved found, updating dependencies
*** Fetching apollo-ios-xcframework
*** Checking out apollo-ios-xcframework at "a06f84a4ee2968f1c55dbc206b5163f441444cd1"
*** xcodebuild output can be found in /var/folders/_x/0yf9v78x1zzfd4pk03vx7f440000gq/T/carthage-xcodebuild.QilH1E.log
*** Building scheme "Apollo" in Apollo.xcworkspace
*** Building scheme "ApolloAPI" in Apollo.xcworkspace
*** Building scheme "Apollo" in Apollo.xcworkspace
*** Building scheme "ApolloAPI" in Apollo.xcworkspace
*** Building scheme "ApolloSQLite" in Apollo.xcworkspace
*** Building scheme "ApolloWebSocket" in Apollo.xcworkspace
*** Building scheme "ApolloSQLite" in Apollo.xcworkspace
*** Building scheme "ApolloWebSocket" in Apollo.xcworkspace

@CraigSiemens
Copy link

I also just noticed that the target for ApolloTestSupport isn't built. I assume it shouldn't be missing.

@BobaFetters
Copy link
Member Author

@CraigSiemens ok i updated the branch tuist now generates the schemes with a suffix like you suggested and the make commands are all working so I'm guessing this will solve your Carthage issue as well.

As for ApolloTestSupport its currently not supported as part of the xcframework setup, although its something I can look into adding.

@CraigSiemens
Copy link

That change seems to be working, each target was built once.

*** No Cartfile.resolved found, updating dependencies
*** Fetching apollo-ios-xcframework
*** Checking out apollo-ios-xcframework at "5cfce4fd24fd65107e500ef2f0fc78ab3375fa94"
*** xcodebuild output can be found in /var/folders/_x/0yf9v78x1zzfd4pk03vx7f440000gq/T/carthage-xcodebuild.XGit2r.log
*** Building scheme "ApolloWebSocket-xcframework" in Apollo.xcworkspace
*** Building scheme "ApolloSQLite-xcframework" in Apollo.xcworkspace
*** Building scheme "ApolloAPI-xcframework" in Apollo.xcworkspace
*** Building scheme "Apollo-xcframework" in Apollo.xcworkspace

@BobaFetters
Copy link
Member Author

Great, can get this merged into main, and it will officially release in a tagged release when we do our next apollo-ios release.

Copy link
Member

@calvincestari calvincestari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@BobaFetters BobaFetters merged commit bd52802 into main Sep 13, 2024
3 checks passed
@BobaFetters BobaFetters deleted the fix/issue-3439 branch September 13, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

apollo-ios-xcframework fails to build make build-apollo-xc-framework fail with Error 70
3 participants