segment-integrations / analytics-ios-integration-firebase

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

didReceiveRegistrationToken from FIRMessaging not called #38

Closed dbyst closed 2 years ago

dbyst commented 5 years ago

Hi guys. In my project I'm using Segment to send events to Firebase. And also I'm using FIRMessaging to send push notifications. I did setup Segment successfully. But I'm having troubles with Firebase Push notifications after I setup Segment. I'm not receiving Firebase token for Push notifications.

My code in didFinishLaunchingWithOptions:

SEGAnalyticsConfiguration *configuration = [SEGAnalyticsConfiguration configurationWithWriteKey:@"kxkGcbHhZhq8LONtfD5ZBYeGMQL1siYB"];
[configuration use: [SEGFirebaseIntegrationFactory instance]];
[configuration use: [SEGGoogleAnalyticsIntegrationFactory instance]];
configuration.recordScreenViews = YES;
[SEGAnalytics setupWithConfiguration:configuration];

[FIRMessaging messaging].delegate = self;

The last line expect token to be received

- (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSString *)fcmToken {
}

But it's not called.

If to remove Segment configuration, then it works as expected. Can you help me with that ? Thanks.

alexvndre commented 5 years ago

Any news? Same for me.

Unique solution: dont use Firebase Integration with Segment ☹️