Restore transactions for Non-renewing subscriptions without registration

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 01:41:37

问题


AppStore reviewer requires us to purchase Non-renewing subscriptions type will not enforce user to register. He means also the user not register he can also purchase Non-renewing subscriptions type

And Apple Document requires Non-renewing subscriptions must can be restored. He said :

Non-renewing subscriptions and consumable products are not automatically restored by Store Kit. Non-renewing subscriptions must be restorable, however. To restore these products, you must record transactions on your own server when they are purchased and provide your own mechanism to restore those transactions to the user’s devices.

So when user register , I will give the user an unique userId , he can get the userId with his userName and password , so I can share the user's info for different ios device , and I can restore the transactions , because they have an unique userId.

But the problem is this : when the user not register , my server will also give them an unique userId , the non-registration user will save the userId to the .plist . They can also restore transactions. But when he delete my app , and then download once , the userId is lost , so he can not restore transactions. He will be a normal default user.

Does the appStore will reject my app for the reason :

Cannot Restore transactions for Non-renewing subscriptions without registration,which delete the app before restore

If appStore will reject , how to fix it ,thx all.


回答1:


I have submit my app to the appStore.

I restore transactions for Non-renewing subscriptions who register or login.

I do not restore transactions for Non-renewing subscriptions who don't "register" and "delete my app".

My app is approved




回答2:


  • Registration must be optional for non-renewable inapp items.
  • You can give them a message that if you want to use on multiple devices, then you have to Register and login.
  • While registration, personal information like email and mobile no has to be optional and you have to explain them specifically why you have kept email in registeration (e.g like password recovery).
  • Just like previous comment, if the inapp for non-renewable item is not so expensive, they can accept the application. But if, the inapp is costly, they wont allow you to break any of their rules.

Note: You can use a mechanism to use UUID and store it in the keychain. If you reinstall the application, you can get it from keychain again and using the same UUID, you can manage expiry at your server.




回答3:


Apple Suggests using iCloud to persist the purchase data:

#if USE_ICLOUD_STORAGE
NSUbiquitousKeyValueStore *storage = [NSUbiquitousKeyValueStore defaultStore];
#else
NSUserDefaults *storage = [NSUserDefaults standardUserDefaults];
#endif

NSData *newReceipt = transaction.transactionReceipt;
NSArray *savedReceipts = [storage arrayForKey:@"receipts"];
if (!receipts) {
    // Storing the first receipt
    [storage setObject:@[newReceipt] forKey:@"receipts"];
} else {
    // Adding another receipt
    NSArray *updatedReceipts = [savedReceipts arrayByAddingObject:newReceipt];
    [storage setObject:updatedReceipts forKey:@"receipts"];
}

[storage synchronize];

At least it's better than throwing away the purchase information, when the user deletes the app. Making the customer pay twice for a service, is not a great user experience.



来源:https://stackoverflow.com/questions/17609347/restore-transactions-for-non-renewing-subscriptions-without-registration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!