singular-labs/react-native-sdk

limitDataSharing crash

toddtreece opened this issue · 7 comments

We have a CCPA opt-out form available for users, so we are attempting to set limitDataSharing(false) as the default unless the user has opted out. The app currently calls limitDataSharing right after init but the LDU flag is still sent to Facebook for the __SESSION__ event:

Singular.init(config);
Singular.limitDataSharing(false);

If we attempt to set limitDataSharing before init so that the LDU flag is not sent, the app crashes:

Singular.limitDataSharing(false);
Singular.init(config);

Is there a way to have limitDataSharing(false) take effect for the install attribution so that LDU flag is not sent?

Hi @toddtreece, thanks for the feedback.

We have added the withLimitDataSharing() method to the SingularConfig object to allow you to sent the LDS flag from the first session.
Please note that you will also need to update the native iOS pod dependency & android in order for the changes to apply.

Cheers,
Eyal

@eyalsingular thanks for the quick fix!

@eyalsingular i upgraded to 1.1.6 and upgraded the native dependencies, but i am still seeing &data_processing_options=%5B%22LDU%22%5D for the __SESSION__ event in the facebook postbacks from my testing on iOS. i haven't tested android yet, but i'll report back with the results.

here's what the init looks like in our app now:

const config = new SingularConfig(SINGULAR_KEY, SINGULAR_SECRET);
config.withLimitDataSharing(false);
Singular.init(config);

i'm seeing &data_processing_options=%5B%5D as expected without the LDU flag for the facebook __SESSION__ event postbacks, so this appears to only be an iOS issue at this point

@eyalsingular i'm not sure if this helps track down the issue on iOS, but i added some logging where the value is set, and it does seem like your change is passing the value to the iOS SDK, but the iOS SDK is not respecting it for the first event. i can’t see the source of the iOS SDK to debug further on my end.

if (![limitDataSharing isEqual:[NSNull null]]) {
[Singular limitDataSharing:[limitDataSharing boolValue]];
}

logging:

    if (![limitDataSharing isEqual:[NSNull null]]) {
        NSLog(@"before %d", [Singular getLimitDataSharing]);
        [Singular limitDataSharing:[limitDataSharing boolValue]];
        NSLog(@"after %d", [Singular getLimitDataSharing]);
    }

test result:

2020-12-11 13:20:19.367206-0500 Truebill[89761:788703] before 1
2020-12-11 13:20:19.369429-0500 Truebill[89761:788703] after 0

Hi @toddtreece,

Thank you, we investigated the issue and found that the native iOS SDK pod was not updated correctly, so when you updated the native dependencies it still used v10.1.4 instead of v10.1.5.

We fixed the issue and simply updating the iOS pods should solve the issue on your side.

Thanks for all of the help!
Eyal

@eyalsingular thanks for the help! i'll close this one and reopen if we are still seeing any issues after upgrading