<!--
{
  "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/GSSyncedDirectory/open(forContainerIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "GameSave"
    ],
    "preciseIdentifier" : "c:objc(cs)GSSyncedDirectory(cm)openDirectoryForContainerIdentifier:"
  },
  "title" : "open(forContainerIdentifier:)"
}
-->

# open(forContainerIdentifier:)

Requests an instance of the game-save directory.

```
class func open(forContainerIdentifier containerIdentifier: String?) -> GSSyncedDirectory
```

## 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(completionHandler:)`](/documentation/GameSave/GSSyncedDirectory/finishSyncing(completionHandler:)) 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)