[Apple embedded] Adopt SwiftUI lifecycle for Apple embedded platforms

- Introduces a SCons builder for Swift files
- Increases the minimum deployment targets to iOS 14.0, and visionOS 26.0.
- Replaces manually UIWindow management by a SwiftUI instantiated app.
This commit is contained in:
Ricardo Sanchez-Saez
2025-08-25 15:51:20 -07:00
parent 3bf0f771ee
commit 038f5934e7
29 changed files with 346 additions and 196 deletions

View File

@ -37,28 +37,14 @@
#import <UIKit/UIKit.h>
#include <cstdio>
int gargc;
char **gargv;
static OS_IOS *os = nullptr;
int main(int argc, char *argv[]) {
int apple_embedded_main(int argc, char **argv) {
#if defined(VULKAN_ENABLED)
//MoltenVK - enable full component swizzling support
setenv("MVK_CONFIG_FULL_IMAGE_VIEW_SWIZZLE", "1", 1);
#endif
gargc = argc;
gargv = argv;
@autoreleasepool {
NSString *className = NSStringFromClass([GDTApplicationDelegate class]);
UIApplicationMain(argc, argv, nil, className);
}
return 0;
}
int apple_embedded_main(int argc, char **argv) {
change_to_launch_dir(argv);
os = new OS_IOS();