Index of every page on this site: llms.txt
All skills
jame581 avatar

/mobile-development

@426e8ab
by Jan Mesarčjame581/godotprompter979 stars
63
Run it yourself

Use when targeting Android/iOS — export and signing, permissions, plugins, in-app purchases, ads, app lifecycle, device features, and mobile performance

Use this Skill: https://skilld.dev/gh/jame581/godotprompter/mobile-development

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesiap-and-ads.md

≈921 tokens on demand. Your agent reads this file only when SKILL.md points to it.

In-App Purchases & Ads

Back to Mobile Development.

Android: GodotGooglePlayBilling (Godot 4.2+, requires Gradle)

<!-- csharp-parity: n/a — the plugin is reached through a dynamic Engine singleton whose members are resolved at runtime; a C# port would be untyped Call()/Connect() string soup, and no first-party C# binding or example exists to verify it against. -->

The first-party GodotGooglePlayBilling plugin wraps the Play Billing Library. Godot 4.2+ and the custom Gradle build are required. (The official docs are GDScript-only.)

C# note: there is no first-party C# binding. The plugin is a dynamic Engine singleton, so from C# every call goes through Call("query_product_details", …) and every signal through Connect("on_purchase_updated", …) — untyped and unverified against a real build. Wrap it once behind a typed C# service interface and keep the string-based calls in that one file.

Lifecycle: construct a BillingClient, connect its signals, then call start_connection(). Query helpers: is_ready(), get_connection_state() (ConnectionState{DISCONNECTED, CONNECTING, CONNECTED, CLOSED}).

var billing

func _ready():
    billing = BillingClient.new()
    billing.connected.connect(_on_connected)
    billing.disconnected.connect(_on_disconnected)
    billing.connect_error.connect(_on_connect_error)
    billing.query_product_details_response.connect(_on_product_details)
    billing.on_purchase_updated.connect(_on_purchase_updated)
    billing.start_connection()

func _on_connected():
    billing.query_product_details(["coins_100"], BillingClient.ProductType.INAPP)

func _on_product_details(response):
    if response.response_code == BillingClient.BillingResponseCode.OK:
        billing.purchase("coins_100")

func _on_purchase_updated(response):
    for purchase in response.purchases:
        if purchase.purchase_state == BillingClient.PurchaseState.PURCHASED:
            _grant_items(purchase)              # Never award PENDING.
            billing.consume_purchase(purchase.purchase_token)  # Consumable.
            # For non-consumables: billing.acknowledge_purchase(purchase.purchase_token)

Signals: connected, disconnected, connect_error(code, msg), query_product_details_response(resp), query_purchases_response(resp), on_purchase_updated(resp), consume_purchase_response, acknowledge_purchase_response.

Methods: query_product_details(ids, type), query_purchases(type), purchase(product_id), purchase_subscription(...), consume_purchase(token), acknowledge_purchase(token).

Types: ProductType.INAPP / .SUBS, BillingResponseCode.OK, PurchaseState{UNSPECIFIED, PURCHASED, PENDING}.

Rules:

  • Query product details before calling purchase.
  • Acknowledge one-time purchases within 3 days or Google auto-refunds them.
  • consume_purchase auto-acknowledges (use it for consumables); acknowledge_purchase for non-consumables/subscriptions.
  • Never award a PENDING purchase — wait for PURCHASED.

iOS IAP

There is no documented first-party API for iOS in-app purchases — StoreKit is reached through a third-party or custom iOS plugin (see Plugins). Wrap the StoreKit flow behind the same service abstraction you use for Android so game code stays platform-agnostic.

Ads

Godot ships no first-party ad SDK. AdMob, Unity Ads, etc. are integrated as Android v2 / iOS plugins (see Plugins). Put every ad call behind the same service-abstraction interface you use for IAP so each platform's plugin is swappable and game code never references a vendor SDK directly.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts7d3 checks · Risk SAFE
  • Gen Agent Trust Hub8d

    The skill provides technical guidance for Godot mobile development, including app signing, permissions, and plugin usage. It utilizes standard developer tools and references community resources appropriately.

  • Socket7d

    No alerts

  • Snyk8d

    Risk: LOW · No issues

Signed by skilld at 426e8ab. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 6 days ago.

Activeupdated last week

README badge

README badge for jame581/godotprompter/mobile-development