mixpanel / mixpanel-swift

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

SPM support for watchOS? #415

Closed jasonzurita closed 3 years ago

jasonzurita commented 4 years ago

Is there any plan to support watchOS when using Swift Package Manager? The Package.swift file includes watchOS as a supported platform, but based on the below quote from the README and me trying to install it via SPM anyway for watchOS (many errors) looks like it isn't supported.

Important: we only have support for iOS, for now, if you need integrations for other platforms(tvOS or macOS), please use other integration methods instead

jasonzurita commented 3 years ago

Just want to check in to see if there was any update on this?

zihejia commented 3 years ago

Hi @jasonzurita , it's in our backlog. We will let you know when we start working on it. Thanks for raising it.

jasonzurita commented 3 years ago

Thanks, I look forward to it!

jasonzurita commented 3 years ago

Just checking in to see if there was any update on this?

zihejia commented 3 years ago

hi @jasonzurita , we will release a version by April that does not have Messages and Experiments support but it will support SPM for watchOS and macOS. If you don't use Mixpanel for push notification and a/b testing, you can opt into that version.

tealshift commented 3 years ago

Bump? @zihejia

bmalbuck commented 3 years ago

@zihejia Any updates to support watchOS SPM?

zihejia commented 3 years ago

Hello everyone! Sorry for the waiting. We've now added SPM support to our 3.0.0.beta release for watchOS.

1.  In Xcode, select File > Swift Packages > Add Package Dependency.
2.  Follow the prompts using the URL for this repository and point to the branch `3.0.0.beta`

Here is more context: On Jan 1, 2022, we’ll remove the Messages & Experiments(M&E) feature from Mixpanel. If you are not using messages or A/B testing, you can definitely use this beta version and it's in 100% parity with the main version excluding the M&E feature.

Going forward, we don't have a plan to add watchOS SPM support to the 2.x.x release. It will only be available to 3.0.0+. I'm closing this issue now, please feel free to reopen if there are issues on the 3.0.0.beta branch for the watchOS SPM support

tealshift commented 3 years ago

Hi, thanks for the update! I have installed the SPM lib on branch 3.0.0.beta and get missing dependency errors. One of which is the type SSLSecurity which would be in SSLSecurity.swift but that file is not present under the Sources directory. I hope I'm not just missing something obvious. Hope this helps!

zihejia commented 3 years ago

hi @tealshift , SSLSecurity no longer exists, have you tried cleaning all your build cache and the SPM cache?

tealshift commented 3 years ago

@zihejia Yes, I believe I have (though I'm not sure about the SPM cache clearing procedure)... but I see this file here https://github.com/mixpanel/mixpanel-swift/blob/3.0.0.beta/Sources/WebSocket.swift still references SSLSecurity so I don't understand how that could be. (this is where I get one build error in Xcode 12.5)

zihejia commented 3 years ago

hi @tealshift , sorry the file shouldn't be there. I just fixed that. Would you like to try again?

tealshift commented 3 years ago

Brilliant! No build errors remain. Thank you @zihejia :) I'm so happy I don't need cocoapods anymore XD

jasonzurita commented 3 years ago

Works great, thanks so much for this!!