diff --git a/Cargo.toml b/Cargo.toml index ade3fdb8..06f9d867 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -45,7 +45,7 @@ jni = "0.19.0" once_cell = "1.19.0" jni-utils = "0.1.1" -[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] +[target.'cfg(target_vendor = "apple")'.dependencies] objc2 = "0.5.1" objc2-foundation = { version = "0.2.0", features = [ "block2", diff --git a/src/lib.rs b/src/lib.rs index aeb3fae7..f4a6b5cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -94,7 +94,7 @@ pub mod api; mod bluez; #[cfg(not(target_os = "linux"))] mod common; -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(target_vendor = "apple")] mod corebluetooth; #[cfg(target_os = "android")] mod droidplug; diff --git a/src/platform.rs b/src/platform.rs index 13e01c80..f4535519 100644 --- a/src/platform.rs +++ b/src/platform.rs @@ -5,7 +5,7 @@ pub use crate::bluez::{ adapter::Adapter, manager::Manager, peripheral::Peripheral, peripheral::PeripheralId, }; -#[cfg(any(target_os = "macos", target_os = "ios"))] +#[cfg(target_vendor = "apple")] pub use crate::corebluetooth::{ adapter::Adapter, manager::Manager, peripheral::Peripheral, peripheral::PeripheralId, };