Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it ok to repurpose SKPayment.applicationUsername?

Regarding SKPayment.applicationUsername, it says here...

This is used to help the store detect irregular activity. For example, in a game, it would be unusual for dozens of different iTunes Store accounts making purchases on behalf of the same in-game character.

The recommended implementation is to use a one-way hash of the user’s account name to calculate the value for this property.

This property is optional. So, am I allowed to use it for something else entirely? I want to use it to store details about the product that are not stored in iTunes.

like image 422
Ian Warburton Avatar asked Dec 06 '25 16:12

Ian Warburton


1 Answers

SKPayment.applicationUsername is only used by Apple on the backend for fraud detection. They can use it to see if a single user is processing purchases on multiple devices, or processing purchases more rapidly than normal.

This value is unreadable except for on the payment you set it on, you aren't able to read SKPaymentTransaction.payment.applicationUsername it is always nil.

On a side note, I think this is a flaw in StoreKit as it makes it impossible to link transactions within an iTunes account to an application account, so if you have users sharing an iTunes account it is very difficult to not double grant purchased content.

like image 150
Jacob Eiting Avatar answered Dec 11 '25 16:12

Jacob Eiting



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!