Hi, guys!
I created a empty Xcode project with catalyst support and added one dependency YandexMobileMetrica via Swift Package Manager.
YandexMobileMetrica not support Catalyst architecture, so I need exclude this framework for macOS.
I opened section "Frameworks, Libraries" and I switched value from "iOS + macOS" to "iOS".
Then I wrapped the code:
But I'm getting an error:
https://github.com/mezhevikin/catalyst-spm-test - example of problem
How to exclude SPM dependency for Catalyst?
I created a empty Xcode project with catalyst support and added one dependency YandexMobileMetrica via Swift Package Manager.
YandexMobileMetrica not support Catalyst architecture, so I need exclude this framework for macOS.
I opened section "Frameworks, Libraries" and I switched value from "iOS + macOS" to "iOS".
Then I wrapped the code:
Code Block #if !targetEnvironment(macCatalyst) import YandexMobileMetrica #endif
But I'm getting an error:
Code Block language While building for Mac Catalyst, no library for this platform was found in '/Users/mezhevikin/Library/Developer/Xcode/DerivedData/catalyst-spm-test-gapaedifaylhvwatazbwfppyplvj/SourcePackages/artifacts/YandexMobileMetrica/YandexMobileMetricaCrashes.xcframework'.
https://github.com/mezhevikin/catalyst-spm-test - example of problem
How to exclude SPM dependency for Catalyst?