Skip to content

In‐App Purchases

Patrick Fonseca edited this page Jul 21, 2023 · 1 revision

1) Create In-App Purchase identifier

To create your iAP product identifier, you must have a valid Apple Developer account.

  • Go to App Store Connect https://appstoreconnect.apple.com
  • Select your app, then click ‘In-App Purchases’ from the Features section on the left side
  • On the ‘Create an In-App Purchase’ view, select the type as ‘Non-Consumable’ then for Reference Name you can type anything you want, and for the last step ‘Product ID’ you must type your unique In-App Purchase product identifier.

It’s recommended to use your bundle identifier and some extra text at the end, for example: com.yourBundleIdentifier.premium

2) Replace In-App Purchase identifier

Open ‘AppConfig.swift’ file in Xcode. Look for ‘premiumVersion’ and replace the existing value with your In-App Purchase product identifier that you’ve created at step #1.

That’s all you have to do!

Troubleshooting

If you have issue where the iAP price doesn’t show up in the app, or in the logs you get errors saying “Product no found”, then make sure you follow these steps to troubleshoot the issue:

  1. Make sure you test on real device only
  2. Your App Store Connect in-app purchase product identifier must match the one from AppConfig
  3. If your app is not on TestFlight, make sure to sign in with your Apple Sandbox ID. To create an Apple Sandbox ID, go to App Store Connect -> Users and Access and see the Sandbox Testers on the left side. Create a new Sandbox account here.
  4. Check all your contracts, agreements, tax and banking info in App Store Connect. All must be accepted, in green status.
  5. Check your in-app purchase product, the status must be Approved, or Ready to Submit. If your product shows “Missing Metadata” then you must fill out all the fields in the App Store Connect for your iAP product.
Clone this wiki locally