Skip to content

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

Closed

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?

Activity

  1. nickolas-dimitrakas commented on Sep 17, 2026

    @nickolas-dimitrakas
    Contributor

    Closing — this was reported against the 8.x core-SDK location-forwarding mechanism; as of 9.0.0, location support (including the setLocation: forwarding path that produced this warning) has been removed from the core SDK entirely (see MIGRATING.md's "Removed Location Support" section). Reopen with details if you're still seeing this on the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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