目次
Xcode の新機能
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
typealias PlaygroundQuickLook
structure Product
App Store から製品を要求する
static func products<Identifiers>(for: Identifiers) async throws -> [Product]
Product (製品) の説明と価格を表示
let displayName: String
let description: String
let displayPrice: String
let price: Decimal
var priceFormatStyle: Decimal.FormatStyle.Currency
var subscriptionPeriodFormatStyle: Date.ComponentsFormatStyle
var subscriptionPeriodUnitFormatStyle: Product.SubscriptionPeriod.Unit.FormatStyle
製品の購入
func purchase(options: Set<Product.PurchaseOption>) async throws -> Product.PurchaseResult
struct Product.PurchaseOption
購入オプションの設定
static func appAccountToken(UUID) -> Product.PurchaseOption
static func winBackOffer(Product.SubscriptionOffer) -> Product.PurchaseOption
static func promotionalOffer(offerID: String, keyID: String, nonce: UUID, signature: Data, timestamp: Int) -> Product.PurchaseOption
static func promotionalOffer(offerID: String, signature: Product.SubscriptionOffer.Signature) -> Product.PurchaseOption
static func quantity(Int) -> Product.PurchaseOption
インスタンスプロパティ
let appAccountToken: UUID?
店頭の変更に対する動作の指定
static func onStorefrontChange(shouldContinuePurchase: (Storefront) -> Bool) -> Product.PurchaseOption
Xcode で StoreKit テストのオプションを設定
static func purchaseDate(Date, renewalBehavior: Product.PurchaseOption.SubscriptionRenewalBehavior) -> Product.PurchaseOption
enum SubscriptionRenewalBehavior
テスト環境での更新動作
case cancelImmediately
case renewUntilNow
更新動作の作成
init(from: any Decoder) throws
演算子
static func == (Product.PurchaseOption.SubscriptionRenewalBehavior, Product.PurchaseOption.SubscriptionRenewalBehavior) -> Bool
インスタンスプロパティ
var hashValue: Int
インスタンスメソッド
func encode(to: any Encoder) throws
func hash(into: inout Hasher)
デフォルトの実装
  Equatable の実装
演算子
static func != (Self, Self) -> Bool
static func codeOffer(referenceName: String) -> Product.PurchaseOption
static func promotionalOffer(id: String) -> Product.PurchaseOption
サンドボックステストのオプションの設定
static func simulatesAskToBuyInSandbox(Bool) -> Product.PurchaseOption
カスタム購入オプションの設定
static func custom(key: String, value: Data) -> Product.PurchaseOption
static func custom(key: String, value: String) -> Product.PurchaseOption
static func custom(key: String, value: Bool) -> Product.PurchaseOption
static func custom(key: String, value: Double) -> Product.PurchaseOption
enum Product.PurchaseResult
購入結果の取得
case success(VerificationResult<Transaction>)
case userCancelled
case pending
enum Product.PurchaseError
購入エラーコードの取得
case invalidOfferIdentifier
case productUnavailable
case purchaseNotAllowed
case ineligibleForOffer
case invalidOfferPrice
case invalidOfferSignature
case invalidQuantity
case missingOfferParameters
現在の資格情報の受信
var currentEntitlement: VerificationResult<Transaction>?
最新の取引を取得
var latestTransaction: VerificationResult<Transaction>?
サブスクリプション情報の取得
let subscription: Product.SubscriptionInfo?
struct SubscriptionInfo
サブスクリプション状況の確認
var status: [Product.SubscriptionInfo.Status]
static func status(for: String) async throws -> [Product.SubscriptionInfo.Status]
struct Status
サブスクリプション状況の変化の監視
static var updates: Product.SubscriptionInfo.Status.Statuses
static var all: AsyncStream<(groupID: String, statuses: [Product.SubscriptionInfo.Status])>
struct Statuses
サブスクリプション状況情報の取得
let state: Product.SubscriptionInfo.RenewalState
let renewalInfo: VerificationResult<Product.SubscriptionInfo.RenewalInfo>
let transaction: VerificationResult<Transaction>
struct Product.SubscriptionInfo.RenewalState
更新状態の取得
static let subscribed: Product.SubscriptionInfo.RenewalState
static let expired: Product.SubscriptionInfo.RenewalState
static let inBillingRetryPeriod: Product.SubscriptionInfo.RenewalState
static let inGracePeriod: Product.SubscriptionInfo.RenewalState
static let revoked: Product.SubscriptionInfo.RenewalState
ローカライズされた説明の取得
var localizedDescription: String
製品の ID と型を取得
let id: String
let type: Product.ProductType
struct ProductType
製品の型の取得
static let consumable: Product.ProductType
static let nonConsumable: Product.ProductType
static let nonRenewable: Product.ProductType
static let autoRenewable: Product.ProductType
ローカライズされた説明の取得
var localizedDescription: String
ファミリー共有状況の取得
let isFamilyShareable: Bool
販売促進されたアプリ内購入の管理
struct PromotionInfo
製品 ID の取得
let productID: Product.ID
販売促進順序の管理
static func updateProductOrder(byID: some Collection<String>) async throws
オーバーライドされた順序の取得
static var currentOrder: [Product.PromotionInfo]
販売促進の表示の管理
var visibility: Product.PromotionInfo.Visibility
enum Visibility
表示状態の取得
case appStoreConnectDefault
case hidden
case visible
static func updateProductVisibility(Product.PromotionInfo.Visibility, for: Product.ID) async throws
順序と表示の更新
func update() async throws
static func updateAll(some Collection<Product.PromotionInfo>) async throws
製品のロード中
enum CollectionTaskState
コレクションタスクの状態
case loading
case success([Product], unavailable: [Product.ID])
case failure(any Error)
インスタンスプロパティ
var products: [Product]?
enum TaskState
タスクの状態
case loading
case success(Product)
case unavailable
case failure(any Error)
インスタンスプロパティ
var product: Product?
JSON 形式で製品情報を取得
var jsonRepresentation: Data
サブスクリプション関係の取得
struct SubscriptionRelationship
サブスクリプション関係の取得
static let all: Product.SubscriptionRelationship
static let crossgrade: Product.SubscriptionRelationship
static let current: Product.SubscriptionRelationship
static let downgrade: Product.SubscriptionRelationship
static let upgrade: Product.SubscriptionRelationship
インスタンスメソッド
func purchase(confirmIn: UIViewController, options: Set<Product.PurchaseOption>) async throws -> Product.PurchaseResult
func purchase(confirmIn: some UIScene, options: Set<Product.PurchaseOption>) async throws -> Product.PurchaseResult
func purchase(confirmIn: NSWindow, options: Set<Product.PurchaseOption>) async throws -> Product.PurchaseResult
サブスクリプショングループの識別
let subscriptionGroupID: String
var groupDisplayName: String
var groupLevel: Int
サブスクリプション期間の取得
let subscriptionPeriod: Product.SubscriptionPeriod
struct SubscriptionPeriod
サブスクリプション期間の取得
let value: Int
let unit: Product.SubscriptionPeriod.Unit
enum Unit
サブスクリプション期間の単位を取得
case day
case month
case week
case year
ローカライズされたデバッグの説明を取得
var localizedDescription: String
書式化された説明を取得
func formatted<S>(S) -> S.FormatOutput
struct FormatStyle
サブスクリプション期間単位の書式設定
func format(Product.SubscriptionPeriod.Unit) -> String
期間の日付範囲を取得
func dateRange(referenceDate: Date) -> Range<Date>
サブスクリプション期間の取得
static var everySixMonths: Product.SubscriptionPeriod
static var everyThreeDays: Product.SubscriptionPeriod
static var everyThreeMonths: Product.SubscriptionPeriod
static var everyTwoMonths: Product.SubscriptionPeriod
static var everyTwoWeeks: Product.SubscriptionPeriod
static var monthly: Product.SubscriptionPeriod
static var weekly: Product.SubscriptionPeriod
static var yearly: Product.SubscriptionPeriod
サブスクリプション期間の書式
func formatted<S>(S, referenceDate: Date) -> S.FormatOutput
func formatted<S>(S, referenceDate: Date) -> S.FormatOutput
紹介特典の詳細を取得
var isEligibleForIntroOffer: Bool
static func isEligibleForIntroOffer(for: String) async -> Bool
let introductoryOffer: Product.SubscriptionOffer?
struct SubscriptionOffer
let id: String?
サブスクリプション提供タイプの取得
let type: Product.SubscriptionOffer.OfferType
struct OfferType
価格情報の取得
let displayPrice: String
let price: Decimal
let paymentMode: Product.SubscriptionOffer.PaymentMode
struct PaymentMode
サブスクリプション期間の取得
let period: Product.SubscriptionPeriod
let periodCount: Int
サブスクリプション提供署名の作成
struct Signature
サブスクリプション提供書名の作成
init(keyID: String, nonce: UUID, timestamp: Int, signature: Data)
署名要素を取得
var keyID: String
var nonce: UUID
var signature: Data
var timestamp: Int
再獲得提供の詳細を取得
let winBackOffers: [Product.SubscriptionOffer]
販売促進提供の詳細を取得
let promotionalOffers: [Product.SubscriptionOffer]
構造体
struct Product.SubscriptionInfo.RenewalInfo
環境の取得
let environment: AppStore.Environment
取引 ID の取得
let originalTransactionID: UInt64
製品 ID の取得
let currentProductID: String
サブスクリプションの日付を取得
var recentSubscriptionStartDate: Date
var renewalDate: Date?
更新または有効期限の状況を取得
let state: Product.SubscriptionInfo.RenewalState
let autoRenewPreference: String?
let willAutoRenew: Bool
let expirationReason: Product.SubscriptionInfo.RenewalInfo.ExpirationReason?
struct ExpirationReason
有効期限切れの理由を取得
static let autoRenewDisabled: Product.SubscriptionInfo.RenewalInfo.ExpirationReason
static let billingError: Product.SubscriptionInfo.RenewalInfo.ExpirationReason
static let didNotConsentToPriceIncrease: Product.SubscriptionInfo.RenewalInfo.ExpirationReason
static let productUnavailable: Product.SubscriptionInfo.RenewalInfo.ExpirationReason
static let unknown: Product.SubscriptionInfo.RenewalInfo.ExpirationReason
ローカライズされた説明を取得
var localizedDescription: String
サブスクリプション提供の取得
let offer: Transaction.Offer?
struct Transaction.Offer
提供の詳細を取得
let id: String?
let type: Transaction.OfferType
struct Transition.OfferType
提供タイプの取得
static let introductory: Transaction.OfferType
static let promotional: Transaction.OfferType
static let code: Transaction.OfferType
static let winBack: Transaction.OfferType
ローカライズされた説明の取得
var localizedDescription: String
let paymentMode: Transaction.Offer.PaymentMode?
struct Transaction.Offer.PaymentMode
支払いモードの取得
static let freeTrial: Transaction.Offer.PaymentMode
static let payAsYouGo: Transaction.Offer.PaymentMode
static let payUpFront: Transaction.Offer.PaymentMode
let eligibleWinBackOfferIDs: [String]
更新価格と通貨の取得
var renewalPrice: Decimal?
var currency: Locale.Currency?
請求状況の取得
let isInBillingRetry: Bool
let gracePeriodExpirationDate: Date?
価格上昇状況の取得
自動更新サブスクリプションの価格上昇の管理
let priceIncreaseStatus: Product.SubscriptionInfo.RenewalInfo.PriceIncreaseStatus
enum PriceIncreaseStatus
価格上昇状況の取得
case noIncreasePending
case agreed
case pending
ローカライズされた説明の取得
var localizedDescription: String
サブスクリプション更新情報の確認
let deviceVerification: Data
let deviceVerificationNonce: UUID
let signedDate: Date
JSON 形式でサブスクリプション更新情報を取得
var jsonRepresentation: Data
廃止
var environmentStringRepresentation: String
  廃止  
var offerID: String?   廃止  
var offerType: Transaction.OfferType?   廃止  
var currencyCode: String?   廃止  
var offerPaymentModeStringRepresentation: String?   廃止  
PurchaseAction
func callAsFunction(Product, options: Set<Product.PurchaseOption>) async throws -> Product.PurchaseResult
Q
R
S
T
U
V
W
XYZ