Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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