Skip to content
This repository was archived by the owner on Jun 24, 2024. It is now read-only.

Commit e01a22c

Browse files
committed
Merge branch 'main' into meetRCP
2 parents 0a1674d + 7e12fc3 commit e01a22c

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

content/notes/wwdc23/10142.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
contributors: Cecile-Lebleu
3+
---
4+
5+
Speaker: Hemant Sawle, Commerce Developer Advocate
6+
7+
## StoreKit Testing in Xcode
8+
9+
StoreKit Testing in Xcode allows local testing. Added in WWDC20.
10+
11+
- StoreKit configuration file to create and manage IAPs.
12+
- Perform local testing of in app purchases
13+
- Use simulator or device to test.
14+
- Leverage StoreKitTest framework to automate testing IAPs.
15+
- Sync products from AppStore Connect to Xcode: so configuration file doesn’t need to be created manually.
16+
- Supports advance subscription use cases, like offer code redemption, price increase sheet, and subscriptions entering and exiting billing retry.
17+
- Flexible subscription renewal rate, from real-time to every 2 seconds.
18+
19+
**New in Xcode 15:**
20+
21+
- Static renewal rates, independent of subscription duration.
22+
- Simulate StoreKit errors to build better error handling.
23+
- If running multiple instances of your app, the transaction manager will display transactions for each app instance.
24+
- Transactions manager also allows buying IAPs directly, to test external transactions.
25+
26+
Learn more in the session *“What’s new in StoreKit 2 and StoreKit Testing in Xcode”* from WWDC23
27+
28+
## App Store Sandbox
29+
30+
App Store Sandbox allows testing products set up in App Store Connect on client and server.
31+
32+
Prerequisites:
33+
34+
- Accept Paid Applications agreement
35+
- Registered device with your developer account
36+
- Create Sandbox Apple ID to make purchases in App Store Connect > Users & Access
37+
- Enable developer mode on device, in Privacy Settings
38+
39+
Sandbox enables testing production-like scenarios like purchases, restores, and subscription offers. Distribute the app directly to the device from Xcode, or using a distribution method like Release Testing, Debugging, or Custom (to generate an IPA file).
40+
41+
### Billing Problem message simulation (new)
42+
43+
- Available in sandbox, it will be available for customers in production when they enter billing retry.
44+
- Uses StoreKit 2 message API with reason `billingIssue`.
45+
- Implement a message listener in views to defer or suppress the message
46+
- Simulate `billingIssue` message in sandbox to test how your app handles the message presentation.
47+
- To trigger this, the sandbox Apple ID needs to be subscribed to an auto-renewable subscription. In the device, go to App Store Settings > Account Settings and disable "Allow Purchases & Renewals". Then, go back to your app and the billing issue message will appear.
48+
49+
Learn more about implementing StoreKit 2 Message API in *"What's new with in-app purchase"* from WWDC22
50+
51+
### Billing Grace Period (new)
52+
53+
Grace period allows users to maintain access to paid features while payment is being collected, without interruption.
54+
55+
- Go to App Store Connect > App > Subscriptions > Billing Grace Period.
56+
- The durations shown only apply to production; in testing, the sandbox account's renewal rate is used.
57+
58+
### Family Sharing (new)
59+
60+
Allow customers to share digital purposes with their family members.
61+
62+
- Go to App Store Connect > App > Subscriptions / Non-Consumable Products > enable Family Sharing
63+
- Organize Sandbox Family Sharing in App Store Connect
64+
- Make a purchase with sandbox Apple ID
65+
- Go to App Store Connect > Users and access > Family Sharing
66+
- To stop sharing, go to the device's settings, Account Settings > Family Sharing > Stop sharing
67+
68+
Family Sharing in Sandbox allows validating:
69+
70+
- Merchandise family-shareable products using StoreKit's `isFamilyShareable`
71+
- Validate app logic to entitle service for family members
72+
- Revoke access for family members, validate with `revocationDate` available in JWSTransactions
73+
- Receive App Store Server Notifications for family members
74+
75+
Learn more in the Tech Talk session *"Explore Family Sharing for in-app purchases."*
76+
77+
### iOS sandbox Account Settings (new)
78+
79+
Options only available in App Store Connect are now available on-device for testing. Go to App Store settings > Sandbox Account > Manage, to find Renewal Rate, Test Interrupted Purchases, and Clear Purchase History.
80+
81+
## TestFlight
82+
83+
TestFlight allows end to end beta testing and feedback from testers. Overview:
84+
85+
- Distribute app across all platforms
86+
- Add internal and external testers
87+
- Automatic updates
88+
- Builds valid for 90 days
89+
90+
Learn more in the Tech Talk session *"Get started with TestFlight"*
91+
92+
When testing in-app purchases:
93+
94+
- Builds are downloaded using TestFlight app
95+
- Uses Apple ID signed into Media & Purchases
96+
- In-app purchases are free
97+
- Subscription renewal rates are accelerated, equivalent to Sandbox
98+
- If the app has implemented StoreKit's `showManageSubscription`, you can test subscription cancellation or change subscription.
99+
100+
**New:**
101+
102+
- Manage TestFlight testers: filter tester data like status, sessions, and bulk selection.
103+
- Internal Only distribution makes the build only available to internal testers, and it cannot be submitted to App Store.
104+
Learn more in the sessions *"What's new in App Store Connect"* and *"Simplify distribution in Xcode and Xcode Cloud"* from WWDC23.

0 commit comments

Comments
 (0)