<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchGroup/init()",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:@F@dispatch_group_create"
  },
  "title" : "init()"
}
-->

# init()

Creates a new group to which you can assign block objects.

```
init()
```

## Return Value

The newly created group. In Objective-C returns `NULL` on failure.

## Discussion

This function creates a new group with which block objects can be associated (by using the [`dispatch_group_async`](/documentation/Dispatch/dispatch_group_async) function). The dispatch group maintains a count of its outstanding associated tasks, incrementing the count when a new task is associated and decrementing it when a task completes. Functions such as [`dispatch_group_notify`](/documentation/Dispatch/dispatch_group_notify) and [`dispatch_group_wait`](/documentation/Dispatch/dispatch_group_wait) use that count to allow your application to determine when all tasks associated with the group have completed. At that time, your application can take any appropriate action.

---

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)