<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/SecKeyImportExportFlags/importOnlyOne",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@E@SecKeyImportExportFlags@kSecKeyImportOnlyOne"
  },
  "title" : "importOnlyOne"
}
-->

# importOnlyOne

A flag that you set to prevent importing more than one private key.

```
static var importOnlyOne: SecKeyImportExportFlags { get }
```

## Discussion

Prevents the importing of more than one private key by the [`SecKeychainItemImport`](/documentation/Security/SecKeychainItemImport) function. If the `importKeychain` parameter is `NULL`, this bit is ignored. Otherwise, if this bit is set and there is more than one key in the incoming external representation, no items are imported to the specified keychain and the error `errSecMultipleKeys` is returned.

---

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)