finally got IPA work
This commit is contained in:
parent
bcd550ebef
commit
365a422f2d
@ -2,7 +2,9 @@
|
|||||||
package="com.carriez.flutter_hbb">
|
package="com.carriez.flutter_hbb">
|
||||||
<application
|
<application
|
||||||
android:label="RustDesk"
|
android:label="RustDesk"
|
||||||
android:icon="@mipmap/ic_launcher">
|
android:icon="@mipmap/ic_launcher"
|
||||||
|
android:extractNativeLibs="true"
|
||||||
|
tools:replace="android:extractNativeLibs">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
|
@ -379,6 +379,7 @@
|
|||||||
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
STRIP_STYLE = "non-global";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
@ -511,6 +512,7 @@
|
|||||||
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
STRIP_STYLE = "non-global";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -537,6 +539,7 @@
|
|||||||
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
LIBRARY_SEARCH_PATHS = "$(PROJECT_DIR)/../../target/aarch64-apple-ios/release/";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
PRODUCT_BUNDLE_IDENTIFIER = com.carriez.flutterHbb;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
|
STRIP_STYLE = "non-global";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
VERSIONING_SYSTEM = "apple-generic";
|
VERSIONING_SYSTEM = "apple-generic";
|
||||||
|
@ -566,6 +566,7 @@ class FFI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Uint8List getRgba() {
|
static Uint8List getRgba() {
|
||||||
|
if (_getRgba == null) return null;
|
||||||
_lastRgbaFrame = _getRgba();
|
_lastRgbaFrame = _getRgba();
|
||||||
if (_lastRgbaFrame == null || _lastRgbaFrame == nullptr) return null;
|
if (_lastRgbaFrame == null || _lastRgbaFrame == nullptr) return null;
|
||||||
final ref = _lastRgbaFrame.ref;
|
final ref = _lastRgbaFrame.ref;
|
||||||
@ -606,6 +607,7 @@ class FFI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void setByName(String name, [String value = '']) {
|
static void setByName(String name, [String value = '']) {
|
||||||
|
if (_setByName == null) return;
|
||||||
var a = name.toNativeUtf8();
|
var a = name.toNativeUtf8();
|
||||||
var b = value.toNativeUtf8();
|
var b = value.toNativeUtf8();
|
||||||
_setByName(a, b);
|
_setByName(a, b);
|
||||||
@ -614,6 +616,7 @@ class FFI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static String getByName(String name, [String arg = '']) {
|
static String getByName(String name, [String arg = '']) {
|
||||||
|
if (_getByName == null) return '';
|
||||||
var a = name.toNativeUtf8();
|
var a = name.toNativeUtf8();
|
||||||
var b = arg.toNativeUtf8();
|
var b = arg.toNativeUtf8();
|
||||||
var p = _getByName(a, b);
|
var p = _getByName(a, b);
|
||||||
@ -630,17 +633,17 @@ class FFI {
|
|||||||
? DynamicLibrary.open('librustdesk.so')
|
? DynamicLibrary.open('librustdesk.so')
|
||||||
: DynamicLibrary.process();
|
: DynamicLibrary.process();
|
||||||
print('initializing FFI');
|
print('initializing FFI');
|
||||||
_getByName = dylib.lookupFunction<F2, F2>('get_by_name');
|
|
||||||
_setByName =
|
|
||||||
dylib.lookupFunction<Void Function(Pointer<Utf8>, Pointer<Utf8>), F3>(
|
|
||||||
'set_by_name');
|
|
||||||
_freeRgba = dylib
|
|
||||||
.lookupFunction<Void Function(Pointer<RgbaFrame>), F4>('free_rgba');
|
|
||||||
_getRgba = dylib.lookupFunction<F5, F5>('get_rgba');
|
|
||||||
_dir = (await getApplicationDocumentsDirectory()).path;
|
|
||||||
String id = 'NA';
|
|
||||||
String name = 'Flutter';
|
|
||||||
try {
|
try {
|
||||||
|
_getByName = dylib.lookupFunction<F2, F2>('get_by_name');
|
||||||
|
_setByName =
|
||||||
|
dylib.lookupFunction<Void Function(Pointer<Utf8>, Pointer<Utf8>), F3>(
|
||||||
|
'set_by_name');
|
||||||
|
_freeRgba = dylib
|
||||||
|
.lookupFunction<Void Function(Pointer<RgbaFrame>), F4>('free_rgba');
|
||||||
|
_getRgba = dylib.lookupFunction<F5, F5>('get_rgba');
|
||||||
|
_dir = (await getApplicationDocumentsDirectory()).path;
|
||||||
|
String id = 'NA';
|
||||||
|
String name = 'Flutter';
|
||||||
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
|
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
|
||||||
@ -651,12 +654,12 @@ class FFI {
|
|||||||
name = iosInfo.utsname.machine;
|
name = iosInfo.utsname.machine;
|
||||||
id = iosInfo.identifierForVendor.hashCode.toString();
|
id = iosInfo.identifierForVendor.hashCode.toString();
|
||||||
}
|
}
|
||||||
|
setByName('info1', id);
|
||||||
|
setByName('info2', name);
|
||||||
|
setByName('init', _dir);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
}
|
}
|
||||||
setByName('info1', id);
|
|
||||||
setByName('info2', name);
|
|
||||||
setByName('init', _dir);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.1.7+11
|
version: 1.1.7+18
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.7.0 <3.0.0"
|
sdk: ">=2.7.0 <3.0.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user