<!--
{
  "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/resetToDefaultState()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "StoreKit Test"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTestSession(im)resetToDefaultState"
  },
  "title" : "resetToDefaultState()"
}
-->

# resetToDefaultState()

Removes all property overrides and resets all test session settings to their default state.

```
func resetToDefaultState()
```

## Discussion

During testing, your tests may override the property settings such as the [`timeRate`](/documentation/StoreKitTest/SKTestSession/timeRate-swift.property), [`askToBuyEnabled`](/documentation/StoreKitTest/SKTestSession/askToBuyEnabled), [`interruptedPurchasesEnabled`](/documentation/StoreKitTest/SKTestSession/interruptedPurchasesEnabled), and [`billingGracePeriodIsEnabled`](/documentation/StoreKitTest/SKTestSession/billingGracePeriodIsEnabled). Call this method to revert all the property settings to the states defined in the StoreKit configuration file that you use to initialize this [`SKTestSession`](/documentation/StoreKitTest/SKTestSession) instance.

See [`clearTransactions()`](/documentation/StoreKitTest/SKTestSession/clearTransactions()) to remove all transactions from the testing environment.

---

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)