diff --git a/dart_native/example/ios/Podfile.lock b/dart_native/example/ios/Podfile.lock index 23307767..6cec905f 100644 --- a/dart_native/example/ios/Podfile.lock +++ b/dart_native/example/ios/Podfile.lock @@ -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 diff --git a/dart_native/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/dart_native/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 23049348..8f42d8a2 100644 --- a/dart_native/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/dart_native/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -40,7 +40,7 @@ )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); }); diff --git a/dart_native/ios/Classes/native_runtime.mm b/dart_native/ios/Classes/native_runtime.mm index 9b3a276d..9ad53eea 100644 --- a/dart_native/ios/Classes/native_runtime.mm +++ b/dart_native/ios/Classes/native_runtime.mm @@ -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, @@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation, NSSet *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, diff --git a/dart_native/ios/DartNative.xcframework/Info.plist b/dart_native/ios/DartNative.xcframework/Info.plist index abda36ca..fd1f25e0 100644 --- a/dart_native/ios/DartNative.xcframework/Info.plist +++ b/dart_native/ios/DartNative.xcframework/Info.plist @@ -6,31 +6,31 @@ LibraryIdentifier - ios-i386_x86_64-simulator + ios-arm64_armv7 LibraryPath DartNative.framework SupportedArchitectures - i386 - x86_64 + arm64 + armv7 SupportedPlatform ios - SupportedPlatformVariant - simulator LibraryIdentifier - ios-arm64_armv7 + ios-i386_x86_64-simulator LibraryPath DartNative.framework SupportedArchitectures - arm64 - armv7 + i386 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator CFBundlePackageType diff --git a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/DartNative b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/DartNative index 07b396f3..606915e7 100755 Binary files a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/DartNative and b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/DartNative differ diff --git a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/Info.plist b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/Info.plist index 7f99a490..c0448831 100644 Binary files a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/Info.plist and b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/Info.plist differ diff --git a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/_CodeSignature/CodeResources b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/_CodeSignature/CodeResources index f0a80445..efe87858 100644 --- a/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/_CodeSignature/CodeResources +++ b/dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/_CodeSignature/CodeResources @@ -30,7 +30,7 @@ Info.plist - pfNk+WH3yvIXlYG8fVlWVMdIL6I= + Xtc5s5mwE6jJOQ039IhNd9vAsKM= Modules/module.modulemap diff --git a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/DartNative b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/DartNative index 73651a2b..69be89ff 100755 Binary files a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/DartNative and b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/DartNative differ diff --git a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/Info.plist b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/Info.plist index 1f854b12..d292d01b 100644 Binary files a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/Info.plist and b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/Info.plist differ diff --git a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/_CodeSignature/CodeResources b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/_CodeSignature/CodeResources index 5fd9f8ae..93628530 100644 --- a/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/_CodeSignature/CodeResources +++ b/dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/_CodeSignature/CodeResources @@ -30,7 +30,7 @@ Info.plist - rP8Qf2o1ykOsg0AApEvTuOgpa3A= + Yj6HW2dqtkKMgRRFXJalQLjdvtA= Modules/module.modulemap diff --git a/dart_native/lib/src/darwin/runtime/block.dart b/dart_native/lib/src/darwin/runtime/block.dart index ae930cc9..9d0e31d5 100644 --- a/dart_native/lib/src/darwin/runtime/block.dart +++ b/dart_native/lib/src/darwin/runtime/block.dart @@ -61,7 +61,7 @@ class Block extends id { List nativeTypes = nativeTypeStringForDartTypes(dartTypes); Pointer typeStringPtr = nativeTypes.join(', ').toNativeUtf8(); Pointer blockPtr = - blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 0 : 1, nativePort); + blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 1 : 0, nativePort); assert(blockPtr != nullptr); if (blockPtr == nullptr) { return nilBlock; diff --git a/dart_native/macos/Classes/native_runtime.mm b/dart_native/macos/Classes/native_runtime.mm index 9b3a276d..9ad53eea 100644 --- a/dart_native/macos/Classes/native_runtime.mm +++ b/dart_native/macos/Classes/native_runtime.mm @@ -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, @@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation, NSSet *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,