PackageTrack
Sign in Get early access

objective_c

A library to access Objective C from Flutter that acts as a support library for package:ffigen.

9.6.0 5.4M downloads/mo #145 most downloaded on pub.dev dart-lang/native

What this package is like to depend on

Last release 4 days ago

20 Aug 2026

Ships fairly regularly

a new release about every 5 weeks

Nearly every release is documented

notes for 24 of 25 stable releases

2 versions withdrawn

withdrawn after publishing

2 years old

28 releases · first in 2024

15 releases in the last 12 months

see the full history below

Release timeline

28 releases · May 2024 to Aug 2026
2025 2026
Release Pre-release Withdrawn

Releases

latest 28
  1. 9.6.0 20 Aug 2026
    Release notes
    • Add a bunch more categories to the bindings.
    • Bump package:code_assets dependency to ^2.0.0.
    Open source →
    Release notes
    • Add a bunch more categories to the bindings.
    • Bump package:code_assets dependency to ^2.0.0.
    Open source →
  2. 9.5.0 27 Jul 2026
    Release notes
    • Add internal utils required to support FFIgen's new port based blocks.
    • 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 these internal structs (and doing so would be a mistake).
    Open source →
  3. 9.4.1 22 May 2026
    Release notes
    • Fix a bug related to a misconfigured build hook.
    Open source →
  4. 9.4.0 20 May 2026 withdrawn
    Release notes
    • Fix a bug where a Dart GC safepoint during a non-leaf FFI call could prematurely release an ObjC block before ObjC retained it, causing an EXC_BAD_ACCESS crash.
    • Fix (https://github.com/dart-lang/native/issues/2877) such that all occurances of ObjCObject isA now accepts a nullable ObjCObject? and returns false when input isnull
    • Removed NSOrderedCollectionChange.init(). This is not a breaking change because this method never would have worked, as it doesn't exist in Objective-C.
    • Fix a bug where missing debug symbols caused app store valiadtion warnings.
    • Removed some test-only utilities from the release dylib (fixes #2999).
    • Added bool.toNSNumber() extension method, NSNumber.isBool check and converter support for bool.
    • Remove dependency on native_toolchain_c.
    • Add an optional 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.
    Open source →
  5. 9.3.0 06 Feb 2026
    Release notes
    • autoReleasePool now returns the value produced by its callback.
    Open source →
  6. 9.2.5 29 Jan 2026
    Release notes
    • Fix a bug by adding minimum OS version flags to the build script.
    Open source →
  7. 9.2.4 23 Jan 2026
    Release notes
    • Fix a bug build hook path issue that could pass percent-encoded cache paths to clang, leading to missing source file errors.
    Open source →
  8. 9.2.3 20 Jan 2026
    Release notes
    • Fix a bug where the objective_c framework was rejected by the Apple app store due to code signing issues.
    Open source →
  9. 9.2.2 17 Dec 2025
    Release notes
    • Fix a bug where the build failed on older versions of XCode.
    Open source →
  10. 9.2.1 25 Nov 2025
    Release notes
    • Fix bug where the build hook was trying to access the code config if it was not provided.
    • Bump minimum Dart version to 3.10.0.
    Open source →
  11. 9.2.0 25 Nov 2025 withdrawn
    Release notes
    • Migrate to from a Flutter plugin to native assets. This enables package:objective_c to be used in command line apps.
    Open source →
  12. 9.1.0 19 Nov 2025
    Release notes
    • Use FFIgen 20.1.0
    Open source →
  13. 9.0.0 07 Nov 2025
    Release notes
    • Use FFIgen 20.0.0
    • Breaking change: The collection classes, 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.
    • Breaking change: Rename the internal C types ObjCObject and ObjCProtocol to ObjCObjectImpl and ObjCProtocolImpl respectively.
    • Breaking change: Rename the internal Dart types ObjCObjectBase and ObjCProtocolBase to ObjObject and ObjCProtocol respectively.
    • Fix missing NSNumber category includes in iOS and macOS objective_c.m files.
    • Add NSBundle and NSNull to the bindings.
    • Add autoReleasePool function.
    • Fix a bug where NSMutableDictionary.of returned a NSDictionary.
    • Add NSErrorException class.
    Open source →
  14. 9.0.0+1 07 Nov 2025

    Nothing published for this version

  15. 9.0.0-dev.0 02 Sep 2025 pre-release

    Nothing published for this version

  16. 8.1.0 22 Jul 2025
    Release notes
    • Bump minimum Dart version to 3.8.0.
    • Support the KVO pattern by adding Observer, Observation, and NSObject.addObserver.
    • Remove a reference cycle between Dart and the NSInputStream returned by toNSInputStream.
    Open source →
  17. 8.0.0 19 May 2025
    Release notes
    • Use FFIgen 19.0.0
    • 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.
    • Add .toNSNumber() extension method to int, double, and num.
    • Add DateTime.toNSDate() and NSDate.toDateTime() extension methods.
    • Add CFStringRef.toDartString() and CFStringRef.toNSString().
    • Add toObjCObject and toDartObject that automatically convert between supported Objective C and Dart types.
    • Added various interfaces, protocols, categories etc to the built ins, such as NSPort and NSTimer.
    Open source →
  18. 7.1.0 08 Apr 2025
    Release notes
    • Use FFIgen 18.1.0
    Open source →
  19. 7.0.0 11 Mar 2025
    Release notes
    • Use FFIgen 18.0.0
    • ObjCProtocolBuilder supports implementing protocol methods directly using a block.
    • Change how ObjCProtocolBuilder is implemented to fix a bug, by removing all uses of NSProxy. This causes a couple of very minor breaking changes:
      • Breaking change: It's no longer possible to add more methods to an ObjCProtocolBuilder after build() has been invoked.
      • Breaking change: Remove NSProxy from the bindings. Rename DOBJCDartProxyBuilder to DOBJCDartProtocolBuilder and DOBJCDartProxy to DOBJCDartProtocol and change their APIs. Users should not be using these classes.
    • Breaking change: Some API names have changed due to FFIgen's new duplicate identifier renaming logic. $ is now used as a delimiter, to match JNIgen's renaming logic.
    • Added a checkOsVersion function.
    Open source →
  20. 6.0.0 17 Feb 2025
    Release notes
    • Use FFIgen 17.0.0
    Open source →
  21. 5.0.0 12 Feb 2025
    Release notes
    • Breaking change: Rename the NSString to String conversion method from toString() to toDartString().
    • Add ObjCProtocolBase, which all code genned protocols implement.
    • Add various ObjC categories (extension methods) to the built in classes.
    • Add various ObjC protocols to the bindings.
    • Make all visible API types public.
    • Add a osVersion getter, which returns the current MacOS/iOS version.
    • Fixed a bug where Dart API symbols could be null despite Dart_InitializeApiDL returning successfully.
    Open source →
  22. 4.1.0 15 Jan 2025
    Release notes
    • Use FFIgen 16.1.0
    • Reduces the chances of duplicate symbols by adding a DOBJC_ prefix.
    • Ensure that required symbols are available to FFI even when the final binary is linked with -dead_strip.
    • Add support for blocking ObjC protocol methods.
    Open source →
  23. 4.0.0 15 Nov 2024
    Release notes
    • Use FFIgen 16.0.0
    • Add NSOrderedCollectionDifference to the package.
    • Breaking change: As part of FFIgen 16.0.0, the way ObjC categories are generated has changed. Instead of inserting their methods into the interface, categories now generate Dart extension methods. For ordinary methods this makes no difference, but static methods now need to be invoked on the extension instead of on the class. MyInterface.staticMethod must change to MyCategory.staticMethod
    • Breaking change`: Another effect of the category overhaul is that we don't automatically included all categories any more. This reduces the ammount of bindings generated by omitting methods from obscure categories that most users don't need. If you notice that a method you were using is now missing, there are two options:
      1. Look up which category it came from in the Apple documentation, and generate bindings for that category yourself in your own package.
      2. If the category is common/important enough that it should be included in package:objective_c, file a bug and we'll consider adding it back in.
    • Fixed a bug where missing methods could cause runtime errors, even if they weren't being implemented.
    • Throw more useful errors in all internal failure cases.
    • Added ObjCProtocolMethod.isAvailable getter, to make it easier to implement fallback logic if a method is missing at runtime.
    Open source →
  24. 3.0.0 21 Oct 2024
    Release notes
    • Add the following stream-related types to the core package:
      • NSInputStream
      • NSOutputStream
      • NSRunLoop
      • NSStream
      • NSStreamDelegate
      • NSStreamEvent
      • NSStreamStatus
    • Add UnimplementedOptionalMethodException, which is thrown by the ObjC bindings if an optional method is invoked, and the instance doesn't implement the method.
    • Dispatch all object/block releases to the main thread.
    • Add utils for converting Dart Strings to Objective-C selectors and back.
    • Require Dart 3.4 or later (due to the use of dart:ffi Struct.create by package:ffigen).
    • Breaking change: Return structs from ObjC methods by value instead of taking a struct return pointer.
    Open source →
  25. 2.0.0 06 Sep 2024
    Release notes
    • Validate bundled dynamic libraries by reading their header: when the file is
      a recognized ELF, Mach-O, or PE binary, check that it was built for the
      target architecture. Reject multi-architecture Mach-O output because hooks
      run once per target architecture. A file the built-in validators do not
      recognize, or a recognized library built for an architecture they do not
      know, warns on the supplied logger instead of failing.
    • Bump the dependency on package:hooks to ^2.2.0.
    • Breaking change: Overrode == 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.
      • Migration: Use 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.
    • Support custom target OS, architecture, and santizer in protocol extension.
    Open source →
    Release notes
    • Drop API methods that are deprecated in the oldest versions of iOS and macOS that flutter supports.
    • Added ObjCBlock, which is the new user-facing representation of ObjC blocks.
    • Migrate to ARC (Automatic Reference Counting).
    • Enable ObjC objects and blocks to be sent between isolates.
    • Add autorelease and retainAndAutorelease methods to ObjC objects and blocks.
    • Breaking change: Remove some convenience methods from _ObjCRefHolder: isReleased, release, pointer, and retainAndReturnPointer. Uses of these methods now need to go through .ref. Eg obj.pointer becomes obj.ref.pointer.
    Open source →
  26. 1.1.0 18 Jul 2024
    Release notes
    • Added Recordings.+ to combine two recordings.
    Open source →
    Release notes
    • Add DartProxy, which is an implementation of NSProxy that enables implementing ObjC protocols from Dart. Also adds DartProxyBuilder for constructing DartProxy.
    • Add some extensions methods for NSMutableData.
    • Fix the NSError bindings so that they're not empty.
    • Add ObjCProtocolBuilder, which is an ergonomic wrapper around DartProxyBuilder.
    • Add ObjCProtocolMethod, which contains all the information that ObjCProtocolBuilder needs to implement a method. These objects are created by the FFIgen bindings for a protocol.
    • Make all of the code-genned structs and enums public so they can be reused by user bindings.
    • Use package:dart_flutter_team_lints.
    Open source →
  27. 1.0.1 15 May 2024
    Release notes
    • Mention experimental status in readme.
    Open source →
  28. 1.0.0 09 May 2024
    Release notes
    • Move sharable code from FFIgen's generated code into this package, including ObjCObjectBase, and ObjCBlockBase, as well as the core Objective C runtime functions (except objc_msgSend, which is library specific).
    • Move core ObjC classes such as NSString into this package.
    • Delete Dart functions associated with ObjC closure blocks when the block is destroyed. Fixes https://github.com/dart-lang/native/issues/204
    • Improve debuggability of memory management errors.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive