Skip to content

Commit

Permalink
Merge branch 'release/0.7.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
yulingtianxia committed Aug 29, 2022
2 parents cc8d0a5 + 86008ab commit 852ddd4
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 23 deletions.
5 changes: 5 additions & 0 deletions dart_native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.7.5

* [Fix] Crash on iOS.
* [Fix] https://github.com/dart-native/dart_native/issues/103

## 0.7.4

* [Fix] Errors and warnings.
Expand Down
4 changes: 2 additions & 2 deletions dart_native/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ SPEC CHECKSUMS:
ClassWrittenInSwift: de0543e7c1a836e190af74fddff84ad9b2f3d18c
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
dart_native: 3ed31c9e40530ad0ae006c0b7cf75a22b24e933f
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c

PODFILE CHECKSUM: 6e9979e89c4dd9698b3ed55a88e6a5100fa0dc38

COCOAPODS: 1.11.2
COCOAPODS: 1.11.3
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableASanStackUseAfterReturn = "YES"
Expand Down
2 changes: 1 addition & 1 deletion dart_native/example/ios/Runner/DNInterfaceDemo.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ @implementation DNInterfaceDemo
[self invokeMethod:@"totalCost"
arguments:@[@0.123456789, @10, @[@"testArray"]]
result:^(id _Nullable result, NSError * _Nullable error) {
NSLog(@"%@", result);
NSLog(@"result: %@, error: %@", result, error);
}];
return [NSString stringWithFormat:@"hello %@!", str];
}
Expand Down
1 change: 0 additions & 1 deletion dart_native/example/ios/Runner/Runner-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//

2 changes: 1 addition & 1 deletion dart_native/example/ios/Runner/RuntimeStub.m
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ - (void)fooNSDictionaryBlock:(NSDictionary *(^)(NSDictionary *dict))block {

- (void)fooDelegate:(id<SampleDelegate>)delegate {
DDLogInfo(@"%s arg: %@", __FUNCTION__, delegate);
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
NSString *result = [delegate callback];
DDLogInfo(@"%s callback result:%@", __FUNCTION__, result);
});
Expand Down
2 changes: 1 addition & 1 deletion dart_native/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.7.4"
version: "0.7.5"
dart_native_gen:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions dart_native/ios/Classes/native_runtime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ void NotifyBlockInvokeToDart(DNInvocation *invocation,
}

BlockFunctionPointer function = creator.function;
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, &creator, &invocation]() {
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, creator, invocation]() {
function(invocation.realArgs,
invocation.realRetValue,
numberOfArguments,
Expand Down Expand Up @@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation,
NSSet<NSNumber *> *dartPorts = dealloc.dartPorts;
for (NSNumber *port in dartPorts) {
NativeMethodCallback callback = (NativeMethodCallback)callbackForDartPort[port].integerValue;
const Work work = [callback, numberOfArguments, types, &group, &methodIMP, &invocation]() {
const Work work = [callback, numberOfArguments, types, &group, methodIMP, invocation]() {
callback(invocation.realArgs,
invocation.realRetValue,
numberOfArguments,
Expand Down
16 changes: 8 additions & 8 deletions dart_native/ios/DartNative.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>DartNative.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>i386</string>
<string>x86_64</string>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>DartNative.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</data>
<key>Info.plist</key>
<data>
pfNk+WH3yvIXlYG8fVlWVMdIL6I=
Xtc5s5mwE6jJOQ039IhNd9vAsKM=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</data>
<key>Info.plist</key>
<data>
rP8Qf2o1ykOsg0AApEvTuOgpa3A=
Yj6HW2dqtkKMgRRFXJalQLjdvtA=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down
2 changes: 1 addition & 1 deletion dart_native/lib/src/darwin/runtime/block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Block extends id {
List<String> nativeTypes = nativeTypeStringForDartTypes(dartTypes);
Pointer<Utf8> typeStringPtr = nativeTypes.join(', ').toNativeUtf8();
Pointer<Void> blockPtr =
blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 0 : 1, nativePort);
blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 1 : 0, nativePort);
assert(blockPtr != nullptr);
if (blockPtr == nullptr) {
return nilBlock;
Expand Down
4 changes: 2 additions & 2 deletions dart_native/macos/Classes/native_runtime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ void NotifyBlockInvokeToDart(DNInvocation *invocation,
}

BlockFunctionPointer function = creator.function;
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, &creator, &invocation]() {
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, creator, invocation]() {
function(invocation.realArgs,
invocation.realRetValue,
numberOfArguments,
Expand Down Expand Up @@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation,
NSSet<NSNumber *> *dartPorts = dealloc.dartPorts;
for (NSNumber *port in dartPorts) {
NativeMethodCallback callback = (NativeMethodCallback)callbackForDartPort[port].integerValue;
const Work work = [callback, numberOfArguments, types, &group, &methodIMP, &invocation]() {
const Work work = [callback, numberOfArguments, types, &group, methodIMP, invocation]() {
callback(invocation.realArgs,
invocation.realRetValue,
numberOfArguments,
Expand Down
2 changes: 1 addition & 1 deletion dart_native/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: dart_native
description: Write native code using Dart. This package liberates you from native code and low performance channel.
version: 0.7.4
version: 0.7.5
homepage: https://github.com/dart-native/dart_native

environment:
Expand Down

0 comments on commit 852ddd4

Please sign in to comment.