Forum rules - please read before posting.

Anyone integrated IAP (in app purchasing) into an iOS game?

I'm sure this is possible with custom scripting but I was wondering if anyone has integrated IAP into their game and can help me with adding it to my Adventure Creator iOS game. I've got it working (sort of) but would love to hear from others who've done it successfully. :)

Comments

  • Yes, I did, for my game „Strømhåll: Onyon (TOE-Edition)“ —> https://apple.co/31lH9pd

    It has been entirely programmed with AC, but for the InApp-Purchase management I also made use of the Easy IAP - Plugin from Gley (or rather their entire mobile tool set, as I needed additional mobile functionality, too).

    What specifically do you need to know?

  • Wow your game looks incredible! I will definitely get it from the App Store.

    I bought the Easy IAP plugin hoping it might help make adding IAPs easier to integrate. I was able to get my purchases set up on AppStore Connect and the Gley plugin quickly. Now I'm wondering how to call the purchase from a Hotspot:Use action list. I've got buttons on a scene that are not UI buttons (just graphics with Hotspots over them). I have an empty Gameobject with the IAP Manager script attached in the scene, but not sure if I my action list should be using Object:Call Event or Object:Send Message. Or perhaps I should be setting this up in a Menu instead of a Scene? Are you using a Unity UI menu for in app purchases?

  • not sure if I my action list should be using Object:Call Event or Object:Send Message

    As some general advice: both will achieve the same if you're calling a public function with no parameters. "Object: Call event", however, must retain its connection to the linked object at all times - i.e. either both the Action and the receiever must be in the same scene, or both are asset files.

    "Object: Send message", alternatively, is able to send messages to scene objects when placed in an ActionList asset, using the Constant ID system.

  • edited July 2021

    Are you using a Unity UI menu for in app purchases?

    No, I took the same approach as you (no Unity UI, but graphics with hotspots) as my IAP is sort of a vending machine section of the main puzzle machine. From your description, I‘d say we both use the same setup.

    And I chose the „Object: Call Event“ action for all IAP management as it happens entirely inside the main scene.

  • So did you write a custom script and attach it to a game object and then call event on that game object? I can’t seem to find what event I should call on the IAP Manager script.
  • Yes, exactly, I have custom scripts attached to a game object.

    These custom scripts handle declaration, setting and resetting of a bunch of global AC Vars, as well as declarations of some AC ActionLists that I use to handle the IAP processes visually.

    I also use a couple of listeners that react to the change of specific AC Vars; e.g. whenever the player starts the app, IAP will try to contact the app store by default (meaning: check if player is online) in order to InitIAP altogether and will continue this attempt indefinitely. Once this is successful, I have an AC bool var set to “true”, and the listener observing this will var fire a sequence of ActionLists onChange.

    The IAP Manager script remains unchanged. It just holds the functions that you call.

  • Oh wow, your programming knowledge is lightyears past mine! Thanks for the info. I downloaded your game and it's really beautiful.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.