What should I do when a user asks for their account to be deleted?
Apple now forces app developers to offer a way to remove an account right from the app. But what if the user is a subscriber?
Apple does not provide an API to unsubscribe a user. To set up account deletion from the My Account screen of your application (compliant with Apple request: https://developer.apple.com/news/?id=i71db0mv), you can redirect your user from your application to the subscription management screen on the App Store, which is what our SDK does with the subscription screen: https://docs.purchasely.com/advanced-features/display-users-subscriptions
What is the relationship between the App User account and Subscription?
The user will not have to unsubscribe to delete their account from your application.
The user can delete their account at any given time from their Apple account and their subscription is not linked to an account on your application for Apple.
An account on your application is linked to your server. A subscriber can disconnect from your application, connect with another account and restore their subscription to the account.
It's a good practice to advise a user to unsubscribe before deleting their account but you can't force them to.
If the user deletes the app they will be asked whether or not they want to keep their subscription.
How does it work for an Anonymous user?
If your applications allow anonymous users, the users whose accounts have been deleted will be able to restore their purchases so that they can continue to enjoy the content anonymously
Key points to note:
It is impossible for you to delete a subscription taken from the App Store. Only the user can do this.
If the user requests to delete their account, they will still be attached to their CRM ID at Purchasely.
If the user deletes their account and then deletes their application, Apple and Google will notify them that they have a subscription attached and offer to cancel it.
When a user deletes their account, we must immediately call the userLogout() method of our SDK, they will then become an anonymous user
If this user had a subscription it would remain attached to the logged-in user. You can transfer it to the anonymous user by calling the restore() function on the SDK. This will transfer the subscription of the logged-in user whose account has been deleted to the anonymous user.