Skip to content

Commit 852ddd4

Browse files
committed
Merge branch 'release/0.7.5'
2 parents cc8d0a5 + 86008ab commit 852ddd4

File tree

18 files changed

+27
-23
lines changed

18 files changed

+27
-23
lines changed

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.5
2+
3+
* [Fix] Crash on iOS.
4+
* [Fix] https://github.com/dart-native/dart_native/issues/103
5+
16
## 0.7.4
27

38
* [Fix] Errors and warnings.

dart_native/example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ SPEC CHECKSUMS:
2828
ClassWrittenInSwift: de0543e7c1a836e190af74fddff84ad9b2f3d18c
2929
CocoaLumberjack: 543c79c114dadc3b1aba95641d8738b06b05b646
3030
dart_native: 3ed31c9e40530ad0ae006c0b7cf75a22b24e933f
31-
Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a
31+
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
3232

3333
PODFILE CHECKSUM: 6e9979e89c4dd9698b3ed55a88e6a5100fa0dc38
3434

35-
COCOAPODS: 1.11.2
35+
COCOAPODS: 1.11.3

dart_native/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</Testables>
4141
</TestAction>
4242
<LaunchAction
43-
buildConfiguration = "Release"
43+
buildConfiguration = "Debug"
4444
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4545
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4646
enableASanStackUseAfterReturn = "YES"

dart_native/example/ios/Runner/DNInterfaceDemo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ @implementation DNInterfaceDemo
2121
[self invokeMethod:@"totalCost"
2222
arguments:@[@0.123456789, @10, @[@"testArray"]]
2323
result:^(id _Nullable result, NSError * _Nullable error) {
24-
NSLog(@"%@", result);
24+
NSLog(@"result: %@, error: %@", result, error);
2525
}];
2626
return [NSString stringWithFormat:@"hello %@!", str];
2727
}
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
//
22
// Use this file to import your target's public headers that you would like to expose to Swift.
33
//
4-

dart_native/example/ios/Runner/RuntimeStub.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ - (void)fooNSDictionaryBlock:(NSDictionary *(^)(NSDictionary *dict))block {
268268

269269
- (void)fooDelegate:(id<SampleDelegate>)delegate {
270270
DDLogInfo(@"%s arg: %@", __FUNCTION__, delegate);
271-
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
271+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_global_queue(QOS_CLASS_DEFAULT, 0), ^{
272272
NSString *result = [delegate callback];
273273
DDLogInfo(@"%s callback result:%@", __FUNCTION__, result);
274274
});

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.4"
171+
version: "0.7.5"
172172
dart_native_gen:
173173
dependency: transitive
174174
description:

dart_native/ios/Classes/native_runtime.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ void NotifyBlockInvokeToDart(DNInvocation *invocation,
759759
}
760760

761761
BlockFunctionPointer function = creator.function;
762-
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, &creator, &invocation]() {
762+
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, creator, invocation]() {
763763
function(invocation.realArgs,
764764
invocation.realRetValue,
765765
numberOfArguments,
@@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation,
795795
NSSet<NSNumber *> *dartPorts = dealloc.dartPorts;
796796
for (NSNumber *port in dartPorts) {
797797
NativeMethodCallback callback = (NativeMethodCallback)callbackForDartPort[port].integerValue;
798-
const Work work = [callback, numberOfArguments, types, &group, &methodIMP, &invocation]() {
798+
const Work work = [callback, numberOfArguments, types, &group, methodIMP, invocation]() {
799799
callback(invocation.realArgs,
800800
invocation.realRetValue,
801801
numberOfArguments,

dart_native/ios/DartNative.xcframework/Info.plist

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66
<array>
77
<dict>
88
<key>LibraryIdentifier</key>
9-
<string>ios-i386_x86_64-simulator</string>
9+
<string>ios-arm64_armv7</string>
1010
<key>LibraryPath</key>
1111
<string>DartNative.framework</string>
1212
<key>SupportedArchitectures</key>
1313
<array>
14-
<string>i386</string>
15-
<string>x86_64</string>
14+
<string>arm64</string>
15+
<string>armv7</string>
1616
</array>
1717
<key>SupportedPlatform</key>
1818
<string>ios</string>
19-
<key>SupportedPlatformVariant</key>
20-
<string>simulator</string>
2119
</dict>
2220
<dict>
2321
<key>LibraryIdentifier</key>
24-
<string>ios-arm64_armv7</string>
22+
<string>ios-i386_x86_64-simulator</string>
2523
<key>LibraryPath</key>
2624
<string>DartNative.framework</string>
2725
<key>SupportedArchitectures</key>
2826
<array>
29-
<string>arm64</string>
30-
<string>armv7</string>
27+
<string>i386</string>
28+
<string>x86_64</string>
3129
</array>
3230
<key>SupportedPlatform</key>
3331
<string>ios</string>
32+
<key>SupportedPlatformVariant</key>
33+
<string>simulator</string>
3434
</dict>
3535
</array>
3636
<key>CFBundlePackageType</key>

dart_native/ios/DartNative.xcframework/ios-arm64_armv7/DartNative.framework/_CodeSignature/CodeResources

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</data>
3131
<key>Info.plist</key>
3232
<data>
33-
pfNk+WH3yvIXlYG8fVlWVMdIL6I=
33+
Xtc5s5mwE6jJOQ039IhNd9vAsKM=
3434
</data>
3535
<key>Modules/module.modulemap</key>
3636
<data>

dart_native/ios/DartNative.xcframework/ios-i386_x86_64-simulator/DartNative.framework/_CodeSignature/CodeResources

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</data>
3131
<key>Info.plist</key>
3232
<data>
33-
rP8Qf2o1ykOsg0AApEvTuOgpa3A=
33+
Yj6HW2dqtkKMgRRFXJalQLjdvtA=
3434
</data>
3535
<key>Modules/module.modulemap</key>
3636
<data>

dart_native/lib/src/darwin/runtime/block.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Block extends id {
6161
List<String> nativeTypes = nativeTypeStringForDartTypes(dartTypes);
6262
Pointer<Utf8> typeStringPtr = nativeTypes.join(', ').toNativeUtf8();
6363
Pointer<Void> blockPtr =
64-
blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 0 : 1, nativePort);
64+
blockCreate(typeStringPtr, _callbackPtr, shouldReturnAsync ? 1 : 0, nativePort);
6565
assert(blockPtr != nullptr);
6666
if (blockPtr == nullptr) {
6767
return nilBlock;

dart_native/macos/Classes/native_runtime.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ void NotifyBlockInvokeToDart(DNInvocation *invocation,
759759
}
760760

761761
BlockFunctionPointer function = creator.function;
762-
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, &creator, &invocation]() {
762+
const Work work = [function, numberOfArguments, isVoid, shouldReturnAsync, &sema, creator, invocation]() {
763763
function(invocation.realArgs,
764764
invocation.realRetValue,
765765
numberOfArguments,
@@ -795,7 +795,7 @@ void NotifyMethodPerformToDart(DNInvocation *invocation,
795795
NSSet<NSNumber *> *dartPorts = dealloc.dartPorts;
796796
for (NSNumber *port in dartPorts) {
797797
NativeMethodCallback callback = (NativeMethodCallback)callbackForDartPort[port].integerValue;
798-
const Work work = [callback, numberOfArguments, types, &group, &methodIMP, &invocation]() {
798+
const Work work = [callback, numberOfArguments, types, &group, methodIMP, invocation]() {
799799
callback(invocation.realArgs,
800800
invocation.realRetValue,
801801
numberOfArguments,

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.4
3+
version: 0.7.5
44
homepage: https://github.com/dart-native/dart_native
55

66
environment:

0 commit comments

Comments
 (0)