Search code examples
ioscordovavisual-studio-cordova

Error: Expected "/* Begin ", "/* End ", "\"", or [A-Za-z0-9_.] but "/" found


I got this error after I add iOS to my cordova project. By using following command,

sudo cordova platform add ios

I cleared xcode DerivedData and also re-install by following command

sudo cordova platform rm ios
sudo cordova platform add ios

and there is still no luck.

I found other suggestion that need to look for conflict in my-app.xcodeproj > project.pbxproj and it does not have conflict.

Any other solution to solve above problems? thanks alot!


Solution

  • I can resolve the problem by following.

    Firstly, enter the following to clean iOS platform in my cordova project.

    ./platforms/ios/cordova/clean

    From the output, I was able to see which line number got unexpected character but it never tells which file got problem. So I look for line number 70 (for my case is line number 70) in my-app.xcodeproj > project.pbxproj. So, I comment out the line and try clean again, and the error was gone.