<!--
{
  "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/enter()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "c:@F@dispatch_group_enter"
  },
  "title" : "enter()"
}
-->

# enter()

Explicitly indicates that a block has entered the group.

```
func enter()
```

## Discussion

Calling this function in Objective-C increments the current count of outstanding tasks in the group. Using this function (with [`leave()`](/documentation/Dispatch/DispatchGroup/leave())) allows your application to properly manage the task reference count if it explicitly adds and removes tasks from the group by a means other than using the [`dispatch_group_async`](/documentation/Dispatch/dispatch_group_async) function. A call to this function must be balanced with a call to [`leave()`](/documentation/Dispatch/DispatchGroup/leave()). You can use this function to associate a block with more than one group at the same time.

---

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)