Use a bit less unsafe on iOS (#2643)

* Use a bit less `unsafe` on iOS

I did test this in XCode 11.3's "Debug View Heirarchy", the NSStringRust problem is no longer applicable (likely because Rust got better at emitting correct debug info).

* Avoid using `id` on iOS
This commit is contained in:
Mads Marquart 2023-01-23 00:01:45 +01:00 committed by GitHub
parent 0f2fbe373b
commit a82f66826b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 100 deletions

View file

@ -18,7 +18,7 @@ use crate::{
platform_impl::platform::{
app_state,
event_loop::{EventProxy, EventWrapper},
ffi::{id, UIRectEdge, UIUserInterfaceIdiom},
ffi::{UIRectEdge, UIUserInterfaceIdiom},
window::PlatformSpecificWindowBuilderAttributes,
DeviceId, Fullscreen,
},
@ -487,7 +487,7 @@ declare_class!(
// UIApplicationDelegate protocol
unsafe impl WinitApplicationDelegate {
#[sel(application:didFinishLaunchingWithOptions:)]
fn did_finish_launching(&self, _application: &UIApplication, _: id) -> bool {
fn did_finish_launching(&self, _application: &UIApplication, _: *mut NSObject) -> bool {
unsafe {
app_state::did_finish_launching();
}