关于SKPayment.applicationUsername
,它说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.
此属性是可选的。那么,我可以将它完全用于其他用途吗?我想用它来存储未存储在 iTunes 中的产品详细信息。
最佳答案
SKPayment.applicationUsername
仅由 Apple 在后端用于欺诈检测。他们可以使用它来查看单个用户是否正在多个设备上处理购买,或者是否比正常情况更快地处理购买。
此值不可读,除了您设置的付款之外,您无法读取 SKPaymentTransaction.payment.applicationUsername
它总是nil
.
顺便说一句,我认为这是 StoreKit
中的一个缺陷因为它使得无法将 iTunes 帐户内的交易链接到应用程序帐户,因此如果您有用户共享 iTunes 帐户,则很难不双重授予购买的内容。
关于ios - 可以重新调整 SKPayment.applicationUsername 的用途吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40166030/