Closed naan closed 5 months ago
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.
#if os(iOS) ~ #endif
This is a duplicate of #145, so I'm closing it to merge only one, but thanks anyway
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.