Releases: progrium/macdriver
v0.5.0-preview
MacDriver is becoming DarwinKit!
I think this might now be the best bindings project in existence for Apple APIs. Possibly even the best way to make small utilities on the Mac. And soon even other Apple devices.
This is a preview release for v0.5.0
which is a major rewrite and expansion on these bindings. This release is incompatible with previous releases, however there is an unmaintained legacy branch and all the previous releases for existing code to use. The API in this release is very close to what a 1.0 release would look like, so there shouldn't be significant changes only additions to what's here now, which includes:
- Over 30 frameworks with nearly complete bindings and more are on the way
- Over 2,000 classes with near complete coverage. Previously we had partial coverage of about 80.
- 22,000 methods/properties and nearly 10,000 constants/enums. We had less than 50 constants before.
- 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
- No more compile warnings, nearly all previous GitHub issues are resolved
- More examples, better docs, and bindings are nearly all generated
However, in this preview release we have a few things left out that with your help we can get into the final v0.5.0
release:
- We are missing generated bindings for framework functions
- We are currently covering APIs up to macOS 12 (which is most tbh), but we can easily cover up to 14 with help
- Our coverage of structs is incomplete, many are empty placeholders
- Several examples are currently broken
Another way you can help is to let me know what kind of examples you want to see. Drop your requests in Discussions.
This preview release is an official reboot of the project with a new name: DarwinKit. Between now and the final release, the repository will remain macdriver
while everything else updates to DarwinKit, and when we release v0.5.0
we'll rename the repository as well.
A huge thanks to @mkrautz for his work 10 years ago that I found and started this project on in 2020. Unfortunately most of his code is now gone, replaced by the more recent great work by @hsiafan. The previous code generation was by @mgood, which has also been majorly upgraded. Also thanks to @tmc and @programmingkidx for engaging more recently and motivating me to do this rewrite. But also thanks to all the previous contributors that helped get to this point.
v0.4.0
Adds additional API coverage.
This release is in preparation for the next release which will be more go-idiomatic in terms of naming, but will break existing APIs with slight method name changes.
API Additions
cocoa.NSWorkspace
added (@tmc)cocoa.NSRunningApplication
added (@tmc)cocoa.NSUserDefaults
added (@tmc)cocoa.NSTextField
added (@tmc)
Docs & Examples
- Crash Course in Macdriver added (@programmingkidx)
- added userdefaults example (@tmc)
- added workspaceutils example (@tmc)
Full Changelog: v0.3.0...v0.4.0
v0.3.0
This release has a few minor additions to bindings and APIs, but is mostly about arm64 support.
Platform Additions
API Additions
Docs & Examples
Bug Fixes
New Contributors
- @mkrautz made their first contribution in #100
- @Bob620 made their first contribution in #92
- @yummyweb made their first contribution in #82
Full Changelog: v0.2.0...v0.3.0
v0.2.0
API Additions
This release introduces generated bindings to greatly expand the methods defined on the current types, as well as adding a number of new types.
See: #56
core.NSAttributedString
added (@mvrilo)objc.Autorelease
added to wrap functions with an autoreleasepool (@mgood)core.NSNib
gotNSNib_InitWithNibNamed_Bundle
,NSNib_InitWithNibData_Bundle
,InstantiateWithOwner_TopLevelObjects
(@firelizzard18)cocoa.NSControl
added (@fserb)cocoa.NSPopover
added (@fserb)
API Removals
core.NSAutoreleasePool
replaced byobjc.Autorelease
- remove code for 386 architecture (@firelizzard18)
Docs & Examples
- comments on discovering enum values moved to wiki (@flexzuu)
- fix a few typos and rewording (@bradfitz)
- fix top frame example (@revilon1991)
- OpenGL example (@firelizzard18)
Optimizations
- optimize
sendMsg
and selector lookups (@firelizzard18) - fix memory leaks with
C.CString
(@mgood)
New Contributors
- @mvrilo made their first contribution in #43
- @bradfitz made their first contribution in #45
- @firelizzard18 made their first contribution in #60
- @revilon1991 made their first contribution in #65
- @mgood made their first contribution in #56
- @fserb made their first contribution in #74
Full Changelog: v0.1.0...v0.2.0
v0.1.0
API Additions
core.NSData
got Length, Bytes (@flexzuu)core.NSArray
got NSArray_WithObjects, Count, ObjectAtIndex, Strings (@flexzuu)cocoa.NSPasteboard
added with SetStringForType, StringForType, DataForType, Types, AvailableTypeFromArray (@flexzuu)cocoa.NSWindow
got SetHasShadow, HasShadow, OrderOut, OrderFront, OrderBackcocoa.NSTextView
got SetTextColor (@tmc)cocoa.NSScreen
got NSScreen_Screens (@tmc)
API Removals
- Removed exported class reference variables (NSApplication_, NSMenu_, NSWindow_, etc)
Package Removals
- Removed
misc/bundle
package - Removed
bridge
package andbridgehost
example (moved to new repo)