byCedric opened a new issue #116: URL: https://github.com/apache/cordova-node-xcode/issues/116
It looks like we are running into an issue with this in our Expo CLI on Windows. After some investigation, it looks like there are some issues with Posix and Windows path when detecting if files exists or not. I [created a repository](https://github.com/bycedric/xcode-windows-hasfile-issue) with an example that runs on Ubuntu, MacOS and Windows that demonstrates this issue. The scenario it's testing is fairly simple: ```js const PBX_PROJECT_PATH = path.resolve('ios', 'testios2.xcodeproj', 'project.pbxproj'); const SPLASH_SCREEN_PATH = path.join('testios2', 'SplashScreen.storyboard'); // Create a new pbx project instance const project = xcode.project(PBX_PROJECT_PATH); // Now parse the project project.parseSync(); // Determine if "SplashScreen.storyboard" exists const file = project.hasFile(SPLASH_SCREEN_PATH); ``` You see that this is done successfully on both [Linux](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850644?check_suite_focus=true#step:6:8) and [MacOS](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850677?check_suite_focus=true#step:6:8), but [fails on Windows](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850707?check_suite_focus=true#step:6:8). Only if I tweak the `SPLASH_SCREEN_PATH` to always be a posix formatted path, like this for example: ```js const SPLASH_SCREEN_PATH = path.join('testios2', 'SplashScreen.storyboard') // Force the path to always be a posix formatted path .replace(path.sep, path.posix.sep); ``` This works on [Linux](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850644?check_suite_focus=true#step:5:8), [MacOS](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850677?check_suite_focus=true#step:5:8), _and_ [Windows](https://github.com/byCedric/xcode-windows-hasfile-issue/runs/1231850707?check_suite_focus=true#step:5:8). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
