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.
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
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With