Skip to content

Commit 36ce403

Browse files
committed
Remove getCustomerUserId API from React Native plugin
1 parent 4135920 commit 36ce403

6 files changed

Lines changed: 1 addition & 34 deletions

File tree

.af-e2e/test-plan.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
"id": "phase_5",
279279
"name": "Identity APIs round-trip",
280280
"scenario_ref": "E2E-005",
281-
"description": "Fresh install. Verify setCustomerUserId, getCustomerUserId readback, setCurrencyCode, setAdditionalData propagate correctly. Identity-check event receives HTTP 200. is_first_launch=true still fires.",
281+
"description": "Fresh install. Verify setCustomerUserId, setCurrencyCode, setAdditionalData propagate correctly. Identity-check event receives HTTP 200. is_first_launch=true still fires.",
282282
"requires_fresh_install": true,
283283
"wait_after_launch_sec": 420,
284284
"checks": [
@@ -289,13 +289,6 @@
289289
"pattern": "[AF_QA][setCustomerUserId] result:",
290290
"fail_action": "fail"
291291
},
292-
{
293-
"id": "customer_user_id_readback",
294-
"description": "getCustomerUserId returns the set value",
295-
"type": "log_contains",
296-
"pattern": "[AF_QA][getCustomerUserId] result:",
297-
"fail_action": "fail"
298-
},
299292
{
300293
"id": "currency_code",
301294
"description": "setCurrencyCode readback present",

android/src/main/java/com/appsflyer/reactnative/RNAppsFlyerModule.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -488,13 +488,6 @@ public void updateServerUninstallToken(final String token, Callback callback) {
488488
guardedCallback.invoke(SUCCESS);
489489
}
490490

491-
@ReactMethod
492-
public void getCustomerUserId(Callback callback) {
493-
CallbackGuard guardedCallback = new CallbackGuard(callback);
494-
String userId = AppsFlyerLib.getInstance().getCustomerUserId();
495-
guardedCallback.invoke(null, userId != null ? userId : "");
496-
}
497-
498491
@ReactMethod
499492
public void setCustomerUserId(final String userId, Callback callback) {
500493
CallbackGuard guardedCallback = new CallbackGuard(callback);

example/src/App.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@ function runAutoFlow() {
8989
afLog('getSDKVersion', `result: ${version || err}`);
9090
});
9191

92-
appsFlyer.getCustomerUserId((err, userId) => {
93-
afLog('getCustomerUserId', `result: ${userId || err}`);
94-
});
95-
9692
afLifecycleLog('--- Post-start auto APIs complete ---');
9793

9894
// 5. Fire standard events (Promise API — Android CallbackGuard WeakReference

index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,6 @@ declare module "react-native-appsflyer" {
312312
setAdditionalData(additionalData: object, successC?: SuccessCB): void;
313313
getAppsFlyerUID(callback: (error: Error, uid: string) => any): void;
314314
getSDKVersion(callback: (error: Error, version: string) => any): void;
315-
getCustomerUserId(callback: (error: Error | null, userId: string | null) => void): void;
316315
setCustomerUserId(userId: string, successC?: SuccessCB): void;
317316
stop(isStopped: boolean, successC?: SuccessCB): void;
318317
setAppInviteOneLinkID(oneLinkID: string, successC?: SuccessCB): void;

index.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -464,15 +464,6 @@ appsFlyer.setCustomerUserId = (userId, successC) => {
464464
}
465465
};
466466

467-
/**
468-
* Get the customer user ID that was previously set with setCustomerUserId.
469-
*
470-
* @callback callback function that returns (error, userId)
471-
*/
472-
appsFlyer.getCustomerUserId = (callback) => {
473-
return RNAppsFlyer.getCustomerUserId(callback);
474-
};
475-
476467
/**
477468
* Once this API is invoked, our SDK no longer communicates with our servers and stops functioning.
478469
* In some extreme cases you might want to shut down all SDK activity due to legal and privacy compliance.

ios/RNAppsFlyer.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,6 @@ -(NSError *) callSdkInternal:(NSDictionary*)initSdkOptions {
241241
callback(@[[NSNull null], version]);
242242
}
243243

244-
RCT_EXPORT_METHOD(getCustomerUserId: (RCTResponseSenderBlock)callback) {
245-
NSString *userId = [[AppsFlyerLib shared] customerUserID];
246-
callback(@[[NSNull null], userId ?: @""]);
247-
}
248-
249244
RCT_EXPORT_METHOD(setCustomerUserId: (NSString *)userId callback:(RCTResponseSenderBlock)callback) {
250245
[[AppsFlyerLib shared] setCustomerUserID:userId];
251246
callback(@[AF_SUCCESS]);

0 commit comments

Comments
 (0)