NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #137 most downloaded on pub.dev
A library to access Objective C from Flutter that acts as a support library for package:ffigen.
Last release 7 days ago
01 Oct 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 25 of 26 stable releases
3 versions withdrawn
withdrawn after publishing
2 years old
30 releases · first in 2024
Fix potential memory leaks when converting a Dart String to a NSString (via toNSString or the NSString constructor) because the created NSString was a
String to a NSStringtoNSString or the NSString constructor) because the createdNSString was added to the autorelease pool.NSArray.filledNSArray.ofNSMutableArray.filledNSMutableArray.ofNSDictionary.ofNSDictionary.fromEntriesNSMutableDictionary.ofNSMutableDictionary.fromEntriesNSSet.ofNSMutableSet.ofint, double, num orbool to a NSNumber (via toNSNumber) because the created NSNumber wasNSDate.dateWithTimeIntervalSince1970 withNSDate.alloc().initWithTimeIntervalSince1970. NSDate uses pointerDateTimeNSInputStream returned by toNSInputStream: readingNSInternalInconsistencyException ("DartInputStreamAdapter:NSURLSession doesclose is now idempotent, andtoNSData/toNSMutableData added the returned NSDatatoNSInputStream would create cycles between Dart andOne column per month.
Fix a crash in the NSInputStream returned by toNSInputStream : reading from or closing the stream after its Dart side had already closed it raised NSI
NSInputStream returned by toNSInputStream: readingNSInternalInconsistencyException ("DartInputStreamAdapter:NSURLSession doesclose is now idempotent, andtoNSData/toNSMutableData added the returned NSDatatoNSInputStream would create cycles between Dart andString to a NSString
(via toNSString or the NSString constructor) because the created
NSString was added to the autorelease pool.NSArray.filledNSArray.ofNSMutableArray.filledNSMutableArray.ofNSDictionary.ofNSDictionary.fromEntriesNSMutableDictionary.ofNSMutableDictionary.fromEntriesNSSet.ofNSMutableSet.ofint, double, num or
bool to a NSNumber (via toNSNumber) because the created NSNumber was
added to the autorelease pool.NSDate.dateWithTimeIntervalSince1970 with
NSDate.alloc().initWithTimeIntervalSince1970. NSDate uses pointer
tagging rather than reference counting for the entire range of DateTime
so this change is for consistency (and not rely on an implementation
detail), not correctness.NSInputStream returned by toNSInputStream: reading
from or closing the stream after its Dart side had already closed it raised
NSInternalInconsistencyException ("DartInputStreamAdapter:
Dart_PostCObject_DL failed") and aborted the process. NSURLSession does
exactly that with a request body stream when the request completes with an
error or is cancelled right after it starts. close is now idempotent, and
a read on a closed stream (or one whose Dart owner is gone) fails with -1
instead of asserting.toNSData/toNSMutableData added the returned NSData
to the autorelease pool.toNSInputStream would create cycles between Dart and
Objective-C.Add a bunch more categories to the bindings.
package:code_assets dependency to ^2.0.0.Make an internal-only FFI struct, DOBJC_Context, opaque. This is technically a breaking change, but it's extremely unlikely that any users are using t…
DOBJC_Context, opaque. This is
technically a breaking change, but it's extremely unlikely that any users are
using these internal structs (and doing so would be a mistake).Fix a bug related to a misconfigured build hook.
Removed NSOrderedCollectionChange.init(). This is not a breaking change because this method never would have worked, as it doesn't exist in Objective-…
isA now accepts a nullable ObjCObject? and
returns false when input isnullNSOrderedCollectionChange.init(). This is not a breaking change
because this method never would have worked, as it doesn't exist in
Objective-C.bool.toNSNumber() extension method, NSNumber.isBool check and
converter support for bool.loader param to getClass and getProtocol, which will be
called to load the class/protocol. If the loader fails, it falls back to the
ObjC runtime functions, objc_getClass and objc_getProtocol.autoReleasePool now returns the value produced by its callback.
autoReleasePool now returns the value produced by its callback.Fix a bug by adding minimum OS version flags to the build script.
Fix a bug build hook path issue that could pass percent-encoded cache paths to clang, leading to missing source file errors.
Fix a bug where the objective_c framework was rejected by the Apple app store due to code signing issues.
Fix a bug where the build failed on older versions of XCode.
Fix bug where the build hook was trying to access the code config if it was not provided.
Migrate to from a Flutter plugin to native assets. This enables package:objective_c to be used in command line apps.
- Use FFIgen 20.1.0
__Breaking change__: The collection classes, NSArray, NSSet, NSDictionary, and their mutable counterparts, no longer directly implement the correspond…
NSArray, NSSet,
NSDictionary, and their mutable counterparts, no longer directly implement
the corresponding Dart collections. Instead they each have a .toDart()
method that wraps the class in an adapter that implements the Dart collection.
Note that this is a shallow conversion. For deep conversions, continue using
toObjCObject and toDartObject.ObjCObject and
ObjCProtocol to ObjCObjectImpl and ObjCProtocolImpl respectively.ObjCObjectBase and
ObjCProtocolBase to ObjObject and ObjCProtocol respectively.NSNumber category includes in iOS and macOS objective_c.m
files.NSBundle and NSNull to the bindings.autoReleasePool function.NSMutableDictionary.of returned a NSDictionary.NSErrorException class.Nothing published for this version
Nothing published for this version
Bump minimum Dart version to 3.8.0.
Observer, Observation, and
NSObject.addObserver.NSInputStream returned by
toNSInputStream.NSArray is now a Dart Iterable and NSMutableArray is now a Dart List.
NSArray is now a Dart Iterable and NSMutableArray is now a Dart List.NSDictionary and NSMutableDictionary are now Dart Maps.NSSet and NSMutableSet are now Dart Sets..toNSNumber() extension method to int, double, and num.DateTime.toNSDate() and NSDate.toDateTime() extension methods.CFStringRef.toDartString() and CFStringRef.toNSString().toObjCObject and toDartObject that automatically convert between
supported Objective C and Dart types.- Use FFIgen 18.1.0
Change how ObjCProtocolBuilder is implemented to fix a bug, by removing all uses of NSProxy. This causes a couple of very minor breaking changes:
ObjCProtocolBuilder supports implementing protocol methods directly using a
block.ObjCProtocolBuilder is implemented to fix
a bug, by removing all uses
of NSProxy. This causes a couple of very minor breaking changes:
ObjCProtocolBuilder after build() has been invoked.NSProxy from the bindings. Rename
DOBJCDartProxyBuilder to DOBJCDartProtocolBuilder and DOBJCDartProxy
to DOBJCDartProtocol and change their APIs. Users should not be using
these classes.$ is now used as a delimiter, to match JNIgen's
renaming logic.checkOsVersion function.- Use FFIgen 17.0.0
__Breaking change__: Rename the NSString to String conversion method from toString() to toDartString().
NSString to String conversion method from
toString() to toDartString().ObjCProtocolBase, which all code genned protocols implement.osVersion getter, which returns the current MacOS/iOS version.Reduces the chances of duplicate symbols by adding a DOBJC_ prefix.
DOBJC_ prefix.-dead_strip.__Breaking change__: As part of FFIgen 16.0.0, the way ObjC categories are generated has changed. Instead of inserting their methods into the interfac…
NSOrderedCollectionDifference to the package.MyInterface.staticMethod must change to
MyCategory.staticMethodObjCProtocolMethod.isAvailable getter, to make it easier to implement
fallback logic if a method is missing at runtime.__Breaking change__: Return structs from ObjC methods by value instead of taking a struct return pointer.
NSInputStreamNSOutputStreamNSRunLoopNSStreamNSStreamDelegateNSStreamEventNSStreamStatusUnimplementedOptionalMethodException, which is thrown by the ObjC
bindings if an optional method is invoked, and the instance doesn't implement
the method.Strings to Objective-C selectors and back.dart:ffi
Struct.create by package:ffigen).Breaking change : Overrode == and hashCode in OS , Architecture , and Sanitizer to support custom targets. These objects can no longer be used as keys…
package:hooks to ^2.2.0.== and hashCode in OS, Architecture, and Sanitizer to support custom targets. These objects can no longer be used as keys of const maps and sets.
final (runtime) maps and sets instead of const, or use the string representations (e.g., OS.name, Architecture.name) as keys if const is required.ObjCBlock, which is the new user-facing representation of ObjC blocks.autorelease and retainAndAutorelease methods to ObjC objects and
blocks._ObjCRefHolder:
isReleased, release, pointer, and retainAndReturnPointer. Uses of
these methods now need to go through .ref. Eg obj.pointer becomes
obj.ref.pointer.Add deep conversion utilities for converting between Dart values and Java.
DartProxy, which is an implementation of NSProxy that enables
implementing ObjC protocols from Dart. Also adds DartProxyBuilder for
constructing DartProxy.NSMutableData.NSError bindings so that they're not empty.ObjCProtocolBuilder, which is an ergonomic wrapper around
DartProxyBuilder.ObjCProtocolMethod, which contains all the information that
ObjCProtocolBuilder needs to implement a method. These objects are created
by the FFIgen bindings for a protocol.package:dart_flutter_team_lints.The YAML configuration format is deprecated and will be removed in a future release.
classes in the config file as a config errorMove sharable code from FFIgen's generated code into this package, including ObjCObjectBase, and ObjCBlockBase, as well as the core Objective C runtim
ObjCObjectBase, and ObjCBlockBase, as well as the core Objective C runtime
functions (except objc_msgSend, which is library specific).NSString into this package.Your coding agent can read these notes before it upgrades. Set up the MCP server →