<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKitTest",
  "identifier" : "/documentation/StoreKitTest/SKTestSession/init(configurationFileNamed:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestSession(im)initWithConfigurationFileNamed:error:"
  },
  "title" : "init(configurationFileNamed:)"
}
-->

# init(configurationFileNamed:)

Initializes the test session with the provided configuration file that you include in your application’s bundle.

```
convenience init(configurationFileNamed filename: String) throws
```

## Parameters

`filename`

A StoreKit configuration file that you include in your application’s bundle.

## Discussion

Create a configuration file in Xcode by selecting File > New > File and choosing StoreKit Configuration File. By default, the filename is `Configuration.storekit`. You can include multiple configuration files in your project, but only one can be active at a time. StoreKit configuration files always have a .`storekit` file extension.

To return all settings in the test session to the states defined in this configuration file, call [`resetToDefaultState()`](/documentation/StoreKitTest/SKTestSession/resetToDefaultState()).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)