Xcodebuild exited with code '65'; No signing certificate "iOS Development" found

Appium version: 1.6.3
Device: iPhone 6
Device OS version: 10.2
Xcode version: 8.2.1

I realize that several posts related to xcodebuild exited with code ‘65’ have been made, but I’ve tried almost everything I’ve read in the forums and I still can’t run tests on my iOS device.

When I attempt to run a test on a real device, the log shows two distinct failures:

First failure:

Testing failed:
	No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "GVJ6SAHW84" with a private key was found.

Second set of failures:

[XCUITest] xcodebuild exited with code '65' and signal 'null'
[XCUITest] Error: xcodebuild failed with code 65
[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65

A gist of my Appium log can be found here:

My desired capabilities are as follows:

capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("nativeWebTap", true);
capabilities.setCapability("platformName", ConfigMXPios.PLATFORM_NAME);
capabilities.setCapability("platformVersion", ConfigMXPios.IOS_VERSION);
capabilities.setCapability("device", ConfigMXPios.DEVICE);
capabilities.setCapability("deviceName", ConfigMXPios.DEVICE_NAME);
capabilities.setCapability("sendKeyStrategy", "setValue");
capabilities.setCapability("xcodeConfigFile", "/Users/cmichalowski/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Config.xcconfig");
capabilities.setCapability("realDeviceLogger", "/Users//cmichalowski/node_modules/deviceconsole/deviceconsole");
capabilities.setCapability("keychainPath", "/Users//cmichalowski/Library/Keychains/CindyKeychain.keychain"); 
capabilities.setCapability("keychainPassword", "myPassword"); 

The following is a list of things that I have tried while trying to resolve this issue, as well as some notes about my environment setup:

security create-keychain -p [keychain_password] MyKeychain.keychain security import MyPrivateKey.p12 -t agg -k MyKeychain.keychain -P [p12_Password] -A

  • I verified that all applications have access to the .p12 file that I’m pointing to (Keychain Access -> Info -> Access Control)

  • The keychain that I’m pointing to is unlocked

  • Config.xcconfig contains the following:

DEVELOPMENT_TEAM = XXXXXXXXXX // valid development team id CODE_SIGN_IDENTITY = iPhone Developer

If I think of anything else to include in the list of things that I’ve tried, I’ll add them. The iOS developer and I worked on this exhaustively and we’re stumped. Any assistance would be greatly appreciated.

Edit: I tried passing an incorrect password just to see if it’s detecting the keychain / certificate at all. The test does terminate due to an incorrect password, so I know it’s finding the keychain and getting at least as far as authentication.

Please use these instructions : Getting error "linker command failed with exit code 1 (use -v to see invocation)

@pavanbachu - Thanks so much for your help. I followed your instructions and I’m getting the exact same error. A few notes about what I did:

  • Instead of running npm install -g appium (which installs Appium v 1.5.2) I ran npm install -g [email protected]

  • After running the test and receiving the same results, I decided to repeat the steps just in case. On the second run, /bin/bash Scripts/bootstrap.sh -d seems to attempt to fetch dependencies, but it just hangs. The first time I ran it I saw output that confirmed that dependencies had been fetched. Now when I run it, it says “fetching dependencies” and the text in the console stays bold, which makes it look like the process never finished. (screenshot below) I’m not sure if this matters since I did run the command once successfully.

And here is a gist of the Appium log output. As far as I can tell it looks the same:

A few more pieces of information in case they’re helpful:

  • node.js version: 7.3.0
  • nvm version: 0.33.0
  • npm version: 4.0.5

You can set platform version to even 10.2 and when you run the second run ,
it’s not getting struck .It’s a expected behaviour

@pavanbachu - Thanks for the clarification. When I attempted to run the test after following the instructions (in my previous post), the platform was already set to 10.2. I’m still getting the same error as I was before I followed the instructions.

Edit: Not sure if this is relevant, but I’m not making these builds on my machine. The iOS dev is sending the builds to me.

I am also facing same error as "Xcode]
Testing failed:

[Xcode] No signing certificate “iOS Development” found: No “iOS Development” signing certificate matching team ID “XXXX” with a private key was found.

Appium version: 1.6.1
Xcode: 8.2
iOS Platformversion in connected mobile is: 10.2

I have created Config.xcconfig file and added keychain .p12 file as well

I was giving wrong team id, please check right team id from:

You can find your Team ID using your developer account. Sign in to developer.apple.com/account, and click Membership in the sidebar. Your Team ID appears in the Membership Information section under the team name.

I was just about to write back to you. Is it working now?

thanks for bothering.