Restoring IAP occasionally don't work

I added the restore IAP node to my game, it work and all but not all the time, when i successfully restore the item, i close my game and relaunch it and try again and it tell me to purchase the item again, and when i do it say that i already purchase the item.

Is this a problem with sandbox ? is this a bug ?

My blueprint is setup just like match3 doc.

EDIT : On the branch node I connected the false output back to restore IAP Restore node and it work. any particular reason why is doing this ?

  • Have you tested this in 4.13 or 4.13.1?
  • What device are you on?
  • Do you have any logs that you would be able to provide?

When comparing your blueprint to the one in Unreal Match 3, I noticed that you’re missing the macro that has the back-end information for the purchase state. Also if you notice, there is a custom event created for the Restore IAP node which includes a node for the in-store widget, yours doesn’t seem to have that.

  • [Unreal Match 3 IAP][1] scroll to Restoring Purchases
  • [Adding IAP to your iOS][2]

Using In-App Purchases in Unreal Engine Projects for Mobile Devices | Unreal Engine 5.1 Documentation
[2]: Technical Note TN2259: Adding In-App Purchase to Your Applications

  • No
  • iPhone 6
  • No, it’s doesn’t crash

How to properly set up the macro ? What do i need to add in order gadder information for the purchase state ? In the doc doesn’t show any information on the macro. That custom event that you’re are talking about is it " Read In App " ?

Here’s a update

In the branch node in my blueprint, on false, i plug it in to Restore node and this time it work, i relaunch the game multiple time keep workings. However this is not ideal why is not connecting on first try ?

So… ?

Any idea why is taking to long to restore the purchase ?

After testing the restored feature(through sandbox), the way a got it to work(connecting the false branch back to the restore) is not ideal it take extremely long time to restore.

i was digging information about macro and looking at unreal doc it look like it calling the same success,fail twice. What do i need to add inside the macro ?

I would honestly suggest creating a copy of your project in 4.13.1 and seeing whether or not your IAP restores are working quicker or not.

Macro Documentation:

  • [Macros][1]
  • [Using Macro Libraries][2]
  • [Making Macros][3]
  • [Macro Library UI][4]

I went in and modified the Unreal Match 3 blueprint to look more similar to yours and proceeded to make a purchase. I made sure to remove the macro, as that may not be the issue on yours, as it seems the macro relates back information regarding the purchase itself - you should be able to leave that out. I did not notice any sluggishness or slowness, I also checked with others here who work with Unreal Match 3 more often and they too haven’t seen any problems with IAP or Restore IAP.

You are more than welcome to upload your project and provide it to me through a private message on the [forums][5].

Thanks!

https://docs.unrealengine.com/latest/INT/Engine/Blueprints/UserGuide/Macros/
[2]: Using Macro Libraries in Unreal Engine | Unreal Engine 5.1 Documentation
[3]: Making Macros in Unreal Engine | Unreal Engine 5.1 Documentation
[4]: Blueprints Visual Scripting Editor User Interface for Macro Libraries in Unreal Engine | Unreal Engine 5.1 Documentation
[5]: https://forums.unrealengine.com

If you don’t mind me asking ¿ did you test it through sandbox or through the app store ? ever since i submitted my game through the app store sandbox stop working, i can’t get the log in to appear.

Is this how it work ? if i submit my app through the app store i can no longer test it through sandbox ? not even creating new will work.

Thanks for the doc, once i get sandbox working again i will try a couple more test if not i will send you the project.

I tested through an account which connects with Game Center. Game Center does not support Sandbox Accounts anymore. I had originally thought it was a Sandbox Account because I had used those previously, hadn’t realized they changed. :slight_smile:

Okay here’s a update

I updated my engine to 4.13.1, however i cannot test the restore issue because of sandbox, i cannot get it to work, i can’t get the "log in " to appear. Do i need to change or add something to the game once it’s live on the App Store ? Do i need to change the certificate or the provision ? The IAP status are approved, so i really don’t know what going on.

I created a new project, set it up with itunes connect, new IAP, the status are " ready for submit " but nothing it won’t work either.

I package the game with checking and Unchecked the Distribution box, packaging for development and shipping don’t work either.

It’s does however prompt me to sign to my itunes account, after doing some research it look like it sending me to production environment not the sandbox environment, any reason why it doing this ? how do i switch back to sandbox environment ?

After my game was approved by the app store, i tried to upload a updated version (1.1) however i got rejected 3 time, the result where about the restore feature,but the strange thing is on the third rejection i got another message saying that my app din’t have IPv6 something, I don’t know if this have something to do with sandbox but i wanted to point that out. But by the first rejection i was already having trouble with sandbox.

I hope you can help me with this, i can’t find any information on why this is happening.

Please make sure that you’ve followed this [documentation][1] completely. I’d also review the [information given from Apple][2], it looks like they also have some guides about not having a Sandbox account anymore.

Setting Up an Unreal Engine Project for iOS | Unreal Engine 5.1 Documentation
[2]: Game Center Overview - Apple Developer

I’m aware that Game Center doesn’t work with sandbox anymore but my issue is not with Game Center, my issue is with In-App Purchase & Restoring. Apparently i can’t connect to the sandbox environment. The messages i receive when i got rejected said that they made a purchase and restore it successfully , however i’m missing a feature, in order to fix it i need to connect to sandbox environment but every time i package my game and launch it to my device i’m getting connected to the production environment not the sandbox environment, how do i switch environment ?

Is this have to do with Certificate and Provision ?
For development i’m using the " IOS App Development " for certificate and provision, and as for Production i’m using " App Store and Ad Hoc " for certificate and for provision i’m using " App Store ". In AppID the In App Purchase and Game Center are enable. Do i have this Correct ? if so what else can be causing this issue ?

You can’t connect to the Sandbox Environment, because Sandboxes are disabled by Apple.

From [Apple][1]:
As part of the release of iOS 9 and El Capitan, the Game Center development sandbox has been eliminated, allowing all pre-release development to occur in exactly the same server environment as released games. This change brings several advantages including:

  • Simplifying update testing by allowing testers to play with the full player base, not just other testers
  • Removing any implementation differences between the sandbox and release environments

Can you upload an image of the error that you’re getting when you’re rejected, or the message provided?

Technical Note TN2417: Game Center: Life without a Sandbox

I think i know what causing the rejection, i din’t add a restore button, i added the function but i realize i couldn’t test it because of sandbox.

The other message i got in the last rejection was due because of the IPv6. After doing some research i found out this post

so i updated the engine and added the function but i want to test it before submitting again but i can’t know.

If sandbox don’t work on release app ¿how do i test new function like In-App Purchase, Restoring ect. On new update ?

More Screenshot.

Update

I call apple support and i explain the situation and apparently sandbox still work with release app and approved In-App Purchase. The problem is in my end or there’s a bug please read carefully my issue is not or have anything to do with Game Center. My game is not connecting to sandbox, i cannot test or make purchase nor restore a product.

You will need to create tester accounts in iTunes Connect to test IAP. These are called Sandbox tester accounts. See [here][1] for how to set them up. After that follow the instructions [here][2] to do that actual testing.

-Pete

App Store Connect - Help - Apple Developer
[2]: App Store Connect - Help - Apple Developer

I don’t know why this is resolve because the original issue haven’t been resolve just the road block.Here’s a update regarding the original issue.

So my update got approve by the App Store yesterday but i still find a issue with not just Restoring Purchases but also when attempting to make a purchase, on first couple of attempt both fail on (Restoring and making the purchase) i need to keep trying until it eventually let me purchase or restoring the purchase. ¿ What can be causing this ?

I have scoured our and have not been able to find any reports of what you’re describing. I installed Unreal Match 3 on an iOS device and haven’t ran into any complications.

  • Is this happening on all iOS devices?
  • Are you having reports from users having trouble?
  • Do you have any [iOS logs][1]?
  • What about logs from any users?
  • Which devices have you tried so far?
  • What OS versions?

Looking forward to hearing back from you, thanks!

A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Hey

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you!

I currently looking for more ios device and testers.

The version i test it where 9.3.2 and the latest 10.1

I haven’t been getting report from other users because i eliminated In-App Purchase and made my game full retail price because of this issue.

As soon i get more device or testers and test the game, i will post the result here.

Sounds good, let us know once we can help you!