How to display the in app purchase button?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Zaramath

I am trying to put the option to buy in my Godot project. I have managed to know if I have already bought or not but I don’t know how to make the buy button show up.

var InAppStore = Engine.get_singleton(“InAppStore”)
var result = InAppStore.purchase( { “my-id-purchase”: “name_id” } )
if result == OK:
#continue game
else:
#show in app purchase button

Read this https://docs.godotengine.org/en/stable/tutorials/platform/services_for_ios.html all of it. Purchases on IOS have nothing to do with Android or Engine.getsingleton (If i get it correctly sigleton already exists if iap enabled you just use it). I don’t have iphone to test.

yrtv | 2021-02-07 13:13

:bust_in_silhouette: Reply From: yrtv
Button.set_visible(true)

Will show Button

Button.set_visible(false)

Will hide Button

Full Documentation here: CanvasItem — Godot Engine (stable) documentation in English

Thanks for your response, but my problem is how to show the “ios in app purchase button” to make the purchase

Zaramath | 2021-02-07 07:03