How to setup StoreKit in XCode

Oscar de la Hera Gomez
A flower that represents App Store Connect next to one that represents Xcode. Beneath it sits the text "StoreKit Setup."

A step by step guide on setting up StoreKit Configuration File to work locally or sync with App Store Connect in XCode.

The following tutorial uses our Open Source Swift starter project to demonstrate how to setup a local StoreKit file as well as one sync'd to App Store Connect.

We recommend that you clone our Open Source Swift Starter Project, checking out the main branch and carrying out the steps below. The changes can be found on the tutorial/storekit/setup branch.

git clone git@github.com:delasign/swift-starter-project.git

Step One: Create the folder

A screenshot of Xcode showing the StoreKit folder under Models.

Under Models, create a new folder called StoreKit. This will hold all the relevant files for StoreKit, which will be added in later tutorials.

Step Two: Create the StoreKit file

A screenshot of Xcode showing a newly created local Storekit file.

In the StoreKit folder that you created in Step One, do the following:

A | Create a new StoreKit Configuration File

A screenshot of the Xcode create new file modal, with a highlight on the search bar with "StoreKit" typed in. We have highlighted the "StoreKit Configuration File" that appears, as well as the Next button on the bottom right.

Press Command + N and in the modal that appears, search for StoreKit.

Select StoreKit Configuration File and click Next.

B | Configure

A screenshot of the configure storekit configuration file that appears when you attempt to create a StoreKit Configuration File. Highlighted is the Name input field, as well as the checkbox beneath it, that allows you to sync files with an app in App Store Connect. Finally, we highlighted the next button on the bottom right of the modal.

Give your Storekit Configuration File a name (i.e. Offering).

As demonstrated below, if you check off Sync this file with an app in App Store Connect, you will have to pick a Team and an App to sync to.

Please note that Synced files are read-only.

A screenshot of what the modal looks like when you select Sync. It includes a Team and App dropdown, where you must select the team and app that you want to sync the file to in App Store Connect.

Once you've set the details, click Next.

C | Create

A screenshot of Xcode with the final step to creating the storekit configuration file. Highlighted is the project target, which must be clicked to make sure it gets added to the build, as well as the create button on the bottom right.

If you're not already in the folder that you wish to create the file in, navigate to that folder.

Then click Create.

We have provided samples of what a synced and local StoreKit file look like.

A screenshot of Xcode showing a newly created local Storekit file.

A sample local StoreKit configuration file.

A screenshot of Xcode showing a StoreKit configuration file synced to App Store Connect.

A sample StoreKit configuration file that has been synced to App Store Connect.

Next Steps | Create the Offering

The next steps involves creating any Consumable or Non-Consumable In-App Purchases and/or Auto-Renewing or Non-Renewing Subscriptions as well as any introductory or promotional offers, or offer codes.

Looking to learn more about developing apps with StoreKit 2?

Read our comprehensive development guide linked below to learn about all the secrets behind developing In-App Purchases and Subscriptions with StoreKit 2.

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
delasign logo

Book a Free Consultation.

An icon of an email.

Click here to email us.

Fill in the details below to book a free consultation or to let us know about something else. Whatever it is, we are here to help.

How can we help you ?

Contact Details