Hello there, I have been struggling with configuring Apollo for a while now and can’t solve the problem. I am currently stuck in the code generation build step where I added a run script. I have tried several solutions such as ticking “For install builds only” which removed the problem but then the problem is that there is no API.swift file being generated.
Looking at the derived data folder it seems like the run-bundled.codegen.sh is missing. I am not sure where to get it? I do however have a run-codegen.sh maybe I have to change to that one in my run script instead? I have added an image of the problem and my run script.
Xcode version: 13.4.1
Apollo version: 1.0.5
Apollo/2.33.4 darwin-arm64
Schema is a schema.json and not schema.graphqls
`
if [ $ACTION = “indexbuild” ]; then exit 0; fi
DERIVED_DATA_CANDIDATE=“${BUILD_ROOT}”
while ! [ -d “${DERIVED_DATA_CANDIDATE}/SourcePackages” ]; do
if [ “${DERIVED_DATA_CANDIDATE}” = / ]; then
echo >&2 “error: Unable to locate SourcePackages directory from BUILD_ROOT: ‘${BUILD_ROOT}’”
exit 1
fi
DERIVED_DATA_CANDIDATE=“$(dirname “${DERIVED_DATA_CANDIDATE}”)”
done
SCRIPT_PATH=“${DERIVED_DATA_CANDIDATE}/SourcePackages/checkouts/apollo-ios/scripts”
if [ -z “${SCRIPT_PATH}” ]; then
echo >&2 “error: Couldn’t find the CLI script in your checked out SPM packages; make sure to add the framework to your project.”
exit 1
fi
cd “${SRCROOT}/${TARGET_NAME}”
“${SCRIPT_PATH}”/run-bundled-codegen.sh codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile=“schema.json” API.swift`