Skip to content

Commit ae935e2

Browse files
authored
[objective_c] Fix build hook (#2825)
1 parent 93039d7 commit ae935e2

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

pkgs/objective_c/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 9.2.0+1
2+
3+
- Fix [bug](https://github.com/dart-lang/native/issues/2824) where the build
4+
hook was trying to access the code config if it was not provided.
5+
16
## 9.2.0
27

38
- Migrate to from a Flutter plugin to native assets. This enables

pkgs/objective_c/hook/build.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ final logger = Logger('')
2727

2828
void main(List<String> args) async {
2929
await build(args, (input, output) async {
30+
if (!input.config.buildCodeAssets) {
31+
// Don't build any other asset types.
32+
return;
33+
}
34+
3035
const supportedOSs = {OS.iOS, OS.macOS};
3136
final os = input.config.code.targetOS;
3237
if (!supportedOSs.contains(os)) {

pkgs/objective_c/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: objective_c
66
description: 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.'
7-
version: 9.2.0
7+
version: 9.2.0+1
88
repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c
99
issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aobjective_c
1010

0 commit comments

Comments
 (0)