我根据 this manual 安装了 pod apollo,然后在必须创建运行时的阶段,构建不起作用,它返回此错误我不明白为什么..
Can't find Apollo CLI. Installing...
npm ERR! Error while executing:
npm ERR! /Applications/Xcode.app/Contents/Developer/usr/bin/git ls-remote -h -t ssh://[email protected]/Project/fitto-ios.git
npm ERR!
npm ERR! [email protected]: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/mickaelbelhassen/.npm/_logs/2018-08-21T13_43_18_743Z-debug.log
Command /bin/sh failed with exit code 1
我不明白他为什么谈论 git ..
另外,存储库
ssh://[email protected]/Project/fitto-ios.git
是我的远程存储库,它与 Apollo 无关。这是我的运行脚本与官方文档相同:
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-cli.sh codegen:generate --queries="$(find . -name '*.graphql')" --schema=schema.json API.swift
最佳答案
您需要从 Here 安装 Apollo CLI,然后再次尝试构建您的应用程序。
关于ios - Apollo iOS : Run script, 构建失败错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51950214/