One Logo Pool Ball
StoreKit · IOS API REFERENCE

AppTransaction

struct · iOS 16.0+ · SDK 27.1

struct AppTransaction

Represents signed transaction information for an app purchase.

Members (22)

get · iOS 16.0+

appTransactionID

TypeScript
get appTransactionID(): string
Swift declaration
@backDeployed(before: iOS 18.4, macOS 15.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
var appTransactionID: String { get }
get · iOS 16.0+

originalAppVersion

TypeScript
get originalAppVersion(): string
Swift declaration
let originalAppVersion: String

The version of the app originally purchased.

get · iOS 16.0+

appVersion

TypeScript
get appVersion(): string
Swift declaration
let appVersion: String

The application version the transaction is for.

get · iOS 16.0+

signedDate

TypeScript
get signedDate(): globalThis.Date
Swift declaration
let signedDate: Date

The date this transaction was generated and signed.

get · iOS 16.0+

environment

TypeScript
get environment(): AppStore_Environment
Swift declaration
let environment: AppStore.Environment

The server environment this transaction was created in.

get · iOS 16.0+

appVersionID

TypeScript
get appVersionID(): (number) | null
Swift declaration
let appVersionID: UInt64?

A number the App Store uses to uniquely identify the version of the application.

get · iOS 16.0+

preorderDate

TypeScript
get preorderDate(): (globalThis.Date) | null
Swift declaration
let preorderDate: Date?

The date this app was preordered.

get · iOS 16.0+

revocationDate

TypeScript
get revocationDate(): (globalThis.Date) | null
Swift declaration
@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var revocationDate: Date? { get }

The revocation date of the app purchase.

get · iOS 16.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 18.4+

originalPlatform

TypeScript
get originalPlatform(): AppStore_Platform
Swift declaration
let originalPlatform: AppStore.Platform

The platform where the original purchase of the app.

get · iOS 16.0+

deviceVerification

TypeScript
get deviceVerification(): ArrayBuffer
Swift declaration
let deviceVerification: Data

A SHA-384 hash of `AppStore.deviceVerificationID` appended after `deviceVerificationNonce` (both lowercased UUID strings).

get · iOS 16.0+

jsonRepresentation

TypeScript
get jsonRepresentation(): ArrayBuffer
Swift declaration
var jsonRepresentation: Data { get }

The JSON representation of the transaction.

get · iOS 16.0+

originalPurchaseDate

TypeScript
get originalPurchaseDate(): globalThis.Date
Swift declaration
let originalPurchaseDate: Date

The date this original app purchase occurred on.

get · iOS 16.0+

deviceVerificationNonce

TypeScript
get deviceVerificationNonce(): string
Swift declaration
let deviceVerificationNonce: UUID

The nonce used when computing `deviceVerification`. - SeeAlso: `AppStore.deviceVerificationID`

get · iOS 16.0+ · Deprecated in iOS 27.0

storeTypeStringRepresentation

TypeScript
get storeTypeStringRepresentation(): string
Swift declaration
@backDeployed(before: iOS 27.0, macOS 27.0, tvOS 27.0, watchOS 27.0, visionOS 27.0)
var storeTypeStringRepresentation: String { get }

The string representation of the store where the original purchase of the app was made. @DeprecationSummary { Use the ``storeType`` property instead.}

get · iOS 16.0+ · Deprecated in iOS 18.4

originalPlatformStringRepresentation

TypeScript
get originalPlatformStringRepresentation(): string
Swift declaration
@backDeployed(before: iOS 18.4, macOS 15.4, tvOS 18.4, watchOS 11.4, visionOS 2.4)
var originalPlatformStringRepresentation: String { get }

The string representation of the platform where the original purchase of the app was made. @DeprecationSummary { Use the ``originalPlatform`` property instead.}

get · iOS 27.0+

all

TypeScript
static get all(): AppTransaction_AppTransactions
Swift declaration
static var all: AppTransaction.AppTransactions { get }

Returns all the `AppTransaction`s for this version of the app.

get · iOS 16.0+

appID

TypeScript
get appID(): (number) | null
Swift declaration
let appID: UInt64?

A number the App Store uses to uniquely identify the application.

get · iOS 16.0+

shared

TypeScript
static get shared(): Promise<VerificationResult<AppTransaction>>
Swift declaration
static var shared: VerificationResult<AppTransaction> { get async throws }

Get the cached `AppTransaction` for this version of the app or make a request to get one from the App Store server if one has not been cached yet.

static · iOS 16.0+

refresh

TypeScript
static refresh(): Promise<VerificationResult<AppTransaction>>
Swift declaration
static func refresh() async throws -> VerificationResult<AppTransaction>

Refreshes the shared `AppTransaction` from the App Store server. Calling this function will force an authentication dialog to display to the user.

get · iOS 16.0+

bundleID

TypeScript
get bundleID(): string
Swift declaration
let bundleID: String

Identifies the application the transaction is for.

get · iOS 27.0+

storeType

TypeScript
get storeType(): AppTransaction_StoreType
Swift declaration
let storeType: AppTransaction.StoreType

The store where the original purchase of the app was made.

Skipped declarations

No declarations were skipped in this snapshot.

All StoreKit types →