Problem:
If appium is started by php code. It will fail to build wda (xcodebuild). (Codesign error)
If appium is started manually, everything works perfectly.
Solution
Created a bash script to start appium manually and add it to login items
Location:
/Users/rta/appiumstartup/
Appium log files are there too.
Code appiumopen.sh:
#!/bin/zsh export PATH=/usr/local/bin:$PATH echo $PATH > /Users/rta/appiumstartup/appiumlog.txt appium --relaxed-security --session-override -p 6002 > /Users/rta/appiumstartup/appiumlog6002.txt 2>&1 & appium --relaxed-security --session-override -p 6004 > /Users/rta/appiumstartup/appiumlog6004.txt 2>&1 & echo $PATH >> /Users/rta/appiumstartup/appiumlog.txt
Export PATH is necessary.
Open automator application in mac. Create new application, add sh file to it. Save application.
Add that application to Login items in mac setting => Done