我们可以分配 skpayment applicationusername 吗?
应用内购买完成后,我在 SKPayment 中得到一个空的 applicationUsername。
如何为 SKPayment
applicationUsername
赋值?
最佳答案
您不能为 SKPayment
的属性赋值;当您创建 SKMutablePayment
实例以提交购买请求时,您的应用程序可以提供一个代表应用程序用户 ID 的不透明值。这使 iTunes 商店能够检测到不正常的事件。
尽管名称如此,applicationUsername
属性并不意味着保存实际 用户名。
建议的方法显示在 In-App Purchasing Programming Guide 中
请注意,您分配的值 may not be present在您在交易队列中收到的 SKPayment
中。
Important
The applicationUsername property is not guaranteed to persist between when you add the payment transaction to the queue and when the queue updates the transaction. Do not attempt to use this property for purposes other than providing fraud detection.
关于ios - 如何分配 skpayment 应用程序用户名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37202248/