analytics-ios icon indicating copy to clipboard operation
analytics-ios copied to clipboard

SEGAnalyticsIntegrationDidStart unaccessible when integrating using SPM

Open piotrtobolski opened this issue 2 years ago • 6 comments

SEGAnalyticsIntegrationDidStart is in SEGIntegrationsManager.h which is in Internal directory. Because of that, the SPM-integrated framework is not exposing it. Seems like an error considering #520 that explicitly made it public. I need to access this variable to know which integrations are started because I'm using some of them directly (but only if they are started).

Suggested solution: move this declaration to some file from the Classes directory so it is available using SPM just like it is available when CocoaPods is used.

piotrtobolski avatar Apr 11 '22 13:04 piotrtobolski

Also interested in this. Using the string literal for now: io.segment.analytics.integration.did.start: https://github.com/segmentio/analytics-ios/blob/d93ee39e295222a8cfa19d5b684fe7eaea7fbcb4/Segment/Internal/SEGIntegrationsManager.m#L34

bart-kneepkens avatar Apr 19 '22 12:04 bart-kneepkens

+1

ecerney avatar Dec 05 '22 19:12 ecerney

+1

crtgregoric avatar Sep 13 '23 04:09 crtgregoric

I updated my segment analytics to the swift version from Obj-c using SPM. After updating I cannot find 'SEGAnalyticsIntegrationDidStart' in the scope, can anyone guide me on what can I use instead?

asadkazmi-mset avatar Oct 30 '23 11:10 asadkazmi-mset

"io.segment.analytics.integration.did.start"

piotrtobolski avatar Oct 30 '23 12:10 piotrtobolski

@piotrtobolski
I have used the notification 'io.segment.analytics.integration.did.start', but the corresponding observer is not being called

notificationCenter.addObserver(self,
                                       selector: #selector(integrationDidStart(_:)),
                                       name: NSNotification.Name(rawValue: "io.segment.analytics.integration.did.start"),
                                       object: nil)

asadkazmi-mset avatar Jan 03 '24 11:01 asadkazmi-mset