segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
399 stars 334 forks source link

Braze Integration - AppBoy object of "Integrations" is always false #967

Closed danielhorv closed 3 years ago

danielhorv commented 3 years ago

Hi Guys! We already have a functional Segment tracking in our iOS app, but we also need to integrate Braze (https://github.com/Appboy/appboy-segment-ios). We have a problem, when the events are tracked, they include an "integrations" object with "Appboy" which is always false:

,"integrations": {
  "Appboy": false
},

This means, that Segment doesn't send the tracked events to Braze. I just looked into the source code and it will always set to false. Is there any reason why?

- (NSDictionary *)integrationsDictionary:(NSDictionary *)integrations
{
    NSMutableDictionary *dict = [integrations ?: @{} mutableCopy];
    for (NSString *integration in self.analytics.bundledIntegrations) {
        // Don't record Segment.io in the dictionary. It is always enabled.
        if ([integration isEqualToString:@"Segment.io"]) {
            continue;
        }
        dict[integration] = @NO;
    }
    return [dict copy];
}

I just changed dict[integration] to @YES and now it seems to work. Android just send an empty object and it's also working.

BR Daniel

bsneed commented 3 years ago

@danielhorv is your intent for braze to be delivered via cloud mode, or via device mode?

alanjcharles commented 3 years ago

Closing since there has been no response in 10 months. Please feel free to reopen with additional information if this is still an issue.