segment-integrations / analytics-ios-integration-firebase

Segment's bundled integration for Firebase on iOS
MIT License
13 stars 92 forks source link

Integrating amplitude to segment without using cocoapod #13

Closed Sh4rky closed 6 years ago

Sh4rky commented 6 years ago

Following the indication on this thread https://github.com/segment-integrations/analytics-ios-integration-amplitude/issues/46#issuecomment-339481764

I integrated the files from Segment-Firebase project directly to my project and installed Firebase pod. It compiles well but if I try to integrate it using

let integration = SEGFirebaseIntegrationFactory.instance()
let configuration = SEGAnalyticsConfiguration(writeKey: self.segmentKey)
configuration.trackApplicationLifecycleEvents = true
configuration.use(integration)

as the documentation suggests but the result is in the attached image. Any ideas? Thanks in advance

screen shot 2017-10-25 at 6 43 55 pm
ladanazita commented 6 years ago

Hi @Sh4rky,

I'm a bit confused, I thought the issue was with Firebase, not Amplitude. Can you install Firebase as explained in the original issue you opened (by manually including the Segment-Firebase files) and integrate Segment-Amplitude via the cocoapods?

If you still encounter issues, could you share the complete crash stack trace?

Thanks!

Sh4rky commented 6 years ago

@ladanazita Sorry I meant Segment-Firebase I've already edited it on the original comment. I installed Firebase as explained in the original issue. And integrated Segment-Amplitud via cocoapods. And that is the complete stack trace, it just keeps calling dynamicDidFailToRegisterForRemoteNotificationsWithError until it crashes.

screen shot 2017-10-30 at 1 07 04 pm screen shot 2017-10-30 at 1 07 12 pm
ladanazita commented 6 years ago

What other pods do you have? From what I can see, that doesn't seem to be coming from the Segment-Firebase nor the Segment-Amplitude

Sh4rky commented 6 years ago

Well if I remove configuration.use(integration) it doesn't crash, or anything like it.

I have several dependencies as pods, not sure I can list them all as part of a public issue, I could send it on an email if needed. But it seems that it has to do with SEGFirebaseIntegrationFactory or SEGAnalyticsConfiguration not playing nice with SEGFirebaseIntegrationFactory

Sh4rky commented 6 years ago

@ladanazita researching it a little more it seems there is a collision with cordova Plugin Pushwoosh, removing it from my project seems to avoid the crash. Sadly that's not an option for our project.

ladanazita commented 6 years ago

@Sh4rky Sorry for the delay here. It sounds like this doesn't have much to do with this component then. Closing this out, but let me know if there is anything I can do to help! Cheers