Closed artyorsh closed 7 months ago
I believe the proposed patch above doesn't go far enough in correcting the broken types. The following should actually fix the issue (ensuring that the object returned from forGDPRUser
and forNonGDPRUser
actually matches the expected type (an object containing isUserSubjectToGDPR
, hasConsentForDataUsage
and hasConsentForAdsPersonalization
) based on the two platform specific implementations :
Android setConsentData
diff --git a/node_modules/react-native-appsflyer/index.d.ts b/node_modules/react-native-appsflyer/index.d.ts
index e1ae493..d6d8442 100644
--- a/node_modules/react-native-appsflyer/index.d.ts
+++ b/node_modules/react-native-appsflyer/index.d.ts
@@ -115,11 +115,15 @@ declare module "react-native-appsflyer" {
}
export const AppsFlyerConsent: {
- forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => void;
- forNonGDPRUser: () => void;
+ forGDPRUser: (hasConsentForDataUsage: boolean, hasConsentForAdsPersonalization: boolean) => AppsFlyerConsentType;
+ forNonGDPRUser: () => AppsFlyerConsentType;
}
}
const appsFlyer: { onInstallConversionData(callback: (data: ConversionData) => any): () => void;
@amit-kremer93 can we get a fix for this merged. Seems like its very important with the March 6th deadline quickly approaching
+1
@chriskurzeja @artyorsh thanks for the above. Super helpful.
Just wondering what method did you use to determine if the user was in a GDPR region or not? I was thinking to use the Timezone string to determine. Been keen to see if there is a better way
@chriskurzeja @artyorsh thanks for the above. Super helpful.
Just wondering what method did you use to determine if the user was in a GDPR region or not? I was thinking to use the Timezone string to determine. Been keen to see if there is a better way
A bit different for us since I work on "EU only" app. But I guess I'd rely on IP ranges.
Fixed in 6.13.1
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch
react-native-appsflyer@6.13.0
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.