I hope someone can help here. I have my app set up with IAPHUB and everything is working well aside from 1 issue… When I change a subscription (either upgrade or downgrade) directly on the apple pop up it doesn’t reflect the actions back in adalo parameters.
My current group has 3 options so I tried adding to Action triggered when IAPHUB started successfully 3 update user actions conditional to the name of the product and I matched these to the parameters on sign up.
This doesn’t work. I hope I have explained it clearly.
Has anyone else encountered this? Should i even be trying to figure this out or should it update automatically?
Also what happens if a subscription ends (I have set the action so that when an active subscription is now inactive the action should run) but I have this set following the login screen. What happens if they close the app but don’t log out? Do I need to place it on multiple screens?
What I usually do is check the user’s subscription on every app launch using the IAPHUB Start component on the splash screen.
I retrieve the active subscription’s product ID through Magic Text and then update the Logged In User record based on which subscription tier is active.
I’ve just tested this on my end, and everything seems to be working fine!
Just to clarify, are you having trouble retrieving the correct product ID from IAPHUB, or is the issue with conditionally updating the Logged In User record based on the retrieved subscription tier?
I am having trouble retrieving the correct product ID from IAPHUB, which I think is causing the issue with conditionally updating the Logged In User record. I have used magic text to get the code for 2 of the products and they both are returning the same code neither of which are the product id that I created.
Just to be clear the issue happens when I am changing between memberships via the IAPHUB manage subscriptions button (so directly on apple subscriptions), I haven’t tested Android yet and when the purchase is made directly with the buy buttons it all works well.
Got it! Yes, normally the subscription product ID should be retrieved correctly even if the user changes their subscription directly through Apple’s subscription management settings.
I’d suggest adding a new Update Logged In User action without any conditions and saving the retrieved Subscription Product ID to a database property, just to check if IAPHUB is returning the correct value. Then create a new build and test it to see if it works! That should help us figure out whether the issue is with retrieving the product ID or with the conditional actions.
Yeah I did try that, thats when it was returning the same product id as the first product I tried! I think that maybe because its a downgrade I have to wait for IAPHUB to transfer it to the other membership to get the correct IAPHUB id? I have reached out to them directly to try and obtain the correct id’s but nothing x If you have any other suggestions i’m happy to hear them and thank you for your help xx
With downgrades, Apple normally keeps the current subscription active until the end of the billing period, so the new one won’t kick in until then. With upgrades, though, the change should happen pretty much immediately! From my experience, it usually takes about a minute for IAPHUB to update the product ID.
You can also check this in your IAPHUB dashboard under the Transactions tab! Have a look at the expiration date of the subscription that’s being replaced. That should give you an idea of when the new one will become active.
I checked the exp date (great tip) and it should end today so fingers crossed I get a different code! Can i ask what your codes look like? My first product returned membership_1.
Oh, that’s interesting! On my end, it actually returned the product ID I set up in App Store Connect.
As far as I remember, if it returns “membership_1”, it usually means you’re testing on the web with active subscription emulation enabled. I’m testing through TestFlight, and it returns the actual product ID from App Store Connect.
By the way, does it retrieve the correct product ID when you switch subscription tiers directly through your app’s paywall (not through Apple’s subscription management settings)? Or does it also return the correct ID when you first subscribe through the paywall?
Sorry one more quick question… Its seems to be all ok but i just wondered how you have set up so that if a user downgrades or doesn’t renew a subscription how do you get Adalo to update the parameters correctly? My check is currently on login but if the user doesn’t log out and back in it won’t check the current subscription and update, correct?
Should I add additional subscription checks on each feature that would be a paid feature? Would that slow the app down alot? Would there be a simpler way?
Sure, there’s a simple fix for this! You just need to add the IAPHUB Start component to your Splash screen and make sure that screen is set as the Home screen. This way, every time a user opens the app, their subscription status will be checked automatically.