pbxProject hasFile returns false for existing file on Windows
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- mobile-dev
Direzione di ricerca
Inizia con la chiamata a project.hasFile sul project.pbxproj indicato e riproducila usando l’esempio multipiattaforma collegato su Windows, Linux e macOS. Traccia come viene verificato lo SPLASH_SCREEN_PATH nel formato di Windows e considera completata l’issue quando viene rilevato un file esistente su Windows senza compromettere le altre piattaforme.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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 paths when detecting if files exists or not.
I created a repository with an example running on Ubuntu, MacOS and Windows that demonstrates this issue. The scenario it's testing is fairly simple:
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 and MacOS, but fails on Windows.
There is a workaround, you have to force the SPLASH_SCREEN_PATH to always be a posix formatted path. That works on Linux, MacOS, and Windows.
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);
- Lingua principale
- JavaScript
- Stelle
- 217
- Fork
- 102
- Merge medio
- 2g 9h
- PR unite (30g)
- 8
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/cordova-node-xcode
-
Add & Improve JSDocs Apertaenhancement
apache/cordova-node-xcode#171 · 1 assegnatario ·
-
🔖 New release Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
apache/cordova-node-xcode#162 · 4 commenti · 2 reazioni ·
-
Install .xcframework Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 28/100
apache/cordova-node-xcode#139 · 2 commenti ·
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
apache/cordova-node-xcode#138 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/cordova-node-xcode#137 · 2 reazioni ·
Tutte le issue di apache/cordova-node-xcode
Issue simili
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Improve Title Support Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·