In app purchase retry multiple times on the same scene cause app to crash
Hi Guys,
This is my first go at implementing in app purchase. Just want to see if anyone else has got this problem. I am working on an app which has a consumable in app purchase and every thing works as expected but if the purchase fails due to an error or is cancelled the user will go to a different scene. There are two scenes one for a cancellation and one for a failure due to an error. The two scenes are the same except one says cancelled and the other says error. On the cancellation/error scene there is a home button and a retry button if I click retry then succeed in purchasing the item then no problem but if I click retry then cancel then retry and cancel again or fail then fail again ie twice in a row on the same scene the app will crash. So the in app behaviour will work twice if the scene is not changed but then the app will crash. I tested this in creator, in the viewer and also as an adhoc and have been getting the same crash result.
I also tried the latest nightly build but got the same result.
To solve the problem I have removed the retry button and just left the home button on the cancellation and error scenes. The other option is to duplicate the error/cancellation scenes for the retry in app behaviour so it will always change scenes.
If anyone has an explanation to this I would really appreciate it. Thanks in advance.
Cheers,
Neoman
This is my first go at implementing in app purchase. Just want to see if anyone else has got this problem. I am working on an app which has a consumable in app purchase and every thing works as expected but if the purchase fails due to an error or is cancelled the user will go to a different scene. There are two scenes one for a cancellation and one for a failure due to an error. The two scenes are the same except one says cancelled and the other says error. On the cancellation/error scene there is a home button and a retry button if I click retry then succeed in purchasing the item then no problem but if I click retry then cancel then retry and cancel again or fail then fail again ie twice in a row on the same scene the app will crash. So the in app behaviour will work twice if the scene is not changed but then the app will crash. I tested this in creator, in the viewer and also as an adhoc and have been getting the same crash result.
I also tried the latest nightly build but got the same result.
To solve the problem I have removed the retry button and just left the home button on the cancellation and error scenes. The other option is to duplicate the error/cancellation scenes for the retry in app behaviour so it will always change scenes.
If anyone has an explanation to this I would really appreciate it. Thanks in advance.
Cheers,
Neoman
Best Answer
-
jonmulcahy Posts: 10,408
i think the problem is that when you use one of those 'success/failure/cancel' buttons it's actually using the pause feature, and you can't pause from a pause screen, which is effectually what you are doing with the retry button.
Answers