//go:build darwin // Link the framework Wails' darwin frontend forgets. // // It references UTType (UniformTypeIdentifiers) without linking it, so a macOS // build fails at the LINK step with `Undefined symbols: _OBJC_CLASS_$_UTType` // - after compiling everything successfully, which makes it read like a broken // toolchain rather than one missing flag. That is why there was no Mac build: // not a design limit, a link error nobody had chased. // // Declared in the source rather than passed as CGO_LDFLAGS on the command // line, for the same reason deploy.sh now finds Go itself: a build that needs // the operator to know an incantation is a build that does not happen. Plain // `go build` and `wails build` both work on a Mac with this file present, and // the build tag makes it inert everywhere else. // // Note for anyone editing: the comment directly above `import "C"` is cgo's C // PREAMBLE, not documentation. This paragraph sits above `package main` on // purpose - put it there and the prose is compiled as C, which is how the // first attempt failed. package main // #cgo LDFLAGS: -framework UniformTypeIdentifiers import "C"