When using carthage it fails when building the StarwarsAPI scheme:
[...]
/Users/johan/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L177m/apollo-ios/0.9.0/Build/Intermediates.noindex/ArchiveIntermediates/StarWarsAPI/IntermediateBuildFilesPath/Apollo.build/Release-iphoneos/StarWarsAPI.build/Script-9FCE2D061E6C251100E34457.sh
/Users/johan/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L177m/apollo-ios/0.9.0/Build/Intermediates.noindex/ArchiveIntermediates/StarWarsAPI/IntermediateBuildFilesPath/Apollo.build/Release-iphoneos/StarWarsAPI.build/Script-9FCE2D061E6C251100E34457.sh: line 10: generate: command not found
Command PhaseScriptExecution failed with a nonzero exit code
** ARCHIVE FAILED **
The following build commands failed:
PhaseScriptExecution Generate\ Apollo\ Client\ API /Users/johan/Library/Caches/org.carthage.CarthageKit/DerivedData/10.0_10L177m/apollo-ios/0.9.0/Build/Intermediates.noindex/ArchiveIntermediates/StarWarsAPI/IntermediateBuildFilesPath/Apollo.build/Release-iphoneos/StarWarsAPI.build/Script-9FCE2D061E6C251100E34457.sh
(1 failure)
Same thing when trying to archive the StarwarsAPI scheme in Xcode. Unsure why it fails to find the check-and-run-apollo-codegen.sh during archive
(I _hate_ how Carthage insists on building all the schemes)
I'm getting this error too.
I am seeing this error as well.
Same as well. Is there any workaround not to build all schemes and just platform specific one and get around with this issue?
I was able to work around this by manually removing the StarWarsAPI scheme and running carthage build --platform iOS
+1
I'm also having the same problem, how did you remove the StarWarsAPI scheme manually, @AndrewGold ?
@tormic I do the following on CI to get past it:
cd Carthage/Checkouts/apollo-ios/Apollo.xcodeproj/xcshareddata/xcschemes && find . -name "StarWarsAPI.xcscheme" -delete
You could also get away with running
cd Carthage/Checkouts/apollo-ios/Apollo.xcodeproj/xcshareddata/xcschemes && rm StarWarsAPI.xcscheme
One of these two PRs should resolve the issue:
https://github.com/apollographql/apollo-ios/pull/320
https://github.com/apollographql/apollo-ios/pull/321
I'm going to ping the iOS slack channel about it.
Thanks to @brennantaylor, this should be fixed in 0.9.1.
Most helpful comment
One of these two PRs should resolve the issue:
https://github.com/apollographql/apollo-ios/pull/320
https://github.com/apollographql/apollo-ios/pull/321
I'm going to ping the iOS slack channel about it.