Skip to content

Migrate iOS app framework to required UIKit scene-based lifecycle#1503

Open
SRSaunders wants to merge 5 commits intoKhronosGroup:mainfrom
SRSaunders:ios-uiscene-fixes
Open

Migrate iOS app framework to required UIKit scene-based lifecycle#1503
SRSaunders wants to merge 5 commits intoKhronosGroup:mainfrom
SRSaunders:ios-uiscene-fixes

Conversation

@SRSaunders
Copy link
Copy Markdown
Contributor

@SRSaunders SRSaunders commented Mar 16, 2026

Description

Apple is requiring iOS apps to adopt their new UIKit scene-based lifecycle. iOS 26 is the final version that will support the old-style application-based lifecycle. Users of the Vulkan-Samples project on iOS and the iOS Simulator currently receive deprecation warnings that apps built with the old-style lifecycle will not run in future iOS versions.

I thought I would get a start on this before the dead end arrives and the project will not run. The attached code updates the Vulkan-Sample iOS app to adopt UIKit's SceneDelegate class and scene management concepts. This was made easier since I just completed and submitted similar changes to @SaschaWillems Vulkan examples project. The iOS app in the Vulkan-Samples project should now work without any deprecation warnings.

As a bonus, I also added UI touchscreen input to the iOS app for selection and dragging. This means you can change options in the overlay GUI, and activate camara rotation for samples.

Tested using Xcode 26.3 on macOS Sequoia 15.7.4 targetting:

iOS 18.6.2 on a real iPhone 16, and
iOS 26.2 on an iPhone 17 Pro running on iOS Simulator.

Note that I added two new files for this work: SceneDelegate.h and SceneDelegate.m. To keep things simple, I replicated the license headers from the equivalent AppDelegate files, but assigned them to me instead. I personally don't need the license to refer to me, and am happy to attribute to Holochip if that's acceptable. I hope @gpx1000 is okay with this.

General Checklist:

Please ensure the following points are checked:

  • My code follows the coding style
  • I have reviewed file licenses
  • I have commented any added functions (in line with Doxygen)
  • I have commented any code that could be hard to understand
  • My changes do not add any new compiler warnings
  • My changes do not add any new validation layer errors or warnings
  • I have used existing framework/helper functions where possible
  • My changes do not add any regressions
  • I have tested every sample to ensure everything runs correctly
  • This PR describes the scope and expected impact of the changes I am making

Note: The Samples CI runs a number of checks including:

  • I have updated the header Copyright to reflect the current year (CI build will fail if Copyright is out of date)
  • My changes build on Windows, Linux, macOS and Android. Otherwise I have documented any exceptions

If this PR contains framework changes:

  • I did a full batch run using the batch command line argument to make sure all samples still work properly

Sample Checklist

If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist:

  • I have tested the sample on at least one compliant Vulkan implementation
  • If the sample is vendor-specific, I have tagged it appropriately
  • I have stated on what implementation the sample has been tested so that others can test on different implementations and platforms
  • Any dependent assets have been merged and published in downstream modules
  • For new samples, I have added a paragraph with a summary to the appropriate chapter in the readme of the folder that the sample belongs to e.g. api samples readme
  • For new samples, I have added a tutorial README.md file to guide users through what they need to know to implement code using this feature. For example, see conditional_rendering
  • For new samples, I have added a link to the Antora navigation so that the sample will be listed at the Vulkan documentation site

@gpx1000
Copy link
Copy Markdown
Collaborator

gpx1000 commented Mar 16, 2026

@SRSaunders Please ensure the copyright points to you for the new files. I do want to ensure you get credit. In fact, are you in the contributors list in the Repo? You certainly deserve to be if you're not, please add yourself there if you aren't currently in there.

@SRSaunders
Copy link
Copy Markdown
Contributor Author

Thanks @gpx1000 for the vote of support, I will change the copyright on those two files.

I think I am already in the contributors list. At least I see my githib id on the front page in the Contributors area.

@gpx1000
Copy link
Copy Markdown
Collaborator

gpx1000 commented Mar 16, 2026

I'll check if we want to update the CONTRIBUTORS.md to have the core contributors so it's an updated list of those that support this project. I think given how much you've done, you definitely qualify. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants