Use this page with AI

Copy this into your coding assistant and add your request.

Read https://openiap.dev/docs/apis/ios/present-external-purchase-notice-sheet-ios and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.

My request: [describe what customers should be able to do]
See an example request →

iOS presentExternalPurchaseNoticeSheetIOS

Present Apple's compliance notice sheet (iOS 17.4+, macOS 14.4+).

Wraps ExternalPurchase.presentNoticeSheet() — returns a token if the user accepts. iOS 17.4+, macOS 14.4+. See the Apple StoreKit reference.

Signature

swift
func presentExternalPurchaseNoticeSheetIOS() async throws -> ExternalPurchaseNoticeResultIOS

struct ExternalPurchaseNoticeResultIOS {
    let result: ExternalPurchaseNoticeAction
    let error: String?
    let externalPurchaseToken: String?
}

Returns#

Promise<ExternalPurchaseNoticeResultIOS> — carries:

  • result ('continue' | 'dismissed') — User action on the notice sheet — see ExternalPurchaseNoticeAction.
  • externalPurchaseToken (string?) — Reporting token returned by Apple when the user continues (result === 'continue'). Pass to your backend / send to Apple's External Purchase Server API.
  • error (string?) — Populated when the sheet failed to present.

When the sheet fails, Godot returns DISMISSED with error set and emits purchase_error.

Example

swift
let result = try await OpenIapModule.shared.presentExternalPurchaseNoticeSheetIOS()