暗无天日是什么意思| 氨基酸有什么作用| 依赖是什么意思| 劳改犯是什么意思| 什么食物含铅| 什么笑脸| 9.21是什么星座| 孕妇梦见好多蛇是什么预兆| 胰腺炎吃什么中成药| 尿频吃什么药效果最好| 什么症状要查心肌酶| 冰冻三尺的下一句是什么| m是什么单位| 生米煮成熟饭是什么意思| 成人发烧吃什么退烧药| 1992年出生的是什么命| 血清和血浆有什么区别| 氮质血症是什么意思| 江西是什么菜系| 尿毒症有些什么症状| 人间四月芳菲尽的尽是什么意思| 灭活是什么意思| 左侧小腹疼是什么原因| 什么是有氧运动和无氧运动| 形同陌路是什么意思| ubc是什么意思| 焦虑症是什么症状| 虫草泡水喝有什么功效| 什么是半衰期| 馒头逼是什么意思| 每天放很多屁是什么原因| 煤气罐为什么会爆炸| 早搏吃什么药最好| 好事多磨是什么意思| 为什么会得白癜风| 气血不足喝什么| 尿潴留是什么病| 肺结核可以做什么运动| 无功无过是什么意思| 血糖高早餐吃什么| 什么叫私生饭| 飨宴是什么意思| 化生子是什么意思| 花椒什么时候传入中国| 白细胞阳性是什么意思| 财多身弱什么意思| 乙肝病毒携带者有什么症状| 5月26日是什么星座| 脾胃虚弱吃什么食物| 屁多吃什么药| 尿不尽是什么意思| lb是什么| 球拍状胎盘对胎儿有什么影响| 美甲什么颜色显手白| 拔罐之后要注意什么| 一个草字头一个见念什么| 献血前吃什么东西最好| 水过鸭背是什么意思| 睡觉磨牙是什么情况| 急性阴道炎是什么引起的| 嘴巴边上长痘痘是什么原因| 985211大学是什么意思| 桃子是什么形状| qaq是什么意思| 查肝肾功能挂什么科| 红薯什么时候种植最好| 杭州的市花是什么花| brooks是什么品牌| 为什么女生| 心想事成是什么意思| 偏头痛不能吃什么食物| 头顶不舒服是什么原因| 7.11是什么日子| 肠粘连是什么原因引起| 农历3月14日是什么星座| acc是什么意思| 司马光和司马迁是什么关系| 列文虎克发现了什么| 儿童热感冒吃什么药| 鸡婆是什么意思| 17点到19点是什么时辰| 四月十七号是什么星座| 空腔是什么意思| 侍郎是什么官职| 秦始皇是什么民族| 东莞有什么区| apc是什么药| gn是什么颜色| 脸红是什么大病的前兆| b型阳性血是什么意思| 肠胃不好吃什么比较好| 快照是什么意思| 孕激素高会有什么影响| 长智齿牙龈肿痛吃什么药| 68岁属什么生肖| 胰岛素是干什么的| 双的反义词是什么| 头孢是治疗什么病的| 书法用什么笔| 过敏性紫癜千万不能用什么药| 调兵遣将是什么生肖| 渗透压是什么| 时光静好是什么意思| 眼睛干涩模糊用什么药| 什么辣椒不辣| 计算机科学与技术是学什么的| 膀胱充盈差是什么意思| 初级中学是什么意思| 毛囊长什么样子| 九华山求什么最灵验| 什么血型不招蚊子| 终亡其酒的亡是什么意思| 儿童湿疹用什么药膏| 什么水果败火| 荔枝有什么营养| 十二指肠胃溃疡吃什么药| 来例假吃什么水果好| 行驶证和驾驶证有什么区别| 女人喝什么补气养血| tpc是什么意思| 肾湿热吃什么中成药| 啤酒花是什么东西| 拉大便出血是什么原因| 下体痒是什么原因| 出cos是什么意思| 生活是什么| 扪是什么意思| 做梦梦到自己生病了是什么意思| 身上长疣是什么原因| 千里共婵娟什么意思| 猪宝是什么东西| rj什么意思| 乇是什么意思| 七夕节是什么意思| 什么是精神出轨| 肺结节不能吃什么食物| 什么的山顶| 安全期是什么时候| 苦衷是什么意思| 排卵是什么意思啊| 什么是制动| 月经推迟不来什么原因| 鹅肝为什么那么贵| 奶奶和孙女是什么关系| 什么是排卵期怎么计算| 便秘吃什么菜| 间接胆红素偏高什么意思| 青核桃皮的功效与作用是什么| 唐朝以后是什么朝代| 子宫内膜回声欠均匀什么意思| 植鞣皮是什么皮| 天天射精对身体有什么危害| 子宫内膜厚有什么影响| 男生的隐私长什么样| 白色裤子配什么上衣好看| 羊奶和牛奶有什么区别| 梦到钓鱼是什么意思| 睡觉被口水呛醒是什么原因| 声东击西是什么意思| 16岁上什么年级| 情人什么意思| 杭州的市花是什么花| 什么是引产| 脸上长闭口是什么原因导致的| 外耳炎用什么药| 眼睛五行属什么| cg是什么| 梦见朋友结婚是什么意思| 土字旁的字有什么| 男生的蛋蛋长什么样| 京东发什么快递| 直捣黄龙是什么意思| 直肠炎用什么药效果最好| 淡蓝色配什么颜色好看| 虎父无犬女是什么意思| 撤侨是什么意思| 孕妇吃海参对胎儿有什么好处| 日本为什么要偷袭珍珠港| 检查尿液能查出什么病| 奥利给什么意思| 山梨酸钾是什么添加剂| 十二生肖叫老大是什么生肖| 灰蓝色是什么颜色| 螃蟹为什么吐泡泡| 男性肾虚有什么症状| 正常白带是什么颜色| 猴子偷桃是什么意思| 直立倾斜试验阳性是什么病| 煞气是什么意思| 吃什么排毒最快| 星月菩提五行属什么| 敞开心扉是什么意思| 红苕是什么| 补体c1q偏高说明什么| 橘子什么时候成熟| 菠菜什么季节吃| 良心是什么| 唐伯虎属什么生肖| 沙中土是什么生肖| 怀孕什么时候吃鹅蛋最好| hp是什么牌子的电脑| 12345是什么投诉电话| 非钙化斑块是什么意思| 镉是什么东西| 4月22日什么星座| 豆角炒什么| 2月3日什么星座| 心肌炎做什么检查| 梦见吃樱桃是什么意思| 梦见栽花是什么意思| 囊肿是什么原因引起的| 小狗驱虫用什么药| 黄褐斑是什么样的图片| 什么病不能吃松花粉| 出油多是什么原因| mic什么意思| sdh是什么意思| 碘伏是什么颜色| 过氧化氢是什么意思| 什么水不能喝| 远水解不了近渴什么意思| 三月十三是什么星座| 陈皮的功效是什么| 什么叫高危性行为| 牙龈肿痛什么原因| 挚友是指什么的朋友| 天麻有什么作用| 扶正固本是什么意思| 什么一刻值千金花有清香月有阴| 唐氏筛查是检查什么| 立牌坊是什么意思| 西红柿有什么营养| 前戏是什么| 阴囊潮湿是什么原因造成的| 蒹葭是什么| 衣服为什么会发霉| 7月30号什么星座| 十月一日是什么节| 出水芙蓉是什么意思| 灵芝有什么作用与功效| 猪横利是什么| vvip是什么意思| aoerbo是什么牌子的手表| 广西三月三是什么节日| 荔枝和什么不能一起吃| 1939年属什么| 梦见自己杀人了是什么意思| 兑卦五行属什么| 肠道消炎用什么药最好| 发泥和发蜡有什么区别| 舌苔黄腻厚是什么原因| 防晒什么时候涂| n2是什么| 90年出生属什么生肖| 芽轴发育成什么| 学历证是什么| 密度灶是什么意思| 戍什么意思| 善变是什么意思| 狭隘是什么意思| 梦见摘丝瓜有什么预兆| 骨龄挂什么科| 备是什么意思| 鸡血藤手镯有什么功效| 百度

View in English

  • Global Nav Open Menu Global Nav Close Menu
  • Apple Developer
Search
Cancel
  • Apple Developer
  • News
  • Discover
  • Design
  • Develop
  • Distribute
  • Support
  • Account
Only search within “”

Quick Links

5 Quick Links

Videos

Open Menu Close Menu
  • Collections
  • Topics
  • All Videos
  • About

More Videos

  • About
  • Summary
  • Transcript
  • 蔡依林与锦荣分手 或因结婚生子问题终止关系?

    百度 这些精神归结起来就是共产党人对党的绝对忠诚和对共产主义的绝对信仰。

    Learn about the latest StoreKit API enhancements to help you deliver great In-App Purchase experiences to your customers. We'll review new fields added to AppTransaction, Transaction, and RenewalInfo, and updates to In-App Purchase offer codes. We'll also cover creating signed In-App Purchase requests using the App Store Server Library and updates to merchandising subscriptions using SwiftUI.

    Chapters

    • 0:00 - Introduction
    • 0:36 - Explore new features
    • 10:24 - Sign In-App purchase requests
    • 14:21 - Merchandise Subscriptions

    Resources

    • Advanced Commerce API
    • Human Interface Guidelines: In-app purchase
    • Implementing a store in your app using the StoreKit API
    • Set up offer codes
    • Simplifying your implementation by using the App Store Server Library
    • StoreKit
      • HD Video
      • SD Video

    Related Videos

    WWDC25

    • What’s new in App Store Connect

    WWDC24

    • Explore App Store server APIs for In-App Purchase

    WWDC23

    • Meet StoreKit for SwiftUI

    WWDC21

    • Meet StoreKit 2
  • Search this video…

    Hi, I’m Rudy. I’m excited to share the new features in StoreKit and show how you can incorporate the App Store Server Library and new StoreKit 2 APIs into your development workflow. First, I'll go over the new core framework features in StoreKit.

    Then, I’ll show how you can sign your In-App Purchase requests using the App Store Server Library.

    Finally, I’ll review a new way you can merchandise subscriptions in your app using SwiftUI and StoreKit views.

    To start, let’s discuss the updates made to three crucial types: AppTransaction, Transaction, and RenewalInfo. These types give you insight into the purchase of your app and enable you to monitor purchase history and manage subscription statuses.

    AppTransaction provides information about the original purchase of your app. You can use this to know the original purchase date, the version of your app the customer downloaded, and the date a customer pre-ordered your app before you released it on the App Store. You could, for example, use appVersion to prompt customers to upgrade their app to ensure they’re running the latest version. To get an AppTransaction, query the AppTransaction.shared API and use a verified result. StoreKit automatically validates the JSON web signature for the AppTransaction and returns a verified value in the verification result. A verified AppTransaction means StoreKit was able to verify that the AppTransaction was signed by the App Store and that it belongs to your app and the customer’s device.

    We want to provide you as much information as possible about subscriptions and offers as you build your business strategy. This year, we added two fields to the AppTransaction type.

    As of iOS 18.4, the AppTransaction type includes the appTransactionID field, which is back deployed to iOS 15. appTransactionID is a globally unique value for each Apple Account that downloads your app.

    The appTransactionID is also unique for each family group member for apps that support Family Sharing. With appTransactionID, you can now do things like associate distinct original Transaction IDs without a server-to-server call.

    iOS 18.4 also introduced the originalPlatform field.

    originalPlatform is of a new type called AppStore.Platform.

    This value represents the platform on which the customer originally purchased your app.

    iOS, macOS, tvOS, or visionOS. These values match the target platforms available in App Store Connect.

    Apps people download on watchOS have the originalPlatform field set to iOS.

    With the originalPlatform field, you can now more easily support business model changes, such as moving from a paid app to a free app with In-App Purchases.

    The originalPlatform field can help you entitle customers appropriately as your business evolves over time. Next, we have updates to the Transaction type. A Transaction represents a successful In-App Purchase and contains useful information about the purchase. The Transaction includes the date of the purchase, the productID of the In-App Purchase, and in the case of auto-renewable subscriptions, the date the subscription expires. Transaction is primarily used to validate customer entitlement and unlock content.

    Your app identifies the content it should unlock by using the productID field.

    The system yields a Transaction either in-line after a purchase successfully completes or through one of the Transaction sequences, such as Transaction.currentEntitlements. Regardless of how you retrieve Transactions, Transactions are always wrapped in a verification result, similar to AppTransactions.

    This means you don’t need to worry about manually verifying the Transaction, since StoreKit 2 handles that for you automatically. Speaking of current entitlements, starting with iOS 18.4, the Transaction.currentEntitlement for productID API is deprecated and is replaced by the new Transaction.currentEntitlements API. Call this new API by passing a productID. This API returns an asynchronous sequence of Transactions that entitle the customer to a given product. Because a customer can have more than one Transaction that entitles them to a product, for example, if they own a subscription but also have access to it through Family Sharing, it’s recommended you adopt this API in your project.

    New this year, the Transaction model has three additional fields.

    The appTransactionID field, which is back deployed to iOS 15, is a unique identifier of the app download Transaction. This is the same value that the AppTransaction type contains, which I discussed earlier. iOS 18.4 also introduced the Offer Period field, which is contained in the offer member. Offer Period is the subscription period associated with a subscription offer a customer redeems at the time of purchase.

    The final new field introduced in iOS 18.4 is advancedCommerceInfo.

    AdvancedCommerceInfo only applies to apps that use the Advanced Commerce API. For apps that don’t use the Advanced Commerce API, this field is always nil.

    Advanced Commerce API enables you to more easily support In-App Purchases for large content catalogs, creator experiences, and subscriptions with optional add-ons.

    To support the Advanced Commerce API, StoreKit 2 provides new native APIs, including AdvancedCommerceProduct, which is available in iOS 18.4, and existing APIs, like Transaction and SubscriptionStatus.

    To learn more about the Advanced Commerce API, please visit the list of webpage resources for this session.

    Lastly, let’s review our updates to the RenewalInfo type.

    The RenewalInfo type is specifically for auto-renewable subscriptions. RenewalInfo contains information such as whether the subscription will auto-renew, the date of the next subscription renewal, and for subscribers such subscriptions have expired, the reason the subscription expired.

    An example of how you could use the subscription expiration reason is if you recently increased the price of your service, and the expiration reason is didNotConsentToPriceIncrease. This would be a good time to merchandise a win-back offer and encourage the customer to resubscribe to your service.

    StoreKit makes available RenewalInfo values as a wrapped VerificationResult member on SubscriptionStatus instances. You can attain a SubscriptionStatus in several ways, such as through the SubscriptionStatus updates API, or by querying StoreKit for subscription statuses using a subscription group ID. As a reminder, when you query StoreKit for subscription statuses using a subscription group ID, be sure to provide access to your app service based on the SubscriptionStatus that offers the highest service level, as outlined in your business model.

    Also new beginning with iOS 18.4 is the SubscriptionStatus API that takes a Transaction ID. Now, you can query StoreKit for a subscription status using the Transaction ID of any Transaction associated with a subscription. This year, we introduced four additional fields to the RenewalInfo type.

    The appTransactionID field is back deployed to iOS 15, and the Offer Period and advancedCommerceInfo fields are available beginning with iOS 18.4.

    We also added the appAccountToken field, which associates a subscription with a customer account on your service.

    You optionally provide an appAccountToken at the time of purchase using the appAccountToken purchase option.

    The App Store returns this same value in the new appAccountToken field for the RenewalInfo associated with the subscription. To access these new fields, all you need to do is build your app using the latest Xcode. We think these new fields will make developing your app even easier and will help you deliver a better customer experience. Now, I’d like to shift focus and discuss offer codes. These are alphanumeric codes that enable you to provide subscriptions at a discount or for free for a specific duration.

    Customers can redeem offer codes in the App Store using one-time redemption URLs or in your app if you implement the offer code Redemption StoreKit APIs.

    I’m excited to share offer codes are now available for consumables, non-consumables, and non-renewing subscriptions. Customers can redeem offer codes within your app through the offerCodeRedemption API. If your app uses UIKit, you use the presentOfferCodeRedeemSheet API.

    Redeeming offer codes for consumables, non-consumables, and non-renewing subscriptions is available back to iOS 16.3. The Transaction generated by a successful offer code redemption is available on any OS version using the StoreKit 2 APIs. If your app supports even earlier OS versions, customers can redeem offer codes for auto-renewable subscriptions all the way back to iOS 14.2.

    To support offer code redemptions for product types other than auto-renewable subscriptions, we introduced a new payment mode on the Transaction.Offer.PaymentMode type. This describes how the customer is charged or not charged during the offer period, depending on the offer type. It represents various payment modes including cases like freeTrial where no payment is required. The other payment modes include payAsYouGo and payUpFront. Now in iOS, you can expect the oneTime payment mode for In-App Purchase offer codes which is available back to iOS 17.2.

    If your app supports OS versions prior to 17.2 you can access this new payment mode through the offerPaymentModeStringRepresentation member on Transaction which is available as far back as iOS 15.

    If you’re looking to dive deeper into setting up In-App Purchase offer codes, check out the 2025 session, “What’s new in App Store Connect?” Also beginning in iOS 18.2, StoreKit has added purchase methods that require a UI context. Your app needs to specify the UI context where a purchase originates to ensure the system can display the payment sheet and success dialog in the most intuitive region of the device’s active scene.

    These new purchase methods are available beginning with iOS 18.2 and aligned releases. The UI context you provide differs by platform.

    On iOS, macCatalyst, tvOS, and visionOS, the UI context is a UIViewController. On macOS, it’s an NSWindow. If you're developing for watchOS, you don't provide UI context.

    If you’re purchasing from a SwiftUI view, you don’t perform this calculation on your own.

    Instead, read the purchase environment value to get a PurchaseAction instance.

    When you're ready to perform a purchase, You call the PurchaseAction instance directly because it defines a callAsFunction method that Swift calls when you call the instance.

    If you’re using StoreKit views, you don’t have to worry about providing the UI context.

    The system handles it for you automatically. To learn how to implement a best-in-class In-App Purchase experience for your customers using ProductView, StoreView, and SubscriptionStoreView, check out our WWDC 23 session, Meet StoreKit for SwiftUI. Now that we’ve explored the core API enhancements, I want to draw your attention to another important update. This year, we’ve introduced new APIs that require a JSON web signature.

    Let’s explore these new APIs and how you can use the App Store Server Library in your development workflow to simplify the signing process.

    New this year, you can set a customer’s eligibility for an introductory offer using the introductoryOfferEligibility purchase option. You can also now sign your promotional offers using the JWS format with the new promotionalOffer purchase option.

    These new purchase options both require a compact JWS string and are back deployed to iOS 15.

    We also introduced new SwiftUI view modifiers to go along with each of these purchase options. Using JWS helps the App Store verify that you authorized the purchase for specific use cases, like setting a customer’s eligibility for a promotional offer or an intro offer.

    To make signing your requests as easy as possible, we have great open source tools like the App Store Server Library that simplify the signing process.

    To see just how fast it is to create signed requests for your app, let’s see how we would sign a promotional offer in SKDemo.

    Before we get started, you’ll first need to retrieve your In-App Purchase signing key from App Store Connect. You can do this by navigating to the Users & Access tab, clicking on the Integrations header, and choosing In-App Purchases in the left navigation.

    You can use any active key or create a new key.

    You’ll want to make a note of the issuer ID and key ID of your In-App Purchase signing key. Now that you have an In-App Purchase signing key, let’s view the in-app subscription store in SKDemo. Our subscription store merchandises the plans available for a customer to purchase. I’d like to reacquire subscribers whose subscriptions have expired.

    To do this, I’ll merchandise a promotional offer on the Pro plan using the new JWS-based subscriptionPromotionalOffer modifier.

    This modifier expects two closures.

    In the first closure, you provide the subscription offer that should apply to the purchase of a given subscription. For this example, I’ll choose the promotional offer that has the longest free trial period for the Pro Plan using a helper method I created earlier. The second closure of this modifier expects a compact JWS containing the signed offer details.

    Here, this is provided to us by the NetworkLayer type. Let’s take a closer look at what that implementation looks like.

    In ourNetworkLayer, we pass the productID and offer ID for our product and subscription offer as query parameters for the request.

    Then, we perform a GET request to the promotion offer signing route on our server.

    Finally, we decode the response.

    On your server project, you begin by adding the App Store Server Library Swift package dependency and importing the App Store Server Library. In your implementation of the route responsible for handling promotion offer signing requests, you create a promotional signing context by initializing a PromotionOfferV2SignatureCreator with your app’s bundle ID, the signing key, key ID, and issuer ID you retrieved from App Store Connect earlier.

    Then, you call the createSignature function and provide the productID for the subscription being purchased and the offer ID of the subscription offer.

    It’s also good practice to include a value for the Transaction ID field.

    This value can be the appTransactionID or the TransactionID of any Transaction that belongs to the customer. Although the TransactionID field is optional, it is recommended to include it.

    Back in the app, the promotional offer can now be successfully redeemed and the purchase completes without incident.

    And that’s how you can create signed In-App Purchase requests using the App Store Server Library.

    Signing your In-App Purchase requests helps the App Store verify that you authorized a purchase.

    Integrating with the App Store Server Library makes signing your requests easy. And best of all, the App Store Server Library is available in four languages: Java, Python, Node.js, and Swift. To get started with the App Store Server Library, check out our WWDC24 session, Explore App Store server APIs for In-App Purchase. For our final set of updates, let’s review a new way to use SwiftUI to engage with customers in your app.

    I’m excited to introduce the newest member to the StoreKit views family, the SubscriptionOfferView. This is a new SwiftUI view for merchandising and auto-renewable subscription and is designed to capture your customer’s attention about your app’s service. You declare a SubscriptionOfferView using an already loaded auto-renewable subscription, or by using the productID for an auto-renewable subscription. When declared this way, the view does all the work of loading the product metadata from the App Store. You can optionally use the subscription image you set up in App Store Connect to decorate the view by setting the prefersPromotionalIcon flag to true. The decorative icon is displayed when the system finishes loading the subscription metadata.

    If you prefer to use a custom icon to decorate the view, you can use the alternate spelling of this API and pass in a trailing ViewBuilder closure.

    You can also provide a custom placeholder icon, which is shown while the subscription metadata is being downloaded from the App Store server.

    The SubscriptionOfferView is capable of merchandising more than just an individual subscription plan. When paired with the new subscriptionOfferViewDetailAction modifier, you can use this view to, for example, direct customer traffic to your in-app subscription store. Declaring this modifier draws the detailLink button on the view.

    When a customer taps the detailLink button, the view calls to close your path to this modifier.

    Here's an example in SKDemo.

    I modify some state in ContentView that controls the presentation method of the app’s user flow. When the customer taps the detailLink button, the customer is taken to the app’s subscription store to view subscription plans available for purchase. An important consideration when deciding to use this API is which subscription plan to merchandise or whether it should even be displayed at all. Let’s head back into the code for an example of how to use this API. Knowing which subscription plan to merchandise with a SubscriptionOfferView begins with determining the customer’s subscription status. In apps written using SwiftUI, the most convenient place to do this is in your implementation of the App protocol.

    You then use this data to inform the rest of your view hierarchy.

    You can do this by declaring the subscriptionStatusTask modifier introduced in iOS 17.

    Then, you translate the subscription statuses from StoreKit in this modifier into a model your app understands. In SKDemo, this model is called SKDemoPlusStatus. You then update a source of truth in your view that tracks a status and vend it through the environment using an environment variable.

    Now that I have the customer status, I’ll use this to display a SubscriptionOfferView in ContentView.

    Here, I read the environment value containing the customer status and decide to either merchandise a standard plan if the customer isn’t an active subscriber or higher tier plans if the customer’s already subscribed.

    To keep my code more concise, I’ll use the group ID initializer to create my SubscriptionOfferView.

    When declared this way, the system automatically chooses a plan from my subscription group.

    You’ll also need to specify the relationship of the merchandised plan relative to the customer’s current plan. The visibleRelationship parameter can be one of five values: upgrade, downgrade, crossgrade, current, and all. This API behaves differently depending on the customer’s status. Let’s take a closer look at each of these relationships, starting with upgrade. For demonstration purposes, let’s assume the customer in our example is subscribed to the middle-tier plan.

    Specifying upgrade causes the view to merchandise a subscription plan which is one level higher than the current plan. The inverse happens for the downgrade relationship. In this example, the subscribed and unsubscribed customer would see the same plan. You may want to merchandise a more affordable plan if your customer has turned off auto-renew and you want to retain them before the renewal cycle ends.

    The crossgrade option considers the plans in the group whose tier is equivalent to the current plan, and chooses the best value option among those. With the current relationship, the customer’s current plan is merchandised. By default, all interactions are disabled unless there is a subscription offer available to redeem. You mark a customer as eligible for an offer using any of the offer modifiers, such as the new subscriptionPromotionalOffer modifier and the preferredSubscriptionOffer modifier. A great use of this relationship is to merchandise a discount for an expiring subscription to help retain subscribers.

    Finally, the all relationship. This relationship behaves the same for all customers. When initialized this way, the view displays pricing information about all the plans in your group. You provide the action to be performed on the view by declaring the subscriptionOfferViewDetailAction modifier. Regardless of which relationship you create a SubscriptionOfferView with, you can also decorate it using a custom icon and placeholder icon, similar to the example earlier in the session. There’s also a convenience to use your app’s icon.

    Just set the useAppIcon flag to true.

    And that wraps-up the new SubscriptionOfferView, an exciting way to engage with your customers. Today, I covered numerous StoreKit API enhancements that will help you deliver a great in-app purchase experience to your customers.

    To utilize these new features, now is a great time to adopt StoreKit 2 in your project, if you haven’t already. To get the latest designs and create an excellent store in your app, use StoreKit views to merchandise your In-App Purchases and subscriptions.

    Check out the App Store Server Library on GitHub and integrate it into your project to make signing In-App Purchase requests as easy as possible.

    To learn more about App Store server APIs, we have a new WWDC25 session, Dive into App Store server APIs for In-App Purchase. And to get started adopting StoreKit 2, our WWDC21 session, Meet StoreKit 2, is an excellent starting point. Thanks for joining me today. I’m excited to see what you build using StoreKit.

    • 0:00 - Introduction
    • Learn about new StoreKit features including core framework updates, the App Store Server Library for signing In-App Purchase requests, and SwiftUI views for merchandising subscriptions.

    • 0:36 - Explore new features
    • There are new updates to three key types in StoreKit: 'AppTransaction', 'Transaction', and 'RenewalInfo'. These types provide you with valuable insights into the purchase of your app, as well as your customers’ transaction history and subscription status. 'AppTransaction' now includes two new fields as of iOS 18.4. The 'appTransactionID' is a globally unique value for each Apple Account that downloads your app, and is back-deployed to iOS 15. This ID is also unique for each family group member for apps supporting Family Sharing. The 'originalPlatform' field indicates the platform on which the customer originally purchased the app, such as iOS, macOS, tvOS, or visionOS. This information helps you support business model changes and entitle customers appropriately. The 'Transaction' type represents a successful In-App Purchase and includes details like the purchase date, product ID, and expiration date for auto-renewable subscriptions. Starting in iOS 18.4, the Transaction.currentEntitlement(for:)' API has a replacement named 'Transaction.currentEntitlements(for:)’. This new API returns an asynchronous sequence of transactions entitling the customer to a given product, as a customer can have multiple entitlements through different means. The 'Transaction' model has three new fields this year: 'appTransactionID', ‘offer period', which details the subscription period associated with a redeemed offer, and 'advancedCommerceInfo', which applies only to apps using the Advanced Commerce API. The Advanced Commerce API enables easier support for In-App Purchases for large content catalogs, creator experiences, and subscriptions with optional add-ons. Lastly, the 'RenewalInfo' type, specifically for auto-renewable subscriptions, contains details about the subscription's renewal status, helping you manage and understand subscription-based business effectively. This includes details like the date of the next subscription renewal., and for subscribers whose subscriptions have expired, the expiration reason. These reasons can be valuable for you to understand customer behavior and tailor your strategies accordingly. For instance, if a subscription expires due to a price increase, you can use this information to offer win-back promotions and encourage customers to resubscribe. Starting in iOS 18.4, the 'SubscriptionStatus' API is enhanced to allow you to query subscription statuses using a Transaction ID, providing more flexibility and data access. Additionally, four new fields are introduced to the 'RenewalInfo' type, offering you more comprehensive insights into subscription details.

    • 10:24 - Sign In-App purchase requests
    • This year, there are new Purchase Option and View Modifier APIs that require JSON Web Signatures (JWS). With these APIs, you can set customer eligibility for introductory offers and sign promotional offers using the JWS format. The App Store Server Library simplifies the JWS signing process. You need to retrieve your In-App Purchase signing key from App Store Connect and use it along with the Library to create signed requests.

    • 14:21 - Merchandise Subscriptions
    • A new SwiftUI view called 'SubscriptionOfferView' is designed to help you showcase and promote auto-renewable subscriptions in your apps. This view simplifies the process of merchandising subscriptions by automatically loading product metadata from the App Store when declared using an auto-renewable subscription ID. You can customize the appearance of the 'SubscriptionOfferView' by using the subscription image set up in App Store Connect or by providing a custom icon. You can also set a placeholder icon to display while the subscription metadata is downloading. You can also enhance the view with the 'subscriptionOfferViewDetailAction' modifier, which adds a 'detailLink' button. When tapped, this button performs a custom action you define. A common pattern for this action is to directs customers to an in-app subscription store, allowing them to explore and purchase available plans. To determine which subscription plan to display on a SubscriptonOfferView, consider the customer's subscription status by using the 'subscriptionStatusTask' modifier introduced in iOS 17. By translating StoreKit subscription statuses into an app-specific model, you can update the view hierarchy accordingly. You can configure the 'SubscriptionOfferView' to display different plans based on the customer's current status, using the 'visibleRelationship' parameter. Options include 'upgrade', 'downgrade', 'crossgrade', 'current', and 'all'.

Developer Footer

  • Videos
  • WWDC25
  • What’s new in StoreKit and In-App Purchase
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • App Extensions
    • App Store
    • Audio & Video
    • Augmented Reality
    • Design
    • Distribution
    • Education
    • Fonts
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning
    • Open Source
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Tutorials
    • Downloads
    • Forums
    • Videos
    Open Menu Close Menu
    • Support Articles
    • Contact Us
    • Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Get the Apple Developer app.
    Copyright ? 2025 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines
    心里空落落的是什么意思 办理护照需要什么材料 北京为什么叫四九城 尿常规阳性是什么意思 三刀六洞什么意思
    门当户对指的是什么 ds什么意思 新店开业送什么好 农历6月21日是什么星座 调虎离山是什么意思
    来大姨妈吃什么好 1979年什么命 陈旧性心梗是什么意思 时髦是什么意思 总蛋白低是什么意思
    什么是盗汗症状 crp是什么检查项目 法西斯是什么意思啊 炸酱面用的什么酱 9月初是什么星座
    结核阳性是什么意思mmeoe.com 美尼尔综合症吃什么药hcv8jop5ns2r.cn 脾肾两虚吃什么中成药hcv8jop4ns2r.cn 防晒霜和隔离霜有什么区别hcv8jop9ns4r.cn 节节草有什么作用hcv8jop3ns6r.cn
    圣诞节送女生什么礼物好hcv9jop1ns3r.cn 做爱是什么感觉hcv9jop1ns4r.cn c肽测定是什么意思wuhaiwuya.com 便秘吃什么快速通便helloaicloud.com 经常想吐恶心是什么原因hcv8jop0ns8r.cn
    有脚气是什么原因引起的hcv9jop6ns8r.cn 总胆红素高说明什么hcv9jop8ns1r.cn 肾构错瘤要注意什么hcv9jop3ns4r.cn 胰尾显示不清什么意思hcv9jop6ns0r.cn 把你的心我的心串一串是什么歌hcv9jop1ns8r.cn
    脱发看什么科wmyky.com 6.12是什么星座hcv9jop5ns7r.cn 西红柿含什么维生素onlinewuye.com 不显山不露水是什么意思hcv8jop6ns1r.cn 烦恼是什么意思hcv8jop1ns1r.cn
    百度