StoreKit2
Use StoreKit2 to manage your subscriptions.
If you plan to use RevenueCat to manage your in-app purchases, you can skip this chapter and refer directly to the RevenueCat documentation to configure RevenueCat.
Adding In-App Purchases in App Store Connect
StoreKit2 in-app purchases require you to configure in-app purchases in App Store Connect. For this part, please check the RevenueCat documentation, Adding In-App Purchases in App Store Connect section. After reading this section, please return to this chapter to continue reading.
Configuring StoreKit2 in EasyApp
After completing the in-app purchase configuration in App Store Connect, you need to configure StoreKit2 productIDs in EasyApp.
Open the EasyAppSwiftUI/Constants/Constants.swift file, find the Constants -> StoreKit2 enum, and configure your productIDs.
The productIDs are the in-app purchase productIDs you configured in App Store Connect.

title="EasyAppSwiftUI/Constants/Constants.swift"
enum Constants {
// ... other configurations
/// StoreKit2 product IDs
/// Enter the product ID from App Store Connect here
enum StoreKit2 {
static let productIDs = ["your product ids"]
}
// ... other configurations
}Testing In-App Purchases
During development, in-app purchases are tested in the sandbox environment. No actual charges will be made during purchases.
Please use a real device for testing, not the simulator.
- First, we need to create a sandbox test account in App Store Connect's
Users and Access
If you already have a test account, follow the image below:

Click the + button to create a sandbox test account.
If you don't have a test account and are creating one for the first time, follow the image below:

In the subsequent popup, enter your test account information and click the Create button to save.

-
Run the app on a real device and test in-app purchases

Next Steps
Last updated on