I tried to run test ipa. But appium restarts the app in a loop and produces this error.
[INST STDERR] Instruments Trace Error : Target failed to run: Failed looking up pid of launched process
What should I do to diagnose the root cause and solve the issue?
The specific build of the app you are trying to run on the simulator is not built for x86 arch. iOS on device runs on ArmV7, so when a build that is intended for a physical device tries to run on the simulator it will fail. You can see evidence of this in one of the errors printed out in your log
Inside your Xcode>Derived Date>build>products, You will have folders as shown. Each will have the respective builds generated. Build for the device might not work for a simulator.
Be very choosy here ;)
I got the same error message in the simulator because I had not build the project with arguments for simulator. I solved my problem by building as following