apache / cordova-ios

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

fix(create): Ensure unix paths in Xcode project file #1312

Closed dpogue closed 1 year ago

dpogue commented 1 year ago

Platforms affected

iOS

Motivation and Context

Cordova-iOS requires macOS for building and deploying, but it seems to be a fairly common problem that people generate the iOS project files on Windows (which isn't technically supported, but appears to work) and then Xcode can't open it on macOS because of a bad path separator.

Description

The path separator problem is fixable, so let's at least generate a valid Xcode project.

This does not claim to add support for using Cordova-iOS on Windows.

Closes #971. Closes #1016. Closes #1084.

Testing

Split out tests for the created project into a test case that runs on all platforms, while keeping the tests that create and build only running on macOS.

Checklist

codecov-commenter commented 1 year ago

Codecov Report

Merging #1312 (cfbdc3e) into master (3d6c71a) will decrease coverage by 0.04%. The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #1312      +/-   ##
==========================================
- Coverage   78.48%   78.45%   -0.04%     
==========================================
  Files          15       15              
  Lines        1780     1782       +2     
==========================================
+ Hits         1397     1398       +1     
- Misses        383      384       +1     
Impacted Files Coverage Δ
lib/create.js 94.59% <66.66%> (-1.24%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more