<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macOS: 11.3.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderDomain/testingModes-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFileProviderDomain(py)testingModes"
  },
  "title" : "testingModes"
}
-->

# testingModes

A mode that gives the File Provider extension more control over the system’s behavior during testing.

```
var testingModes: NSFileProviderDomain.TestingModes { get set }
```

## Discussion

By default, the value is `[]` (Swift) or `0` (Objective-C) and all testing modes are disabled. To enable a testing mode, assign its value to this property. You can combine multiple modes:

```swift
myDomain.testingModes = [.alwaysEnabled, .interactive]
```

> Important:
> You must add the <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.fileprovider.testing-mode> entitlement to your target before assigning a non-empty value to this property. You can only use this entitlement during testing and development. If you add it to your app or extension, you must remove it before you submit your app to TestFlight or the Mac App Store.

The system registers the domain’s testing mode when you add the domain by calling [`add(_:completionHandler:)`](/documentation/FileProvider/NSFileProviderManager/add(_:completionHandler:)). You can’t change the test mode after you add the domain.

---

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)