react-native-iap
react-native-iap copied to clipboard
How to send external data with requestSubscription on iOS
Version of react-native-iap
7.5.0
Version of react-native
0.67.3
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
Hello. We need to send some external user data with iOS subscription as the app user can have a different email, etc. For Android, we use obfuscatedAccountIdAndroid
and obfuscatedProfileIdAndroid
in the requestSubscription
method. What can we use for iOS?
Thanks!
@elinahovakimyan please check out this comment on a similar issue, i think it would be useful to your case https://github.com/dooboolab/react-native-iap/issues/1576#issuecomment-1084989032
You will have to patch the package to keep the changes, and you will be limited to only using UUID's in the given applicationUsername field; however you could assign users UUIDs and use them on your server to identify them, if you don't already use them in your application
requestPurchase
now supports applicationUsername
@andresesfm i couldn't find it in the typescript?
"react-native-iap": "12.8.2",
sku: Sku;
andDangerouslyFinishTransactionAutomaticallyIOS?: boolean;
/**
* UUID representing user account
*/
appAccountToken?: string;
quantity?: number;
withOffer?: Apple.PaymentDiscount;
}
It's there: appAccountToken