react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

How to send external data with requestSubscription on iOS

Open elinahovakimyan opened this issue 2 years ago • 1 comments

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 avatar May 25 '22 10:05 elinahovakimyan

@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

Wanes-Tutunjian avatar Jun 30 '22 08:06 Wanes-Tutunjian

requestPurchase now supports applicationUsername

andresesfm avatar Sep 01 '22 23:09 andresesfm

@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;
}

senghuot-lay avatar May 04 '23 01:05 senghuot-lay

It's there: appAccountToken

andresesfm avatar May 04 '23 18:05 andresesfm