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

make build-apollo-xc-framework fail with Error 70 #3427

Closed
Karram-Ayman opened this issue Aug 16, 2024 · 9 comments · Fixed by apollographql/apollo-ios-xcframework#19
Closed
Labels
bug Generally incorrect behavior needs investigation

Comments

@Karram-Ayman
Copy link

Summary

Following creating xcframework from https://github.com/apollographql/apollo-ios-xcframework?tab=readme-ov-file make script fail 9 times out of 10 tries with Error 70

Version

1.14.1

Steps to reproduce the behavior

  1. Clone repo
  2. Run make build-apollo-xc-framework

Logs

Runing RegisterExecutionPolicyException /Users/a/Library/Developer/Xcode/DerivedData/Apollo-btbrgifwrrzzezcxjrmbkksenqto/Build/Intermediates.noindex/ArchiveIntermediates/Apollo/InstallationBuildProductsLocation/Users/a/Objects/Apollo.o (in target 'Apollo' from project 'Apollo' at path '/Users/a/Downloads/apollo-ios-xcframework-main/apollo-ios/Package.swift')
    cd /Users/a/Downloads/apollo-ios-xcframework-main/apollo-ios
    builtin-RegisterExecutionPolicyException /Users/a/Library/Developer/Xcode/DerivedData/Apollo-btbrgifwrrzzezcxjrmbkksenqto/Build/Intermediates.noindex/ArchiveIntermediates/Apollo/InstallationBuildProductsLocation/Users/a/Objects/Apollo.o

** ARCHIVE SUCCEEDED **

xcodebuild -create-xcframework -output ./build/Apollo.xcframework -framework ./build/iphonesimulator.xcarchive/Products/Library/Frameworks/Apollo.framework -framework ./build/iphoneos.xcarchive/Products/Library/Frameworks/Apollo.framework
error: the path does not point to a valid framework: /Users/a/Downloads/apollo-ios-xcframework-main/build/iphonesimulator.xcarchive/Products/Library/Frameworks/Apollo.framework
make: *** [build-apollo-xc-framework] Error 70

Anything else?

Even though ** ARCHIVE SUCCEEDED ** and build folder is been created with iphoneos.xcarchive and iphonesimulator.xcarchive
still, failure happen with [build-apollo-xc-framework] Error 70 and xcframework been created

@Karram-Ayman Karram-Ayman added bug Generally incorrect behavior needs investigation labels Aug 16, 2024
@BobaFetters
Copy link
Member

Thanks for the report @Karram-Ayman , to help with investigating can you also tell me what version of Xcode/Xcode command line tools you are running?

@Karram-Ayman
Copy link
Author

Hi @BobaFetters thank you for checking here is my Xcode and command line version
Xcode 15.1
Build version 15C65

@Karram-Ayman
Copy link
Author

@BobaFetters I am not sure if this helps but most of the time this works only if I open my terminal and do not use the script and call in my terminal step by step sometimes it does the same error but not as often as the script

I also try to call this before
rm -rf ~/Library/Developer/Xcode/Archives/*

Then
xcodebuild archive -configuration Release -project "Apollo.xcodeproj" -scheme "Apollo" -destination 'generic/platform=iOS Simulator' -archivePath "./build/iphonesimulator.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES

Then
xcodebuild archive -configuration Release -project "Apollo.xcodeproj" -scheme "Apollo" -destination 'generic/platform=iOS' -archivePath "./build/iphoneos.xcarchive" SKIP_INSTALL=NO BUILD_LIBRARY_FOR_DISTRIBUTION=YES

Then
xcodebuild -create-xcframework -output ./build/Apollo.xcframework -framework ./build/iphonesimulator.xcarchive/Products/Library/Frameworks/Apollo.framework -framework ./build/iphoneos.xcarchive/Products/Library/Frameworks/Apollo.framework

@calvincestari
Copy link
Member

Based on the number of search results for xcodebuild error 70 I don't think this is apollo-xc-framework specific. It looks like a combination of some other external factors.

@Karram-Ayman
Copy link
Author

Hi @BobaFetters is there any plan to support building xcframework for ApolloTestSupport in https://github.com/apollographql/apollo-ios-xcframework?

@calvincestari
Copy link
Member

No plans at the moment @Karram-Ayman. If there is enough of a use case and it's of benefit to the large part of the community then we can consider it.

@Karram-Ayman
Copy link
Author

Thanks for getting back to me @calvincestari

@BobaFetters
Copy link
Member

@Karram-Ayman I have a PR up to fix another issue, and from what I can tell it also fixes this issue, not 100% sure still what was causing this but once we do another release this should be fixed.

Also we have had some other inquiries about ApolloTestSupport support so I am going to look into getting that added as well

Copy link
Contributor

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Generally incorrect behavior needs investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants