---
title: "open(forContainerIdentifier:)"
framework: GameSave
role: symbol
role_heading: Type Method
platforms: [iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, visionOS 26.0+]
path: "gamesave/gssynceddirectory/open(forcontaineridentifier:)"
---

# open(forContainerIdentifier:)

Requests an instance of the game-save directory.

## Declaration

```swift
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

Discussion This method returns immediately, and starts syncing the directory in the background. To wait for syncing to complete, call the finishSyncing(completionHandler:) method.

## See Also

### Accessing a directory

- [directoryState](gamesave/gssynceddirectory/directorystate.md)
- [GSSyncedDirectoryState](gamesave/gssynceddirectorystate.md)
