<!--
{
  "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/UIViewRepresentable/makeCoordinator()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19UIViewRepresentableP15makeCoordinator0F0QzyF"
  },
  "title" : "makeCoordinator()"
}
-->

# makeCoordinator()

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

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

## Discussion

Implement this method if changes to your view 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 doesn’t
interact with other parts of your app, providing a coordinator is
unnecessary.

SwiftUI calls this method before calling the
[`makeUIView(context:)`](/documentation/SwiftUI/UIViewRepresentable/makeUIView(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)