# confirmAllAssignments

Confirms all experiment assignments and returns them in an array.

> **Note**

The assignments may be different when a placement is registered due to changes in user, placement, or device parameters used in audience filters.



Purpose [#purpose]

Confirms all experiment assignments for the current user and returns them. This is useful for debugging experiment assignments or tracking which experiments a user is enrolled in.

Signature [#signature]

```swift
public func confirmAllAssignments() async -> [Assignment]

public func confirmAllAssignments(completion: (([Assignment]) -> Void)? = nil)
```

Parameters [#parameters]

The completion handler version takes an optional completion closure that receives an array of `Assignment` objects.

Returns / State [#returns--state]

Returns an array of `Assignment` objects representing all confirmed experiment assignments. If config hasn't been retrieved yet, this will return an empty array.

Usage [#usage]

Using async/await:

```swift
let assignments = await Superwall.shared.confirmAllAssignments()

print("User has \(assignments.count) experiment assignments")

for assignment in assignments {
  print("Experiment: \(assignment.experimentId), Variant: \(assignment.variant)")
}
```

Using completion handler:

```swift
Superwall.shared.confirmAllAssignments { assignments in
  print("Confirmed \(assignments.count) assignments")
  
  // Process assignments
  for assignment in assignments {
    // Handle assignment
  }
}
```

Related [#related]

* This method tracks a `confirmAllAssignments` event that can be received via [`SuperwallDelegate.handleSuperwallEvent(withInfo:)`](/docs/ios/sdk-reference/SuperwallDelegate)