<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/UIViewControllerRepresentable/makeCoordinator()-9vwm8",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI29UIViewControllerRepresentablePAAyt11CoordinatorRtzrlE04makeF0yyF"
  },
  "title" : "makeCoordinator()"
}
-->

# makeCoordinator()

Creates the custom instance that you use to communicate changes from
your view controller to other parts of your SwiftUI interface.

```
@MainActor @preconcurrency func makeCoordinator() -> Self.Coordinator
```

## Discussion

Implement this method if changes to your view controller might affect
other parts of your app. In your implementation, create a custom Swift
instance that can communicate with other parts of your interface. For
example, you might provide an instance that binds its variables to
SwiftUI properties, causing the two to remain synchronized. If your view
controller doesn’t interact with other parts of your app, providing a
coordinator is unnecessary.

SwiftUI calls this method before calling the
`UIViewControllerRepresentable/makeUIViewController(context:)` method.
The system provides your coordinator either directly or as part of a
context structure when calling the other methods of your representable
instance.

---

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)