Home:ALL Converter>Ionic - Error when building IOS version of an application

Ionic - Error when building IOS version of an application

Ask Time:2018-03-25T19:24:36         Author:MaTTo

Json Formatter

I developed the entire application using PC and Windows 10. I successfully build the version for Android and uploaded it to Play Store where it was already accepted.

Now, I am facing a challenge of preparing iOS version, which I kind of hoped that it would be simple. However, after many hours, I am still facing the very same issue, which I don't know, how to solve. Running ionic Cordova build ios, I receive the following error:

(node:1852) UnhandledPromiseRejectionWarning: SyntaxError: Expected "/ Begin ", "/ End ", "\"", or [A-Za-z0-9_.] but "/" found. at peg$buildStructuredError (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.js:412:12) at Object.peg$parse [as parse] (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/xcode/lib/parser/pbxproj.js:1886:11) at pbxProject.parseSync (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/xcode/lib/pbxProject.js:46:24) at Object.parseProjectFile [as parse] (/Users/mitja/Projects/oventura/platforms/ios/cordova/lib/projectFile.js:41:15) at updateFileResources (/Users/mitja/Projects/oventura/platforms/ios/cordova/lib/prepare.js:480:33) at /Users/mitja/Projects/oventura/platforms/ios/cordova/lib/prepare.js:65:13 at _fulfilled (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/q/q.js:854:54) at self.promiseDispatch.done (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/q/q.js:883:30) at Promise.promise.promiseDispatch (/Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/q/q.js:816:13) at /Users/mitja/Projects/oventura/platforms/ios/cordova/node_modules/q/q.js:570:49 (node:1852) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:1852) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I have no idea what file or what part of my application is causing the error, but I do know that creating a new project and building it works just fine there, so is definitely something in our project (which builds fine on Windows for Android).

Here is our plugin list:

"cordova-plugin-statusbar"
"cordova-plugin-whitelist"
"cordova-plugin-device"
"cordova-plugin-splashscreen"
"cordova-plugin-ionic-webview"
"cordova-plugin-ionic-keyboard"
"cordova-plugin-datepicker"
"cordova-plugin-braintree"
"uk.co.workingedge.phonegap.plugin.launchnavigator"
"mx.ferreyra.callnumber"

For Braintree, I had to do npm install plist and npm install Xcode as stated in plugins github repo so that is done.

So, what could be causing the error? What can I try to somehow succeed in building the iOS version?

Author:MaTTo,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/49475271/ionic-error-when-building-ios-version-of-an-application
MaTTo :

I forgot to update the answer but here it is. So the problem is, as already found out, the plugin for braintree. To actually make it work, you have to use the fork version of the official plugin:\n\nionic cordova platform remove ios\nionic cordova plugin add https://github.com/dpa99c/cordova-plugin-braintree\nionic cordova platform add ios\n",
2018-08-14T10:46:55
yy