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

Add #if os(macOS) macro #64

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Add #if os(macOS) macro #64

merged 1 commit into from
Mar 30, 2024

Conversation

akring
Copy link
Contributor

@akring akring commented Mar 29, 2024

Thank you very much for developing such a useful library.

I'm working on a SwiftUI-based project that also supports iOS/macOS, and when I'm using Keyholder, everything is perfect, the only problem is that it breaks the preview of the iOS platform and keeps it in an uncompilable state.

After some experimentation, I found that I needed to add the #if os (macOS) macro to the Keyholder and associated Sauce/Magnet to explicitly tell the preview not to import and compile this part of the code on iOS platforms.

SwiftUI and cross-platform apps are becoming more and more common, and preview is a very powerful feature in SwiftUI. So I think this change is necessary.

Thanks!

@Econa77 Econa77 self-requested a review March 30, 2024 09:55
Copy link
Member

@Econa77 Econa77 left a comment

Choose a reason for hiding this comment

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

👍

@Econa77 Econa77 merged commit 9014ffe into Clipy:master Mar 30, 2024
7 checks passed
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