For automating tests on a simulator, the app need to be specifically built for platform where the simulator is running.
For automating tests on a real device, the app need to be built for ARM platform.
You can check the build type of your app file using the below method
Checking Build Type of iOS App
1. Change the extension from .ipa to .zip and then extract it. You will find a Payload folder inside the .zip that has the .app file.
2. Use Terminal on the Mac and run this command:
lipo -info myapp.app/myapp
Replace myapp with whatever the name of your files are after you extract them. You should see output for `i386` or `x86_64`. If you see output for only `ARM`, then it's for real devices only.