Check-and-run-apollo-codegen.sh for Apollo not working? - xcode

I am trying to install Apollo in my iOS Project. I follow the instructions here: https://www.apollographql.com/docs/ios/installation.html. When I complete the "Adding a Code Generation Build Step," I get an error. It cannot find the file check-and-run-apollo-cli.sh. The error is "Command PhaseScriptExecution failed with a nonzero exit code." So I checked the file path it was giving me. It seems that "check-and-run-apollo-cli.sh" doesn't exist, but "check-and-run-apollo-codegen.sh" does. So I changed the last line of the script in my project to check-and-run-apollo-codegen.sh. However, it still does not work ("Command PhaseScriptExecution failed with a nonzero exit code" again). What do I need to do?
Thanks.

I have the same error here on Apollo 0.20.0 using Cocoapods
So I use the script provided by Apollo here
And customized to my workspace
"${PODS_ROOT}/Apollo/scripts/run-bundled-codegen.sh" codegen:generate --target=swift --includes=./**/*.graphql --localSchemaFile="schema.json" API.swift
Worked for me =D

Related

Error Installing Firebase Crashalytics in Xcode

When installing pods for firebase crashalytics, I end up getting the following error when building my project:
/bin/sh: /Users/charlieseligman/Library/Developer/Xcode/DerivedData/iosRpg-adnemhaybfqxtfaseatzgcodrqhn/Build/Intermediates.noindex/iosRpg.build/Debug-iphoneos/iosRpg.build/Script-9E0308592720706B102EX692.sh:
"/Users/charlieseligman/Documents/GIT/ios.SwordyQuest/Pods/FirebaseCrashlytics: bad interpreter: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
Anyone seen this before? Or have any ideas about debugging it?
I was putting the "${PODS_ROOT}/FirebaseCrashlytics/run" script in the 'Shell' textfield rather than in the section directly below this... hope this answer helps someone else who is as tired as I am and making silly mistakes also.

Command ValidateEmbeddedBinary failed with a nonzero exit code

I ran into this error after upgrading xCode to version 12.4
Build fails with the following message:
"Command ValidateEmbeddedBinary failed with a nonzero exit code"
This error concerns the validation of the extension to the macOS application (in this case, NetworkExtention)
After more than 2 days of research, I found out that the error was caused by the following code in my Info.plist:
<key>CFBundleSupportedPlatforms</key>
<string>MacOSX</string>
After deleting this piece of code, the error disappeared.
I hope this helps someone avoid wasting time.)

metadata-gen fails with exit code None

I am going through the flipper tutorial and am getting an error when running metadata-gen.
ERROR: `"/Users/home/.rustup/toolchains/nightly-x86_64-apple-darwin/bin/cargo" "run" "--package" "metadata-gen" "--manifest-path=/var/folders/xj/m862kvrj73x04dvsfr6vs_fm0000gn/T/cargo-contract_c9GVwB/Cargo.toml" "--target-dir=/Users/home/src/testcontract/target" "--release"` failed with exit code: None
Having an exit code of None is really not helpful. Does anyone know the reason for this? Build and test works fine. I did a cargo update yesterday.
I'm on MacOS Catalina.
After updating to the 10-6 nightly tools the error went away.

"generate-pch command failed with exit code 1" when making a new Xcode scheme

I'm following the instruction here http://www.teratotech.com/blog/xcode-7-steps-to-easily-switch-between-multiple-environments/ to generate different schemes for different environments..
I created a testing configuration and created a new scheme to use that configuration. However, when I build and run, I'm getting this error:
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
error: 'AFNetworking/AFNetworking.h' file not found
#import <AFNetworking/AFNetworking.h>
1 error generated.
<unknown>:0: error: failed to emit precompiled header '/var/folders/f2/6j4b4kz54xy1vf_2gdlnrllc0000gn/T/My-Project-Header-47bffb.pch' for bridging header '/Users/me/Dev/my-project/My-Project-Header.h'
When I build with my original scheme, everything's fine... I only have 1 target. Am I missing anything?
EDIT: I'm using Cocoapods to manage my dependencies, if that makes any difference.
i solved this issue by running below commands
$ pod repo update
$ pod install
Usually such issue happens when project directory is changed or copied form some other machine.

Can't install PDQ tool for R on windows

I've been trying for half an hour following this simple guide http://www.perfdynamics.com/Tools/PDQcode.html#tth_sEc1.1.1
It simply throws this error:
> install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Warning: invalid package 'C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command '"C:/PROGRA~1/R/R-30~1.2/bin/x64/R" CMD INSTALL -l "C:\ProgramFiles\R\R-3.0.2\library" "C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz"' had status 1
2: In install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz", :
installation of package ‘C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz’ had non-zero exit status
I've been searching for an answer on the website, trying different things but nothing did it.
I was copy/pasting the command from their documentation and it seems their documentation is out of date.
The command is:
install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Since there's a new version of R (6.1-1), it should be:
install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.1-1.tar.gz",repos=NULL,type="source")
Really stupid mistake, but that's what solved the problem.

Resources