From f43d1674b8b39f5d9c5b323a8071a892ad6a62cb Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Wed, 21 Aug 2024 14:12:10 +0100 Subject: [PATCH 1/3] Changed out the crate for interfacing with CoreGraphics types. This is to get round App Store submission issues. --- Cargo.lock | 8 +++++++- Cargo.toml | 2 +- app-surface/Cargo.toml | 2 +- app-surface/src/ios.rs | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6820ba2..e13f6d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,7 +155,7 @@ dependencies = [ "android_logger", "ash", "cfg-if", - "core-graphics", + "core_graphics_min", "env_logger", "glam", "jni", @@ -520,6 +520,12 @@ dependencies = [ "libc", ] +[[package]] +name = "core_graphics_min" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c67771e9bf8c471ad2088590bee0c2d2f351df4271d55298e78b5c715e7fcddc" + [[package]] name = "crossbeam-utils" version = "0.8.20" diff --git a/Cargo.toml b/Cargo.toml index 6ea837a..7ed97b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ env_logger = "0.11" # macOS, iOS libc = "0.2" objc = "0.2.7" -core-graphics = "0.23.1" +core_graphics_min = "0.1" # android target android_logger = "0.14" diff --git a/app-surface/Cargo.toml b/app-surface/Cargo.toml index e2ac488..310e0a3 100644 --- a/app-surface/Cargo.toml +++ b/app-surface/Cargo.toml @@ -30,7 +30,7 @@ winit.workspace = true [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] libc.workspace = true objc.workspace = true -core-graphics.workspace = true +core_graphics_min.workspace = true env_logger.workspace = true raw-window-handle.workspace = true diff --git a/app-surface/src/ios.rs b/app-surface/src/ios.rs index dd24aa5..de0f01b 100644 --- a/app-surface/src/ios.rs +++ b/app-surface/src/ios.rs @@ -1,4 +1,4 @@ -use core_graphics::{base::CGFloat, geometry::CGRect}; +use core_graphics_min::{CGFloat, CGRect}; use libc::c_void; use objc::{runtime::Object, *}; use std::marker::Sync; From bb7dec2a2d5ee089cb81cde1b94f77e6bcb7212a Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Fri, 23 Aug 2024 16:42:27 +0100 Subject: [PATCH 2/3] Enabled the surface of macOS. --- app-surface/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-surface/src/lib.rs b/app-surface/src/lib.rs index a738bb7..9522c43 100644 --- a/app-surface/src/lib.rs +++ b/app-surface/src/lib.rs @@ -6,7 +6,7 @@ pub use touch::*; #[cfg_attr(target_os = "ios", path = "ios.rs")] #[cfg_attr(target_os = "android", path = "android.rs")] -#[cfg_attr(all(feature = "mac_catalyst", target_os = "macos"), path = "ios.rs")] +#[cfg_attr(target_os = "macos", path = "ios.rs")] mod app_surface; pub use app_surface::*; From 4f9d3f4dbf4eaeff7507779093b6dbc1ebb4516f Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Fri, 11 Oct 2024 15:16:54 +0100 Subject: [PATCH 3/3] Added the winit feature. --- app-surface/Cargo.toml | 1 + app-surface/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app-surface/Cargo.toml b/app-surface/Cargo.toml index 310e0a3..05da34f 100644 --- a/app-surface/Cargo.toml +++ b/app-surface/Cargo.toml @@ -16,6 +16,7 @@ crate-type = ["rlib"] default = [] webgl = ["wgpu/webgl"] mac_catalyst = [] +winit = [] [dependencies] cfg-if.workspace = true diff --git a/app-surface/src/lib.rs b/app-surface/src/lib.rs index 9522c43..03328d8 100644 --- a/app-surface/src/lib.rs +++ b/app-surface/src/lib.rs @@ -6,7 +6,7 @@ pub use touch::*; #[cfg_attr(target_os = "ios", path = "ios.rs")] #[cfg_attr(target_os = "android", path = "android.rs")] -#[cfg_attr(target_os = "macos", path = "ios.rs")] +#[cfg_attr(all(target_os = "macos", not(feature = "winit")), path = "ios.rs")] mod app_surface; pub use app_surface::*;