Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native link on Windows uses incorrect path separator for xcode #615

Closed
qwertzguy opened this issue Aug 4, 2019 · 2 comments · Fixed by #618
Closed

react-native link on Windows uses incorrect path separator for xcode #615

qwertzguy opened this issue Aug 4, 2019 · 2 comments · Fixed by #618
Labels
bug Something isn't working good first issue: taken

Comments

@qwertzguy
Copy link

Environment

info
React Native Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
Memory: 5.49 GB / 15.89 GB
Binaries:
Yarn: 1.17.3 - C:\Users\gaspa\AppData\Roaming\npm\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842

Description

Running react-native link on windows will use backslashes in the xcode project file project.pbxcode in the HEADER_SEARCH_PATHS.

Resulting in strings like these:
"$(SRCROOT)..\node_modules\neact-native-fs/**",

These will not be parsed correctly by xcode.

The issue is in /packages/platform-ios/src/link/getHeaderSearchPath.js. It should not use the platform path.sep, instead it should always uses forward slashes, regardless of the current platform since xcode only runs on MacOS.

Reproducible Demo

create new project
add library that needs linking, such as react-native-fs
run react-native link react-native-fs on a windows machine
observe result in project.pbxcode file under HEADER_SEARCH_PATHS.

@qwertzguy qwertzguy added the bug Something isn't working label Aug 4, 2019
@thymikee
Copy link
Member

thymikee commented Aug 5, 2019

Would you like to send a PR with a fix? :)

@Taym95
Copy link
Contributor

Taym95 commented Aug 5, 2019

I would like to submit PR for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue: taken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants