Hello
I have some difficulty testing subscription on IOS.
My app contain 3 subscription that are separate (there is no downgrade/upgrade group)
On Android I was able to test my app without any issue but behave strangely on IOS.
From Unity I just build my project and uploaded to testflight without changing anything on the xcode project except for the provisioning profile.
When I bought the first subscription everything when fine. When I try to buy the second subscription however, I got the IOS dialog saying that the purchase was made but ProcessPurchase callback was not triggered and the product state was still as I didn’t bought the product (doesn’t has receipt / isSubscribed from SubscriptionManager return false) even if I try to call several time RestoreTransactions from the Apple extension.
When I check on the subscription tab on IOS setting, I only see the last subscription I “bought” saying that the subscription has been updated.
When I return to the app, all of a sudden the first subscription return to a not bought state and the second one as bought state (ProcessPurchase callback still not triggered)
In the current state it is impossible to test my app on IOS.
Can someone tell me what’s happening?
I thank you in advance for your help
Hey @cnc-support,
The issue sounds like it might be related to having the subscriptions in the same iOS upgrade group. Could you double check?
If that’s not the case do you mind providing device logs so we can better help you get to the bottom of this.
Thank you very much for your help.
I’m not using subscription group.
In the Catalog Editor, “Automatically initialize UnityPurchasing(recommanded)” is still unchecked and I use the script from the IAP sample to initialize GameService and StoreController.
Below is how I initialize UnityPurchasing:
m_ConfigurationBuilder = ConfigurationBuilder.Instance(StandardPurchasingModule.Instance());
ProductCatalog PC = ProductCatalog.LoadDefaultCatalog();
if (PC.allProducts.Count>0)
{
foreach(ProductCatalogItem Item in PC.allProducts)
{
m_ConfigurationBuilder.AddProduct(Item.id, Item.type);
}
}
UnityPurchasing.Initialize(this, m_ConfigurationBuilder);
Below is how I call InitiatePurchase:
public bool PurchaseItem(string ProductId)
{
if (m_StoreController == null)
{
return false;
}
#if UNITY_IOS
if (!AppleConfiguration.canMakePayments)
{
return false;
}
#endif
bInitPurchase = true;
m_StoreController.InitiatePurchase(ProductId);
return true;
}
I’m attaching the log hoping it will help understand what it’s happening
While saving log, I’ve restarted the app to see current state both subscription state changed. During the log I’ve purchased both subscription but only the first one was completed (ProcessPurchase callback called)
After restarting the app, the first one state was as I didn’t bought it and the second one is as I bought it (ProcessPurchase was called)
log_IAP.txt (4.1 MB)
Hello @jacobbev
After some research using ChatGPT, it seems that there is an active subscription limitation, from chatGPT:
“Active Subscription Limitation: iOS only allows one active subscription of the same type per user. If both subscriptions are categorized under the same product type (auto-renewable), the system might prevent the purchase of the second subscription.”
Do you know if above statement is accurate?
The 3 subscription that I have are all auto renewable (monthly period) and only one has a trial period.
Also had the following comment:
Subscription Overlap: If both subscriptions are auto-renewing and intended to be active simultaneously, ensure that the configurations in App Store Connect allow for that. If they are mutually exclusive, the system may restrict purchasing the second subscription.
is there a documentation where it explain how to check if subscription are mutually exclusive?
As I can only test IAP in sandbox, I don’t know if current behavior is only raised on sandbox and everything will be fine on production or if current behavior will also occur on production because of some limitation on IOS side.
I thank you in advance for your help
I’ve misunderstood this part. I thought you were talking about subscription group inside unity.
The seems was on the Apple store side. The 3 subscriptions were set on the same subscription group which explain the strange behavior.
After splitting each subscription into different group I was able to test the subscription purchase normally.