cordova-ios icon indicating copy to clipboard operation
cordova-ios copied to clipboard

Parse error when trying to open .xcodeproj

Open memphis23 opened this issue 4 years ago • 1 comments

Bug Report

Problem

When I add ios platform 6.x.y to my ionic project, it cannot be opened by XCode 12.4.

What is expected to happen?

I expect the .xcodeproj can be opened.

What does actually happen?

I get the following error: "The project ‘MyApp’ is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts."

Information

I have tested with a new Ionic starter template and the problem is also reproduced.

If I type command plutil -lint project.pbxproj I get more information "CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 59. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug."

If I remove cordova-ios 6.x.y platform and I add cordova-ios 5.1.1 the project can be opened by XCode successfully.

Command or Code

ionic cordova platform add ios

Environment, Platform, Device

I add ios platform on Windows and, later, I open the .xcodeproj generated in a Mac.

Version information

Ionic:

Ionic CLI : 6.11.9 (C:\Users\sbelinchon\AppData\Roaming\npm\node_modules@ionic\cli) Ionic Framework : @ionic/angular 5.5.4 @angular-devkit/build-angular : 0.1101.4 @angular-devkit/schematics : 11.1.4 @angular/cli : 11.1.4 @ionic/angular-toolkit : 3.1.0

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : ios 6.1.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 4 other plugins)

Utility:

cordova-res : 0.15.1 native-run : 1.2.1

System:

Android SDK Tools : 26.1.1 (C:\Users\sbelinchon\AppData\Local\Android\Sdk) NodeJS : v10.13.0 (C:\Program Files\nodejs\node.exe) npm : 6.14.8 OS : Windows 10

Checklist

  • [X] I searched for existing GitHub issues
  • [X] I updated all Cordova tooling to most recent version
  • [X] I included all the necessary information above

memphis23 avatar Feb 25 '21 07:02 memphis23

I have discovered the problem.

Adding the platform on windows includes the following line the the xcode project file: 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib\CordovaLib.xcodeproj; sourceTree = ""; };

Instead of: 301BF52D109A57CC0062928A /* CordovaLib/CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; };

memphis23 avatar Feb 25 '21 09:02 memphis23