iOS: "CLIENT OF UIKIT REQUIRES UPDATE: This process does not adopt UIScene lifecycle. This will become an assert in a future version."
I've successfully managed to get winit running on iOS, and everything is working as expected except for one warning I'm encountering:
CLIENT OF UIKIT REQUIRES UPDATE: This process does not adopt UIScene lifecycle. This will become an assert in a future version.
My Xcode project is minimal and consists of a single main.swift file that, via a bridging header, calls into Rust to initialize the winit event loop.
My info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>MinimumOSVersion</key>
<string>$(IPHONEOS_DEPLOYMENT_TARGET)</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiresFullScreen</key>
<false/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
<string>arm64e</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
</array>
</dict>
</plist>
However, I’m not sure if I’m missing something regarding the expected UIKit lifecycle on iOS. Is there an example of how to properly adopt the UIScene lifecycle in a setup like this?
Also, while reading through the documentation, I came across mentions of using a custom AppDelegate with winit on iOS. Although it might not be directly related to this warning, I’m curious if there’s any working example implementation of that available as well?
winit v0.30.10
Curious, could I get you to try v0.30.9? Just to know if it's because of the recent change in there, or because of new Xcode changes.
Re a working impl of custom app delegate, not really, though I just finished one together with @extrawurst today, I think he's planning on releasing it as a Bevy helper crate at some point, I'd suggest you take a look at that once that's done.
In the meantime here is that code as a gist: https://gist.github.com/extrawurst/b5aab1550f08fdb6722749a9fde087bf
I just tested with v0.30.9 and I’m seeing the exact same warning right as the very first log message. I’m not sure if I’ve missed something on my end. Is anyone else hitting this?
Also, thanks a lot to @extrawurst for sharing that link!
I just tested with v0.30.9 and I’m seeing the exact same warning right as the very first log message.
Thanks. Then this is indeed a new warning. I'm working on migrating Winit to UIWindowScene to fix it, but haven't gotten around to finishing it (bevy_uikit is my very WIP on this).
Alright, thanks 👍
This might be helpful: https://github.com/libsdl-org/SDL/issues/12680
@Johannes0021 here is the relevant SDL commit: https://github.com/MainbaseT/SDL/commit/b46e26e65aac8f7d5b5c83d43ea99a507c093930
I think they basically did what @madsmtm also plans to do using UIScenes
Yes exactly. I only linked it because I was notified that the issue was closed, so I thought it might be useful as a reference. I am not sure how directly relevant it is, but it might still offer some inspiration or context.