Microsoft Visual Studio Tools for Apache Cordova Build Failed: Error code 65 for command when using Xcode 8 and iOS 10

Introduction:

This article applies to those fellow developers who are using visual studio tools for apache Cordova with or without an ionic framework. I am going to explain the problem which I faced during development of an ionic app using MS visual studio and Mac OS. hope this will help to the community.

Problem: Earlier was running my Ionic app with Xcode 7.2 and IOS 9.2 using visual studio tools for apache Cordova. Its was working fine and automatically detect Provisional Profile for my app. But when I have to upgrade My Xcode from version 7.2 to Xcode 8 version and my iPhone ios 9.2 to ios 10, I am not able to build my app locally my build fails with the following error.

Error – Build failed with error Error code 65 for command: xcodebuild with args: -xcconfig,

/Users/sierra/.taco_home/remote-builds/taco-remote/builds/663/cordovaApp/platforms/ios/cordova/build-debug.xcconfig,

-project,My_App.xcodeproj,-target,My_App,-configuration,Debug,-destination,platform=iOS,build,

CONFIGURATION_BUILD_DIR=/Users/sierra/.taco_home/remote-builds/taco-remote/builds/663/cordovaApp/platforms/ios/build/device,

SHARED_PRECOMPS_DIR=/Users/sierra/.taco_home/remote-builds/taco-remote/builds/663/cordovaApp/platforms/ios/build/sharedpch

1>  —— Remote build log follows

Solution : After lots of research i found following steps which resolved problem for me.

Step 1: Open command prompt and run below command, Ionic platform rm ios

And now, ionic platform add https://github.com/apache/cordova-ios.git

Step 2: How to find your development team Id

For your Development Team Id click On Apple Developer portal.

Apple Developer portal

Log in using your apple id will display screen.

Now, You have to just Click on Membership will display your Team id.

Step 3: And you need to create a build.JSON file to your project root that contains bellow text

{

“ios”: {

“debug”: {

“developmentTeam”: “YOURTEAMID”

},

“release”: {

“developmentTeam”: “YOURTEAMID”

}

}

}

Step 4: You’ve had to write a hook that you can add to your project. Save that file in your hooks folder, and reference it in your config.xml

Hooks folder Image

Config.xml setting for hooks reference.

<platform name=”ios”>

<hook type=”before_compile” src=”hooks/xcode8.js” />

</platform>

 

If you like this tiny help for fixing your Code Sign Error 65 iOS10 using xcode8. You may share on your social media also for supporting others. Many Thanks

By | 2017-07-03T17:34:14+00:00 November 26th, 2016|How To, iOS App Developer Guide, iPhone|