Skip to content

Commit 744b945

Browse files
committed
Merge branch 'release/0.7.8'
2 parents 0bed066 + 2bd21ca commit 744b945

File tree

10 files changed

+21
-14
lines changed

10 files changed

+21
-14
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-java@v3
1515
with:
16-
java-version: "12.x"
16+
java-version: "11.x"
17+
distribution: microsoft
1718
- uses: subosito/flutter-action@v2
1819
with:
1920
# same with pubspec.yaml

dart_native/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.7.8
2+
3+
* [Fix] Build error on Xcode 12.
4+
* [Fix] The result for interface doesn't match it's type bool.
5+
16
## 0.7.7
27

38
* [Fix] https://github.com/dart-native/dart_native/issues/108

dart_native/example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
PODS:
2-
- ClassWrittenInSwift (0.0.4)
2+
- ClassWrittenInSwift (0.0.5)
33
- CocoaLumberjack/Core (3.7.4)
44
- CocoaLumberjack/Swift (3.7.4):
55
- CocoaLumberjack/Core
66
- dart_native (0.0.1):
7-
- ClassWrittenInSwift (~> 0.0.4)
7+
- ClassWrittenInSwift (~> 0.0.5)
88
- Flutter
99
- Flutter (1.0.0)
1010

@@ -25,9 +25,9 @@ EXTERNAL SOURCES:
2525
:path: Flutter
2626

2727
SPEC CHECKSUMS:
28-
ClassWrittenInSwift: de0543e7c1a836e190af74fddff84ad9b2f3d18c
28+
ClassWrittenInSwift: 84b95c3ec2633b0a18ffdcabf8365a5833a2154c
2929
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
30-
dart_native: 3ed31c9e40530ad0ae006c0b7cf75a22b24e933f
30+
dart_native: a9824de4c77f34e6a27da6d8eb21784efd5512c7
3131
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
3232

3333
PODFILE CHECKSUM: 6e9979e89c4dd9698b3ed55a88e6a5100fa0dc38

dart_native/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ packages:
168168
path: ".."
169169
relative: true
170170
source: path
171-
version: "0.7.7"
171+
version: "0.7.8"
172172
dart_native_gen:
173173
dependency: transitive
174174
description:

dart_native/ios/dart_native.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Write native code using Dart. This package liberates you from undercompetent cha
2626

2727
s.swift_version = '5.5'
2828
s.ios.dependency 'Flutter'
29-
s.dependency 'ClassWrittenInSwift', '~> 0.0.4'
29+
s.dependency 'ClassWrittenInSwift', '~> 0.0.5'
3030

3131
s.ios.deployment_target = '8.0'
3232
s.libraries = 'c++'

dart_native/lib/src/darwin/common/pointer_encoding.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ Map<Pointer<Utf8>, Function> _loadValueStrategyMap = {
222222
},
223223
};
224224

225-
dynamic _handleObjCBasicValue(String type, dynamic value) {
225+
dynamic handleObjCBasicValue(String type, dynamic value) {
226226
if (type.toLowerCase() == '$bool') {
227227
if (value is num) {
228228
return value != 0;
@@ -287,7 +287,7 @@ dynamic loadValueFromPointer(Pointer<Void> ptr, Pointer<Utf8> encoding,
287287
} while (false);
288288
// Post-processing
289289
if (dartType != null) {
290-
result = _handleObjCBasicValue(dartType, result);
290+
result = handleObjCBasicValue(dartType, result);
291291
}
292292
return result;
293293
}

dart_native/lib/src/darwin/interface/interface_runtime.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:dart_native/dart_native.dart';
55
import 'package:dart_native/src/common/interface_runtime.dart';
66
import 'package:dart_native/src/darwin/common/callback_manager.dart';
77
import 'package:dart_native/src/darwin/common/library.dart';
8+
import 'package:dart_native/src/darwin/common/pointer_encoding.dart';
89
import 'package:dart_native/src/darwin/runtime/internal/functions.dart';
910
import 'package:dart_native/src/darwin/runtime/internal/nssubclass.dart';
1011
import 'package:ffi/ffi.dart';
@@ -42,10 +43,10 @@ class InterfaceRuntimeObjC extends InterfaceRuntime {
4243
T _postprocessResult<T>(dynamic result) {
4344
if (result is NSObject) {
4445
// The type of result is NSObject, we should unbox it.
45-
if (T == int || T == double) {
46+
if (T == int || T == double || T == bool) {
4647
if (result.isKind(of: Class('NSNumber'))) {
4748
final number = NSNumber.fromPointer(result.pointer);
48-
return number.raw;
49+
return handleObjCBasicValue(T.toString(), number.raw);
4950
}
5051
} else if (T == String) {
5152
if (result.isKind(of: Class('NSString'))) {

dart_native/macos/dart_native.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Write native code using Dart. This package liberates you from undercompetent cha
2222

2323
s.swift_version = '5.5'
2424
s.osx.dependency 'FlutterMacOS'
25-
s.dependency 'ClassWrittenInSwift', '~> 0.0.4'
25+
s.dependency 'ClassWrittenInSwift', '~> 0.0.5'
2626

2727
s.osx.deployment_target = '10.11'
2828
s.libraries = 'c++'

dart_native/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_native
22
description: Write native code using Dart. This package liberates you from native code and low performance channel.
3-
version: 0.7.7
3+
version: 0.7.8
44
homepage: https://github.com/dart-native/dart_native
55

66
environment:

dart_native_gen/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ packages:
168168
path: "../../dart_native"
169169
relative: true
170170
source: path
171-
version: "0.7.6"
171+
version: "0.7.8"
172172
dart_native_gen:
173173
dependency: transitive
174174
description:

0 commit comments

Comments
 (0)