mixpanel / mixpanel-swift

Official iOS (Swift) Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
434 stars 234 forks source link

Can't build with macOS target #466

Closed vincent-le-normand closed 3 years ago

vincent-le-normand commented 3 years ago

I can't build mixpanel-swift using swift package manager with a macOS Target. The SPM build is failing on xib build and UIKit import. ` SourcePackages/checkouts/mixpanel-swift/Sources/TakeoverNotificationViewController~iphoneportrait.xib: error: iOS xibs do not support target device type "mac".

SourcePackages/checkouts/mixpanel-swift/Sources/ApplicationStateSerializer.swift:10:8: error: no such module 'UIKit' import UIKit … `

Tested with Xcode 12.5.1 on Mac OS BIgSur.

zihejia commented 3 years ago

hi @vincent-le-normand , our main release does not support macOS for SPM integration yet. If you don't use Mixpanel for messaging and A/B testing(M&E), you can opt-in our beta branch(use SPM to point to branch 3.0.0.beta) which is in full parity with the main branch without M&E. 3.0.0.beta should work for macOS. I'm closing this one now. Please feel free to reopen if you have any questions.