From 365a422f2dcd38e0cf6ae48e12774358597a40d5 Mon Sep 17 00:00:00 2001 From: open-trade Date: Fri, 20 Aug 2021 17:16:46 +0800 Subject: [PATCH] finally got IPA work --- .../android/app/src/main/AndroidManifest.xml | 4 ++- .../ios/Runner.xcodeproj/project.pbxproj | 3 ++ flutter_hbb/lib/model.dart | 29 ++++++++++--------- flutter_hbb/pubspec.yaml | 2 +- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/flutter_hbb/android/app/src/main/AndroidManifest.xml b/flutter_hbb/android/app/src/main/AndroidManifest.xml index 567c1ebbb..4a977bb00 100644 --- a/flutter_hbb/android/app/src/main/AndroidManifest.xml +++ b/flutter_hbb/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,9 @@ package="com.carriez.flutter_hbb"> + android:icon="@mipmap/ic_launcher" + android:extractNativeLibs="true" + tools:replace="android:extractNativeLibs"> ('get_by_name'); - _setByName = - dylib.lookupFunction, Pointer), F3>( - 'set_by_name'); - _freeRgba = dylib - .lookupFunction), F4>('free_rgba'); - _getRgba = dylib.lookupFunction('get_rgba'); - _dir = (await getApplicationDocumentsDirectory()).path; - String id = 'NA'; - String name = 'Flutter'; try { + _getByName = dylib.lookupFunction('get_by_name'); + _setByName = + dylib.lookupFunction, Pointer), F3>( + 'set_by_name'); + _freeRgba = dylib + .lookupFunction), F4>('free_rgba'); + _getRgba = dylib.lookupFunction('get_rgba'); + _dir = (await getApplicationDocumentsDirectory()).path; + String id = 'NA'; + String name = 'Flutter'; DeviceInfoPlugin deviceInfo = DeviceInfoPlugin(); if (Platform.isAndroid) { AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo; @@ -651,12 +654,12 @@ class FFI { name = iosInfo.utsname.machine; id = iosInfo.identifierForVendor.hashCode.toString(); } + setByName('info1', id); + setByName('info2', name); + setByName('init', _dir); } catch (e) { print(e); } - setByName('info1', id); - setByName('info2', name); - setByName('init', _dir); } } diff --git a/flutter_hbb/pubspec.yaml b/flutter_hbb/pubspec.yaml index 7116743ab..1089bfe82 100644 --- a/flutter_hbb/pubspec.yaml +++ b/flutter_hbb/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.1.7+11 +version: 1.1.7+18 environment: sdk: ">=2.7.0 <3.0.0"