Skip to content

Commit 8618c02

Browse files
committed
fix: utf16 decode.
1 parent 8729691 commit 8618c02

File tree

8 files changed

+16
-29
lines changed

8 files changed

+16
-29
lines changed

dart_native/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.3.11
2+
3+
* [Fix] Skip BOM for Utf-16 on iOS. Sad!
4+
15
## 0.3.10
26

37
* [Fix] Skip BOM for Utf-16 on iOS.

dart_native/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
0CA3C332D4A04FA0AF3B4CF1 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 55A10DA5FB56EED2F91A32C5 /* libPods-Runner.a */; };
1011
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1112
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
1213
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
@@ -16,7 +17,6 @@
1617
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
1718
A41207A1242B949F001B3E1C /* RuntimeSon.m in Sources */ = {isa = PBXBuildFile; fileRef = A41207A0242B949F001B3E1C /* RuntimeSon.m */; };
1819
A462C31623C83CEB00068880 /* RuntimeStub.m in Sources */ = {isa = PBXBuildFile; fileRef = A462C31523C83CEA00068880 /* RuntimeStub.m */; };
19-
A99EDC3FB62BC44FF3AF35C3 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */; };
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXCopyFilesBuildPhase section */
@@ -33,11 +33,11 @@
3333
/* End PBXCopyFilesBuildPhase section */
3434

3535
/* Begin PBXFileReference section */
36-
0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3736
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3837
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3938
2A4AF18FDF40A3D2129339D3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4039
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
40+
55A10DA5FB56EED2F91A32C5 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4141
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
4242
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
4343
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
@@ -62,7 +62,7 @@
6262
isa = PBXFrameworksBuildPhase;
6363
buildActionMask = 2147483647;
6464
files = (
65-
A99EDC3FB62BC44FF3AF35C3 /* libPods-Runner.a in Frameworks */,
65+
0CA3C332D4A04FA0AF3B4CF1 /* libPods-Runner.a in Frameworks */,
6666
);
6767
runOnlyForDeploymentPostprocessing = 0;
6868
};
@@ -72,7 +72,7 @@
7272
4C2E40D2EBC79D4E31BCF1AA /* Frameworks */ = {
7373
isa = PBXGroup;
7474
children = (
75-
0146B48A4BA9D6861E0085B8 /* libPods-Runner.a */,
75+
55A10DA5FB56EED2F91A32C5 /* libPods-Runner.a */,
7676
);
7777
name = Frameworks;
7878
sourceTree = "<group>";

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.10"
178+
version: "0.3.11"
179179
dart_native_gen:
180180
dependency: transitive
181181
description:

dart_native/ios/Classes/native_runtime.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,7 @@
385385
uint16_t *result = (uint16_t *)data.bytes;
386386
if (*result == 0xFEFF || *result == 0xFFFE) { // skip BOM
387387
result++;
388+
*length = *length - 1;
388389
}
389390
return result;
390391
}
0 Bytes
Binary file not shown.

dart_native/ios/DartNative/Info.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.

dart_native/ios/dart_native.podspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ Write native code using Dart. This package liberates you from native code and lo
1313
s.license = { :file => '../LICENSE' }
1414
s.author = { 'DartNative' => 'email@example.com' }
1515
s.source = { :path => '.' }
16-
s.source_files = 'Classes/DartNativePlugin.*'
16+
1717
# s.source_files = 'Classes/**/*', 'libffi/*.h', 'common/**/*'
18+
s.source_files = 'Classes/DartNativePlugin.*'
19+
1820
s.public_header_files = 'Classes/DartNativePlugin.h'
1921
s.dependency 'Flutter'
2022
s.platform = :ios, '8.0'
2123
s.libraries = 'c++'
24+
2225
# s.vendored_libraries = 'libffi/libffi.a'
2326
s.vendored_frameworks = 'DartNative.framework'
27+
2428
# Flutter.framework does not contain a i386 slice. Only x86_64 simulators are supported.
2529
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
2630
end

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

66
environment:

0 commit comments

Comments
 (0)