apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 988 forks source link

project.pbxproj backslash Problem #984

Closed up2-date closed 3 years ago

up2-date commented 3 years ago

Bug Report

Problem

I use cordova-ios 6.1.1 and nodejs v13.12.0 under Windows 10. Cordova CLI Version: 10.0.0

When I run "cordova --verbose prepare ios" and open the created project in Xcode under MAC, i became follow Error in XCode: The file couldn´t be opened. (as Message) / Couldn´t load Project

I have used an empty Cordova project to avoid plugin problems.

After a closer analysis, i found the problem in the file project.pbxproj in this line:

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

The Problem is the Backslash: CordovaLib\CordovaLib.xcodeproj

If I change the backslash to a slash, then I can open the project in XCode.

What is expected to happen?

Slashes in File Path in the File project.pbxproj.

What does actually happen?

Backslashes in File Path in the File project.pbxproj.

Information

Before I used cordova ios 5.1.1, the project is generated correctly.

Command or Code

use "cordova prepare ios" in Windows 10 with Cordova iOS 6.1.1.

Environment, Platform, Device

Version information

Windows: 10 Cordova CLI: 10.0.0 Cordova iOS 6.1.1 No Plugins Xcode 11.6

Checklist

breautek commented 3 years ago

use "cordova prepare ios" in Windows 10 with Cordova iOS 6.1.1.

This was never a supported configuration. Perhaps it worked before but cordova-ios is not tested on Windows and you shouldn't be preparing the ios platform on a machine other than a Mac, nor should you be sharing the platforms directory across different workstations. The platforms directory should be ignored in your version control system. They (similar to node_modules) can contain native binaries specific to the OS that added the platforms.

Instead, on every workstation you should use cordova platform add every platform you intend to build on that workstation. Projects can still pin their cordova-ios version but choose to opt out of adding the ios platform if the workstation isn't a Mac.

Closing as a "Won't Fix".