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

Support Xcode preview for multi-platform project #143

Closed
wants to merge 1 commit into from

Conversation

naan
Copy link

@naan naan commented Apr 30, 2024

There's a bug in Xcode Preview when you have a multi-platform project. When you set build destination other than iOS on preview in such project, Xcode Preview tries to build depended packages that does not support those platforms even you set not build those packages in Xcode. (more detail about this bug, please read: https://stackoverflow.com/questions/71334194/swiftui-preview-incorrectly-tries-to-build-conditional-dependency-from-another-p and https://forums.swift.org/t/swiftpm-platform-conditional-target-dependancy-not-resolved-for-tvos/56767)

This PR adds #if os(iOS) ~ #endif to the source files so it passes build on mac target.

@nathanfallet
Copy link
Collaborator

This is a duplicate of #145, so I'm closing it to merge only one, but thanks anyway

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