Compare commits

...

8 Commits

Author SHA1 Message Date
mafiesto4 00e4b09e7e Migrate to a new LFS server
Build Android / Game (Android, Release ARM64) (push) Has been cancelled
Build iOS / Game (iOS, Release ARM64) (push) Has been cancelled
Build Linux / Editor (Linux, Development x64) (push) Has been cancelled
Build Linux / Game (Linux, Release x64) (push) Has been cancelled
Build macOS / Editor (Mac, Development ARM64) (push) Has been cancelled
Build macOS / Game (Mac, Release ARM64) (push) Has been cancelled
Build Windows / Editor (Windows, Development x64) (push) Has been cancelled
Build Windows / Game (Windows, Release x64) (push) Has been cancelled
Cooker / Cook (Mac) (push) Has been cancelled
Tests / Tests (Linux) (push) Has been cancelled
Tests / Tests (Windows) (push) Has been cancelled
2026-05-17 11:53:08 +02:00
mafiesto4 ec73cc6b0d Merge branch '1.12' 2026-05-14 15:32:53 +02:00
mafiesto4 5058bfc296 Merge remote-tracking branch 'origin/1.12' into 1.12 2026-05-13 22:40:54 +02:00
mafiesto4 f83488355d Fix new UIScene flow on the latest iOS 2026-05-13 22:33:31 +02:00
mafiesto4 dcccc4687d Fix swapchain creation on the latest iOS to run on UI thread 2026-05-11 22:27:21 +02:00
mafiesto4 834cb94110 Fix loading engine managed assembly on iOS regression 2026-05-11 21:35:27 +02:00
mafiesto4 4ce06c8242 Update iOS to work on the latest devices with iOS 26 2026-05-09 22:32:21 +02:00
mafiesto4 7289baae48 Fix iOS game app SDK target to match libs 2026-05-09 13:45:31 +02:00
7 changed files with 128 additions and 12 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# Redirect to our own Git LFS server # Redirect to our own Git LFS server
[lfs] [lfs]
url="https://gitlab.flaxengine.com/flax/flaxengine.git/info/lfs" url="https://git.flaxengine.com/flax/flaxengine.git/info/lfs"
locksverify = false locksverify = false
@@ -401,7 +401,15 @@ bool GPUSwapChainVulkan::CreateSwapChain(int32 width, int32 height)
VkBool32 supportsPresent; VkBool32 supportsPresent;
VALIDATE_VULKAN_RESULT(vkGetPhysicalDeviceSurfaceSupportKHR(gpu, _device->PresentQueue->GetFamilyIndex(), _surface, &supportsPresent)); VALIDATE_VULKAN_RESULT(vkGetPhysicalDeviceSurfaceSupportKHR(gpu, _device->PresentQueue->GetFamilyIndex(), _surface, &supportsPresent));
ASSERT(supportsPresent); ASSERT(supportsPresent);
#if PLATFORM_IOS
Function<void()> func = [this, &device, &swapChainInfo]()
{
VALIDATE_VULKAN_RESULT(vkCreateSwapchainKHR(device, &swapChainInfo, nullptr, &_swapChain));
};
iOSPlatform::RunOnUIThread(func, true);
#else
VALIDATE_VULKAN_RESULT(vkCreateSwapchainKHR(device, &swapChainInfo, nullptr, &_swapChain)); VALIDATE_VULKAN_RESULT(vkCreateSwapchainKHR(device, &swapChainInfo, nullptr, &_swapChain));
#endif
// Cache data // Cache data
_width = width; _width = width;
+1 -1
View File
@@ -23,7 +23,7 @@ FLAXENGINE_API
@end @end
FLAXENGINE_API FLAXENGINE_API
@interface FlaxAppDelegate : UIResponder <UIApplicationDelegate> @interface FlaxAppDelegate : UIResponder <UIApplicationDelegate, UIWindowSceneDelegate>
@property(strong, retain, nonatomic) UIWindow* window; @property(strong, retain, nonatomic) UIWindow* window;
@property(strong, retain, nonatomic) FlaxViewController* viewController; @property(strong, retain, nonatomic) FlaxViewController* viewController;
+77 -5
View File
@@ -248,11 +248,13 @@ MessagePipeline MainThreadPipeline;
UIThreadPipeline.Run(); UIThreadPipeline.Run();
} }
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions - (void)scene:(UIScene*)scene willConnectToSession:(UISceneSession*)session options:(UISceneConnectionOptions*)connectionOptions
{ {
//LOG(Info, "[iOS] willConnectToSession");
// Create window // Create window
CGRect frame = [[UIScreen mainScreen] bounds]; CGRect frame = [[UIScreen mainScreen] bounds];
self.window = [[UIWindow alloc] initWithFrame:frame]; self.window = [[UIWindow alloc] initWithWindowScene:(UIWindowScene*)scene];
// Create view // Create view
self.view = [[FlaxView alloc] initWithFrame:frame]; self.view = [[FlaxView alloc] initWithFrame:frame];
@@ -271,10 +273,80 @@ MessagePipeline MainThreadPipeline;
[self.viewController setNeedsStatusBarAppearanceUpdate]; [self.viewController setNeedsStatusBarAppearanceUpdate];
MainViewController = self.viewController; MainViewController = self.viewController;
// Create navigation controller // Link controller and show window
UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:self.viewController]; self.window.rootViewController = MainViewController;
[self.window setRootViewController:navController];
[self.window makeKeyAndVisible]; [self.window makeKeyAndVisible];
}
- (UISceneConfiguration*)application:(UIApplication*)application configurationForConnectingSceneSession:(UISceneSession*)connectingSceneSession options:(UISceneConnectionOptions*)options API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] configurationForConnectingSceneSession");
UISceneConfiguration* config = [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
config.delegateClass = [FlaxAppDelegate class];
return config;
}
- (void)application:(UIApplication*)application didDiscardSceneSessions:(NSSet<UISceneSession*>*)sceneSessions API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] didDiscardSceneSessions");
}
- (void)sceneDidDisconnect:(UIScene*)scene API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] sceneDidDisconnect");
}
- (void)sceneDidBecomeActive:(UIScene*)scene API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] sceneDidBecomeActive");
// Focus app
HasFocus = true;
if (MainWindow)
{
Function<void()> func = []()
{
MainWindow->OnGotFocus();
};
iOSPlatform::RunOnMainThread(func);
}
}
- (void)sceneWillResignActive:(UIScene*)scene API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] sceneWillResignActive");
// Defocus app
HasFocus = false;
if (MainWindow)
{
Function<void()> func = []()
{
MainWindow->OnLostFocus();
};
iOSPlatform::RunOnMainThread(func);
}
}
- (void)sceneDidEnterBackground:(UIScene*)scene API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] sceneDidEnterBackground");
// Pause
IsPaused = true;
}
- (void)sceneWillEnterForeground:(UIScene*)scene API_AVAILABLE(ios(13.0), tvos(13.0), visionos(1.0))
{
LOG(Info, "[iOS] sceneDidEnterBackground");
// Resume
IsPaused = false;
}
- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
//LOG(Info, "[iOS] didFinishLaunchingWithOptions");
// Create UI thread update callback // Create UI thread update callback
self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(UIThreadMain)]; self.displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(UIThreadMain)];
+14 -1
View File
@@ -2083,10 +2083,23 @@ static MonoAssembly* OnMonoAssemblyLoad(const char* aname)
LOG(Info, "Loading C# assembly from path = {0}, exist = {1}", path, FileSystem::FileExists(path)); LOG(Info, "Loading C# assembly from path = {0}, exist = {1}", path, FileSystem::FileExists(path));
#endif #endif
MonoAssembly* assembly = nullptr; MonoAssembly* assembly = nullptr;
MonoImageOpenStatus status = MONO_IMAGE_IMAGE_INVALID;
if (FileSystem::FileExists(path)) if (FileSystem::FileExists(path))
{ {
StringAnsi pathAnsi(path); StringAnsi pathAnsi(path);
assembly = mono_assembly_open(pathAnsi.Get(), nullptr); #if PLATFORM_IOS
Array<byte> data;
File::ReadAllBytes(path, data);
const auto name = path.ToStringAnsi();
const auto assemblyImage = mono_image_open_from_data_with_name(reinterpret_cast<char*>(data.Get()), data.Count(), true, &status, false, name.Get());
if (assemblyImage)
{
assembly = mono_assembly_load_from_full(assemblyImage, name.Substring(0, name.Length() - 3).Get(), &status, false);
mono_image_close(assemblyImage);
}
#else
assembly = mono_assembly_open(pathAnsi.Get(), &status);
#endif
} }
if (!assembly) if (!assembly)
{ {
@@ -223,7 +223,7 @@ ${PBXResourcesGroup}
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "${HeaderSearchPaths}"; HEADER_SEARCH_PATHS = "${HeaderSearchPaths}";
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
@@ -276,7 +276,7 @@ ${PBXResourcesGroup}
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = "${HeaderSearchPaths}"; HEADER_SEARCH_PATHS = "${HeaderSearchPaths}";
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES; MTL_FAST_MATH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@@ -293,6 +293,7 @@ ${PBXResourcesGroup}
CURRENT_PROJECT_VERSION = ${AppVersion}; CURRENT_PROJECT_VERSION = ${AppVersion};
DEVELOPMENT_TEAM = ${AppTeamId}; DEVELOPMENT_TEAM = ${AppTeamId};
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = FlaxGame/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "${ProjectName}"; INFOPLIST_KEY_CFBundleDisplayName = "${ProjectName}";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -302,7 +303,7 @@ ${PBXResourcesGroup}
INFOPLIST_KEY_UIStatusBarHidden = YES; INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "${UISupportedInterfaceOrientations_iPad}"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "${UISupportedInterfaceOrientations_iPad}";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "${UISupportedInterfaceOrientations_iPhone}"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "${UISupportedInterfaceOrientations_iPhone}";
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@@ -333,6 +334,7 @@ ${PBXResourcesGroup}
CURRENT_PROJECT_VERSION = ${AppVersion}; CURRENT_PROJECT_VERSION = ${AppVersion};
DEVELOPMENT_TEAM = ${AppTeamId}; DEVELOPMENT_TEAM = ${AppTeamId};
GENERATE_INFOPLIST_FILE = YES; GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = FlaxGame/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "${ProjectName}"; INFOPLIST_KEY_CFBundleDisplayName = "${ProjectName}";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games"; INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.games";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
@@ -342,7 +344,7 @@ ${PBXResourcesGroup}
INFOPLIST_KEY_UIStatusBarHidden = YES; INFOPLIST_KEY_UIStatusBarHidden = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "${UISupportedInterfaceOrientations_iPad}"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "${UISupportedInterfaceOrientations_iPad}";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "${UISupportedInterfaceOrientations_iPhone}"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "${UISupportedInterfaceOrientations_iPhone}";
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 15.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
@@ -0,0 +1,21 @@
<?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>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
</dict>
</array>
</dict>
</dict>
</dict>
</plist>