2

我在我的 swift3 项目中添加了这个运行脚本

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

cd "${SRCROOT}/${TARGET_NAME}"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh generate '/*.graphql' --schema schema.json --output API.swift

当我构建我得到这个错误:

find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/appName: No such file or directory
find: /Users/userName/Documents/Swift: No such file or directory
find: Apps/appName/Carthage/Build/iOS: No such file or directory
++ exec apollo-codegen generate '/*.graphql' --schema schema.json --output API.swift
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
4

1 回答 1

0

有以下版本

- Apollo (0.8.0):
    - Apollo/Core (= 0.8.0)
- Apollo/Core (0.8.0)

我不得不改变

$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh

至:

$APOLLO_FRAMEWORK_PATH/Resources/check-and-run-apollo-codegen.sh

于 2018-06-19T23:46:26.250 回答