This example shows how to integrate Dear ImGui with Metal. It is based on the “cross-platform” game template provided with Xcode as of Xcode 9.
Consider basing your work off the example_glfw_metal/ or example_sdl2_metal/ examples. They are better supported and will be portable unlike this one.