<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameSave",
  "identifier" : "/documentation/GameSave/GameSaveSyncedDirectory/openDirectory(containerIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "GameSave"
    ],
    "preciseIdentifier" : "s:8GameSave0aB15SyncedDirectoryC04openD019containerIdentifierACSSSg_tFZ"
  },
  "title" : "openDirectory(containerIdentifier:)"
}
-->

# openDirectory(containerIdentifier:)

Requests an instance of the game-save directory.

```
class func openDirectory(containerIdentifier: String? = nil) -> GameSaveSyncedDirectory
```

## Parameters

`containerIdentifier`

The identifier of the directory to request.
If you pass `nil`, this method uses the first container identifier
listed in the `com.apple.developer.icloud-container-identifiers` entitlements array.

## Discussion

This method returns immediately, and starts syncing the directory in the background.
To wait for syncing to complete, call the [`finishSyncing()`](/documentation/GameSave/GameSaveSyncedDirectory/finishSyncing()) method.

---

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)