XcodeBuild is successful thru terminal but I am still receiving xcodebuild failed with code 65 in APPIUM desktop Inspector

I have been receiving this error whenever I start the inspector:

[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

I have followed xcodebuild build test -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=889f45e85019bc440f9591b07534fb7af0b63733 -configuration Debug and it was succesfully installed on my device.

After that, I closed the terminal and go to Appium Desktop to start the server. Then I clicked on Open Inspector and start my dependencies:
“platformName”: “iOS”,
“platformVersion”: “10.3.1”,
“udid”: “udid”,
“deviceName”: “iPhone 6 Plus”,
“app”: “com.connect.app”,
“xcodeConfigFile”: “/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig”

my xcodeConfigFile has:
CODE_SIGN_IDENTITY = iPhone Developer

Where would it go wrong?
I had been having a pain for about a few days now…

I feel your pain. It took me several days just to get the WebDriverAgent app to deploy to a real device. I ended up having to create a new xcode project, then create a new Provisioning profile for that project as well. Then, I opened the WebDriverAgent project in xcode and changed the signing to use the provisioning profile I had created. Then I passed the bundle id of the project I created as the updatedWDABundleId value in my desired capabilites. It works, but every time I update appium, it resets the WebDriverAgent project settings, and I have to go update the signing again. Hope this helps!

1 Like

wow!! that works!!! omg…

This is a pain! Thank you so much for this… I guess I won’t update appium yet, It is a pain!