Skip to content

MParticle forward setLocation selector to Braze (Appboy) which is not supported #260

@menasameh

Description

@menasameh

I was getting those 2 messages in the console

mParticle -> Forwarded selector: setLocation: is not supported by this kit
mParticle -> Failed to Forward to Kit

And after some investigation, According to this block of code

- (void)setLocation:(CLLocation *)location {
    if (![[MParticle sharedInstance].stateMachine.location isEqual:location]) {
        [MParticle sharedInstance].stateMachine.location = location;
        MPILogDebug(@"Set location %@", location);
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [MPListenerController.sharedInstance onAPICalled:_cmd parameter1:location];
            
            // Forwarding calls to kits
            MPForwardQueueParameters *queueParameters = [[MPForwardQueueParameters alloc] init];
            [queueParameters addParameter:location];
            
            [[MParticle sharedInstance].kitContainer forwardSDKCall:_cmd
                                                              event:nil
                                                         parameters:queueParameters
                                                        messageType:MPMessageTypeEvent
                                                           userInfo:nil
             ];
        });
    }
}

When we provide a new location it will loop through the activeKitsRegistry and try to forward the message to each active kit, however for Braze (Appboy) the setLocation selector is not supported, that's why I'm getting these messages in the console.

we should use one of those two instead

[AppDelegate.braze.user setLastKnownLocationWithLatitude:latitude
                                               longitude:longitude
                                      horizontalAccuracy:horizontalAccuracy];
[AppDelegate.braze.user setLastKnownLocationWithLatitude:latitude
                                               longitude:longitude
                                      horizontalAccuracy:horizontalAccuracy
                                                altitude:altitude
                                        verticalAccuracy:verticalAccuracy];

According to Braze (Appboy) docs

So I have 2 questions

  • Does that mean that currently we don't provide location to Braze (Appboy)?
  • Could that be solved on your side by converting the selector setLocation to setLastKnownLocationWithLatitude?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions