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

Fix alternative xcode paths #542

Merged
merged 5 commits into from
Sep 18, 2024
Merged

Conversation

filip131311
Copy link
Collaborator

This PR allows non standard xcode setups.

How to test:
  • change the name of xcode.app in your application directory
  • update xcode-select using xcode-select --switch ${PathToYourXCode}/Contents/Developer
  • run ide

Copy link

vercel bot commented Sep 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-ide ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2024 4:46pm

Copy link
Member

@kmagiera kmagiera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please address inline comments prior to merging


### -sec-num- Configureing Alternative Xcode Versions

If you are using alternative Xcode version ( e.g. xcode-beta, "xcodes" ) IDE will only work if xcode-select points to the correct directory to set it up run: `xcode-select --switch ${PathToYourXCode}/Contents/Developer`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add link to xcodes here such that it is clear for people to understand what we refer to here in case they don't know what they use.

Also: have you tried xcodes here? It seems like it has select command so I'd expect that it sets the value with xcode-select, otherwise building swift/xcode projects from command line wouldn't work? Regardless of that I think we can keep this in the instruction, but it'd be good to know whether we should expect this to work when someone is using xcodes or not

if (Platform.OS === "macos") {
const { stdout } = await exec("xcode-select", ["-p"]);
const DYLD_FRAMEWORK_PATH = path.join(stdout, "Library", "PrivateFrameworks");
simControllerBinaryEnv = { DYLD_FRAMEWORK_PATH };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add some logging here, would be good for troubleshooting in case xcode-select prints out some trash data

@filip131311 filip131311 merged commit 993fcae into main Sep 18, 2024
3 checks passed
@filip131311 filip131311 deleted the @Filip13131/FixAlternativeXcodePaths branch September 18, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants