Article

Testing Promoted In-App Purchases

Test your in-app purchases before making your app available in the App Store.

Overview

Users can buy promoted in-app purchases from the App Store, but you need to test this flow before making your product publicly available. Apple provides a system URL that triggers your app using the itms-services:// protocol, so you can test in-app purchases before they're available in the App Store.

Protocol

itms-services://

Parameter action

purchaseIntent

Parameter bundleId

The bundle ID for your app; for example:

com.example.app

Parameter productIdentifier

The in-app purchase product name you want to test; for example:

product_name

The resulting URL looks like this:

itms-services://?action=purchaseIntent&bundleId=com.example.app&productIdentifier=product_name

Send this URL to yourself in an email or iMessage and open it from your device. You will know the test is running when your app opens automatically. You can then test how your app handles the promoted in-app purchase.

See Also

Promoting In-App Purchases

class SKProductStorePromotionController

A product promotion controller for customizing the order and visibility of in-app purchases per device.