Skip to content

Commit f6abaaf

Browse files
committed
Merge branch 'release/0.3.10'
2 parents 328c808 + fb54a64 commit f6abaaf

File tree

10 files changed

+27
-11
lines changed

10 files changed

+27
-11
lines changed

dart_native/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 0.3.10
2+
3+
* [Fix] Skip BOM for Utf-16 on iOS.
4+
5+
## 0.3.9
6+
7+
* [Fix] iOS framework compatibility.
8+
19
## 0.3.8
210

311
* [Feature] Android so file path.

dart_native/example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PODS:
2-
- CocoaLumberjack (3.6.2):
3-
- CocoaLumberjack/Core (= 3.6.2)
4-
- CocoaLumberjack/Core (3.6.2)
2+
- CocoaLumberjack (3.7.0):
3+
- CocoaLumberjack/Core (= 3.7.0)
4+
- CocoaLumberjack/Core (3.7.0)
55
- dart_native (0.0.1):
66
- Flutter
77
- Flutter (1.0.0)
@@ -22,7 +22,7 @@ EXTERNAL SOURCES:
2222
:path: Flutter
2323

2424
SPEC CHECKSUMS:
25-
CocoaLumberjack: bd155f2dd06c0e0b03f876f7a3ee55693122ec94
25+
CocoaLumberjack: e8955b9d337ac307103b0a34fd141c32f27e53c5
2626
dart_native: 8150ab93e4e060c19e0e8fb3bf98bc970d097957
2727
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
2828

dart_native/example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ packages:
175175
path: ".."
176176
relative: true
177177
source: path
178-
version: "0.3.8"
178+
version: "0.3.10"
179179
dart_native_gen:
180180
dependency: transitive
181181
description:

dart_native/ios/Classes/native_runtime.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _dispatch_get_main_queue(void);
6666
DN_EXTERN void
6767
native_mark_autoreleasereturn_object(id object);
6868

69-
DN_EXTERN const void *
69+
DN_EXTERN const uint16_t *
7070
native_convert_nsstring_to_utf16(NSString *string, NSUInteger *length);
7171

7272
#pragma mark - Dart VM API

dart_native/ios/Classes/native_runtime.mm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,12 +377,16 @@
377377
}];
378378
}
379379

380-
const void *
380+
const uint16_t *
381381
native_convert_nsstring_to_utf16(NSString *string, NSUInteger *length) {
382382
NSData *data = [string dataUsingEncoding:NSUTF16StringEncoding];
383383
// UTF16, 2-byte per unit
384384
*length = data.length / 2;
385-
return data.bytes;
385+
uint16_t *result = (uint16_t *)data.bytes;
386+
if (*result == 0xFEFF || *result == 0xFFFE) { // skip BOM
387+
result++;
388+
}
389+
return result;
386390
}
387391

388392
#pragma mark Dart VM API Init
Binary file not shown.
-42 Bytes
Binary file not shown.

dart_native/ios/DartNative.xcodeproj/project.pbxproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
385385
GCC_WARN_UNUSED_FUNCTION = YES;
386386
GCC_WARN_UNUSED_VARIABLE = YES;
387-
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
387+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
388388
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
389389
MTL_FAST_MATH = YES;
390390
ONLY_ACTIVE_ARCH = YES;
@@ -440,7 +440,7 @@
440440
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
441441
GCC_WARN_UNUSED_FUNCTION = YES;
442442
GCC_WARN_UNUSED_VARIABLE = YES;
443-
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
443+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
444444
MTL_ENABLE_DEBUG_INFO = NO;
445445
MTL_FAST_MATH = YES;
446446
SDKROOT = iphoneos;
@@ -464,6 +464,7 @@
464464
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
465465
INFOPLIST_FILE = DartNative/Info.plist;
466466
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
467+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
467468
LD_RUNPATH_SEARCH_PATHS = (
468469
"$(inherited)",
469470
"@executable_path/Frameworks",
@@ -494,6 +495,7 @@
494495
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
495496
INFOPLIST_FILE = DartNative/Info.plist;
496497
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
498+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
497499
LD_RUNPATH_SEARCH_PATHS = (
498500
"$(inherited)",
499501
"@executable_path/Frameworks",

dart_native/ios/dart_native.podspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ Write native code using Dart. This package liberates you from native code and lo
1414
s.author = { 'DartNative' => 'email@example.com' }
1515
s.source = { :path => '.' }
1616
s.source_files = 'Classes/DartNativePlugin.*'
17+
# s.source_files = 'Classes/**/*', 'libffi/*.h', 'common/**/*'
1718
s.public_header_files = 'Classes/DartNativePlugin.h'
1819
s.dependency 'Flutter'
1920
s.platform = :ios, '8.0'
2021
s.libraries = 'c++'
22+
# s.vendored_libraries = 'libffi/libffi.a'
2123
s.vendored_frameworks = 'DartNative.framework'
2224
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2325
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }

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

66
environment:

0 commit comments

Comments
 (0)