MacDriver is now DarwinKit!
After a year in preview, v0.5.0
is finally released as DarwinKit. As mentioned in the preview release, this is not only a rename but a major rewrite and expansion on the bindings. We've also started a collection of high-quality examples and starter projects that you can access if you sponsor this project using GitHub Sponsors.
With every release we'll add to this sponsors collection. As a sponsor you not only get priority support but you can suggest additions for us to make to the collection. These aren't just simple code examples, they're actually useful utilities. Many are modeled after our favorite Mac utilities. We hope these are useful, educational, and might convince you to support this open source project as a sponsor.
Getting back to this release, there have been some changes since v0.5.0-preview
so here is an updated overview of what's in this release:
- Bindings for 33 frameworks and more are on the way
- Over 2,300 classes with near complete coverage.
v0.4.0
we had partial coverage of about 80. - 23,800 methods/properties and nearly 10,000 constants/enums. We had less than 50 constants before.
- New since the preview release we have 543 structs generated.
- Automatic conversion and use of native Go builtin types in APIs like strings, bools, []byte, maps, etc.
- Support for block arguments as Go functions with properly typed arguments (callbacks!)
- Pre-made delegate implementations you can simply set Go functions on
- More 1-to-1 mapping to Objective-C symbol names while also improving Go idiomaticness
- Documentation for all symbols including a link to official Apple docs on that symbol
- Simple model for working with Objective-C memory management
- As the new name implies, we are set up to support more platforms like iOS, tvOS, watchOS, maybe visionOS
- Continued support for both Intel and Apple Silicon
- Bindings are nearly all generated
There is one regression since v0.5.0-preview
for more recent versions of Go with a linker warning. Unfortunately this is upstream in cgo, but we expect it to be resolved in Go with an upcoming.
Regardless, we're happy to finally be cutting this release. Future releases will not involve such a lengthy preview period. And we're excited about what's to come since we've also verified we can start using purego instead of cgo to improve build speed. We'll be using it in the focus of our next release: function bindings.
Contribution Highlights
- Add helper package to ease use of Cocoa API with Go by @programmingkidx in #163
- generate: add docs on generation tools and process, and add initmod tool by @progrium in #182
- fix to webkit callback needing string or nil value by @progrium in #189
- Variadic support by @progrium in #190
- macos: add foundation test for array by @progrium in #191
- New variant functions instead of pseudo class methods for init methods by @progrium in #192
- github: build helloworld as part of tests by @progrium in #195
- More frameworks by @progrium in #197
- macos helper updates by @progrium in #198
- macos: add screenlock example by @progrium in #202
- Subclass NSSplitView for subclass macos example by @catilac in #205
- Higher level subclassing API by @progrium in #207
- Adding lat long fields to corelocation.LocationCoordinate2D by @catilac in #208
- generate: add findstruct tool by @progrium in #209
- New symbols, plus fixes by @progrium in #213
- Example of TableView by @corruptmemory in #217
- Fix issues with map type by @programmingkidx in #242
- Fix: FormView setting row spacing infinite loop & layout pin anchor remove cast appkit.LayoutAnchor by @Charliego3 in #229
- Add pointer to pointer support by @programmingkidx in #244
- Fix enumexport and interface param name by @alessiodionisi in #250
New Contributors
- @programmingkidx made their first contribution in #128
- @catilac made their first contribution in #205
- @corruptmemory made their first contribution in #217
- @Charliego3 made their first contribution in #229
- @alessiodionisi made their first contribution in #250
Full Changelog: v0.4.0...v0.5.0