How to setup StoreKit in XCode
![Oscar de la Hera Gomez](https://www.delasign.com/CDN/headshots/profile.webp)
![A flower that represents App Store Connect next to one that represents Xcode. Beneath it sits the text "StoreKit Setup."](https://www.delasign.com/CDN/images/How-to-setup-StoreKit-in-XCode.webp)
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.](https://www.delasign.com/CDN/images/Create-Folder_2023-02-19-194119_rtyg.webp)
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.](https://www.delasign.com/CDN/images/Local-File.webp)
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.](https://www.delasign.com/CDN/images/Create-Storekit-configuration-file.webp)
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.](https://www.delasign.com/CDN/images/Name-and-Sync.webp)
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.](https://www.delasign.com/CDN/images/Sync-Options_2023-02-20-134107_dhsu.webp)
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.](https://www.delasign.com/CDN/images/Create_2023-02-19-194617_khhg.webp)
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.](https://www.delasign.com/CDN/images/Local-File.webp)
A sample local StoreKit configuration file.
![A screenshot of Xcode showing a StoreKit configuration file synced to App Store Connect.](https://www.delasign.com/CDN/images/Sync-File.webp)
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.