+1 vote

I am having an issue with implementing the new iOS plugin for in-app purchasing.
Previously in Godot 3.2.3 everything worked perfectly.
Now with the plug-in, if I call purchase, it returns an error, result code 31.
Anyone have experience with this?

Steps to reproduce:
- Download the release plugins3.3.zip
- Copy the inappstore folder from the zip
- Paste it inside Project
- Export the project with the In App Store plugin ticked
- On an xcode simulator or a real iphone, press a button that calls the purchase() method
- It will return with an error: 31

Godot version 3.3.2
in Engine by (31 points)

2 Answers

+1 vote
Best answer

In my case, the solution was to call


In Godot 3.2.3 this was not needed, but that was actually not intended.
So now in Godot 3.3.2 they fixed it, and it is required to call the method with your product id's before you can make a purchase.

Also beware that previously you could directly test it in XCode, but now you will still get the error, you have to use a physical iphone.
(Or maybe set up something with sandbox testing or whatever, I don't have experience with that)

See also:

by (31 points)
0 votes

I am getting the exact same error in the same scenario. Were you ever able to solve this issue?

by (14 points)

Hi, yes I was able to solve it. I don't know if you have the same cause, but let me describe my situation in an answer

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.