I'm using the apollo framework for GraphQL that I installed using Carthage but I have an error when I run the script to generate the API.swift file during the build phase.
The error is
> [myproject]/Carthage/Build/iOS/Apollo.framework: is a directory
Command /bin/sh failed with exit code 126
I did added the script like in the apollo doc :
Here is the script itself:
APOLLO_FRAMEWORK_PATH="$(eval find $FRAMEWORK_SEARCH_PATHS -name "Apollo.framework" -maxdepth 1)"
if [ -z "$APOLLO_FRAMEWORK_PATH" ]; then
echo "error: Couldn't find Apollo.framework in FRAMEWORK_SEARCH_PATHS; make sure to add the framework to your project."
exit 1
fi
cd "${SRCROOT}/${TARGET_NAME}"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh generate $(find . -name '*.graphql') --schema schema.json --output API.swift
Of course, I have also generated the schema.json beforehand