Managing Auto-Renewable-Subscriptions between custom accounts and Apple ID

My app has its own membership system, but I’m encountering a conflict with the subscription management provided by Apple ID.

Here’s the issue: Suppose a user creates Account A and starts an auto-renewable subscription X, which is set to expire on 2024-09-15 at 12:00. This subscription can be managed within the iPhone settings. Later, the user logs out of Account A and logs into Account B, and then tries to purchase auto-renewable subscription X, the iPhone displays a popup message stating that the user is already subscribed to this item, preventing them from starting an auto-renewable subscription for Account B.

I’ve tested other apps, such as iQIYI, and noticed that they do not have this issue. How can I resolve this problem? Are there any resources or documentation that can help? I’m currently using the StoreKit2 API.

the iPhone displays a popup message stating that the user is already subscribed to this item, preventing them from starting an auto-renewable subscription for Account B.

That is the expected behavior when both accounts use the same Apple ID to purchase a product.

Are there any resources or documentation that can help? I’m currently using the StoreKit2 API.

Use appAccountToken(_:) and appAccountToken to associate a purchase with an account.

Managing Auto-Renewable-Subscriptions between custom accounts and Apple ID
 
 
Q