I’m trying to setup a build process (on a Mac) that runs “pod install” on the xcode project after the build. I feel like I’m 95% of the way to having it working but am stuck.
As suggested in step 4 of this post, I’ve created a pods.command bash script that does what I want. It changes directory to the created xcode project and runs “pod install”. If I manually run the script after having done the Unity build, it works correctly. Happy days.
Here’s my bash script:
#!/bin/bash
mydir="$(dirname "$BASH_SOURCE")"
cd $mydir/../out/myproject
pod install
open "Unity-iPhone.xcworkspace"
However, I’m now trying to get Unity to run that same script in the post process build stage using this:
var proc = new System.Diagnostics.Process ();
proc.StartInfo.FileName = "Assets/pods.command";
proc.StartInfo.UseShellExecute = false;
In the editor logs, I can see that the script is called successfully, however I’m getting the error:
line 4: pod: command not found
Why would the pod command not be found when running this as a post process, but it’s fine when I run it manually?
I’ve tried setting “proc.StartInfo.UseShellExecute” to both true and false but doesn’t seem to make a difference.
Thanks!