<!--
{
  "availability" : [
    "iOS: 7.0.0 - 13.0.0",
    "iPadOS: 7.0.0 - 13.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.9.0 - 10.15.0",
    "tvOS: 9.0.0 - 13.0.0",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "GameController",
  "identifier" : "/documentation/GameController/GCGamepadSnapshot/init(controller:snapshotData:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Game Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)GCGamepadSnapshot(im)initWithController:snapshotData:"
  },
  "title" : "init(controller:snapshotData:)"
}
-->

# init(controller:snapshotData:)

Initializes a snapshot object associated with a specific controller using a flattened data representation obtained from another snapshot.

```
init(controller: GCController, snapshotData data: Data)
```

## Parameters

`controller`

The controller to associate the snapshot with.

`data`

A data object that contains snapshot data.

## Return Value

A new snapshot object.

## Discussion

The data format for a snapshot is private. Your snapshot object should only be created from flattened data previously obtained from a snapshot.

---

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)