diff --git a/pkgs/objective_c/CHANGELOG.md b/pkgs/objective_c/CHANGELOG.md index 05c5a1f26..a2ce45d18 100644 --- a/pkgs/objective_c/CHANGELOG.md +++ b/pkgs/objective_c/CHANGELOG.md @@ -1,3 +1,8 @@ +## 9.2.0+1 + +- Fix [bug](https://github.com/dart-lang/native/issues/2824) where the build + hook was trying to access the code config if it was not provided. + ## 9.2.0 - Migrate to from a Flutter plugin to native assets. This enables diff --git a/pkgs/objective_c/hook/build.dart b/pkgs/objective_c/hook/build.dart index 4b02a906f..88470b7ce 100644 --- a/pkgs/objective_c/hook/build.dart +++ b/pkgs/objective_c/hook/build.dart @@ -27,6 +27,11 @@ final logger = Logger('') void main(List args) async { await build(args, (input, output) async { + if (!input.config.buildCodeAssets) { + // Don't build any other asset types. + return; + } + const supportedOSs = {OS.iOS, OS.macOS}; final os = input.config.code.targetOS; if (!supportedOSs.contains(os)) { diff --git a/pkgs/objective_c/pubspec.yaml b/pkgs/objective_c/pubspec.yaml index 4d6ea573b..e3e0bb949 100644 --- a/pkgs/objective_c/pubspec.yaml +++ b/pkgs/objective_c/pubspec.yaml @@ -4,7 +4,7 @@ name: objective_c description: 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.' -version: 9.2.0 +version: 9.2.0+1 repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aobjective_c