Hello,
I’m trying to integrate IAP using the extension.
The iap global instance seems to be present, but when I try to call the buy() method, I get the following error:
iap has been removed from core, please read /builtins/docs/iap.md for more information
Ok, you’ve added a link to a zip file in the dependencies?
Do you see a extension-iap folder in your project view to the left in the editor?
If not, you need to run “Fetch libraries” from the menu: "Project " -> “Fetch Libraries”
(It is done automatically when opening the editor)
If you already saw that folder, then I’m not sure what would cause this behavior. How do you run the application? What platform?
Ah, this won’t work. The default dmengine.apk which you can download from GitHub and d.defold.com does not include the IAP extension since it has been removed from the engine. You need to run a version of Defold which includes the extension. This is mentioned here:
“The stand-alone version will only work for projects without any native extensions. If your project contains native extensions you must bundle a Debug variant of your project to ensure that the dev app contains the native extensions that you intend to use.”
So bundle your game once using Project->Bundle->Android. Make sure you bundle a debug build. Install and start it. You will now be able to target it and have access to IAPs.
I tried many things to fix this (including cleaning /lib folder), but no luck so far. The reports are empty as well. I can’t understand what file is this error referring to. Thanks for your help.