Download

In-App Purchase Node Fails - How to dig for more info?

Have a mixed C++ and BP project which has been out for a while with game center, achievements and cloud working fine. Now I am trying to add some DLC via IAP.

I have googled and scoured the docs, answers, forums and sorted out:

  • Everything to do with iTunes connect, provisions, entitlements, is definitely correct
  • Configs and build.cs are setup how they are supposed to be AFAIK
  • No typos with the ID, checked
  • Sandbox tester account is up and running, and logging in at game start with the sandbox flag

Now I am out of ideas, starting to fiddle with config stuff, feels bad man…
What I need is more info, all I get from the node is an enum with the value “Failure”

Questions that spring to mind:

  • When sandbox IAP testing does it matter whether its shipping/development? Distro?
  • Where can I check to see if IAP is indeed packaged with the app? The way ue4 works the info.plist in Xcode is empty…I guess it gets generated at package time.
  • Is there some particular info via c++ from onlinesubsystem classes I can get to find out more about why it fails?
  • Or should I be trying to get a log off the device somehow? (I have no idea how)
  • Can I check to find out if OnlineSubsystemIos is running properly? (I assume so since other iOS online features work)

Any help is super appreciated!

Ok I figured it all out, will post my findings in case it helps anyone.

Answers to my questions:

  1. Sandbox works in shipping or dev, you know it’s working when you see SANDBOX MODE in the welcome game center login notification.
  2. Getting Logs: while connected to a mac you get a live feed via xode->devices. To see the full picture you want to set [Core.Log] LogOnline=Verbose

IAP wasn’t the problem, it was actually that Restore Purchases is very flaky. If you call the node twice before it’s done or call it without being logged in, it will get stuck in a transaction in progress state forever. At that point none of the IAP nodes will do anything but fail. Only the verbose online log will tell you why.

In my case, I just had to do a IsLoggedIn check before restoring on boot, and if not logged in throw up a login first. Also I had to add some safekeeping to eliminate a few cases where it got hammered because of multiple levels loading.