ios improvements

This commit is contained in:
Christien Rioux 2024-06-23 14:59:03 -04:00
parent f1bc649eb1
commit 2b1dd49138
6 changed files with 295 additions and 248 deletions

518
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -46,8 +46,6 @@ do
continue
fi
# Choose arm64 brew for unit tests by default if we are on M1
if [ -f /opt/homebrew/bin/brew ]; then
HOMEBREW_DIR=/opt/homebrew/bin

View File

@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: async_tools
sha256: e783ac6ed5645c86da34240389bb3a000fc5e3ae6589c6a482eb24ece7217681
sha256: f35f5590711f1422c7eff990351e879c5433486f9b5be5df30818521bf6ab8d6
url: "https://pub.dev"
source: hosted
version: "0.1.1"
version: "0.1.3"
boolean_selector:
dependency: transitive
description:

View File

@ -71,6 +71,7 @@ jni = "0.21.1"
paranoid-android = "0.2.1"
android_log-sys = { version = "0.3.1", optional = true }
# Dependencies for Android builds only
# Dependencies for iOS builds only
[target.'cfg(target_os = "ios")'.dependencies]
oslog = { version = "0.2.0", default-features = false, optional = true }
tracing-oslog = { version = "0.1.2" }

View File

@ -234,6 +234,14 @@ pub extern "C" fn initialize_veilid_core(platform_config: FfiStr) {
.with_filter(filter.clone());
filters.insert("terminal", filter);
layers.push(layer.boxed());
} else if #[cfg(target_os = "ios")] {
use tracing_oslog::OsLogger;
let filter =
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, &platform_config.logging.terminal.ignore_log_targets);
let layer = OsLogger::new("com.veilid.veilid-flutter", "default")
.with_filter(filter.clone());
filters.insert("terminal", filter);
layers.push(layer.boxed());
} else {
let filter =
veilid_core::VeilidLayerFilter::new(platform_config.logging.terminal.level, &platform_config.logging.terminal.ignore_log_targets);

View File

@ -407,10 +407,8 @@ impl NetworkInterfaces {
// Reduce interfaces to their best routable ip addresses
let mut intf_addrs = Vec::new();
for intf in inner.interfaces.values() {
if !intf.is_running()
|| !intf.has_default_route()
|| intf.is_loopback()
|| intf.is_point_to_point()
if !intf.is_running() || !intf.has_default_route() || intf.is_loopback()
// || intf.is_point_to_point() // xxx: iOS cellular is 'point-to-point'
{
continue;
}