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

Import UIKit and WatchKit conditionally to work around Xcode Previews not working on Mac #352

Closed

Conversation

DenTelezhkin
Copy link

This PR is practically identical to #342 and solves the same issue - when DeviceKit is used as framework dependency, Mac targets importing that framework fail to build for Xcode Previews.

This is not a build issue in Debug / Release configuration, it is only reproducible with Xcode Previews, as Xcode Previews seem to not be understanding platform filters (Link binary with libraries / Filters -> iOS, platformFilter = ios).

The only difference of this PR from #342 is that instead of if os() conditionals this PR uses #if canImport() statements, which should be more resilient, however it's obviously up to maintainers to select which approach is better suited for DeviceKit.

@la-pieuvre
Copy link

la-pieuvre commented Nov 14, 2023

thanks for your work, i hope someone will review it shortly :) (@denisenepraunig maybe)

@Zandor300
Copy link
Member

This issue should be fixed in v5.2.2 @la-pieuvre

@Zandor300 Zandor300 closed this Feb 6, 2024
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.

3 participants