Skip to content

How to launch an SDL3 game via a launcher on iOS #13237

Open
@lsl330

Description

@lsl330

I want to implement a launcher on iOS that runs SDL3 games. I can successfully call my cpp_main function from the launcher

Cpp
#define SDL_UIKitRunApp(ARGC, ARGV, MAIN_FUNC) SDL_RunApp(ARGC, ARGV, MAIN_FUNC, NULL)
int cpp_main(int argc, char* argv[])
{
return SDL_UIKitRunApp(argc, argv, SDL_main);
}
int SDL_main(int argc, char* argv[])

"When I build the SDL3 project as a standalone game, it launches correctly. However, when I try to launch it via a Swift launcher, I get the error: Thread 1: "There can only be one UIApplication instance." After researching online, I found that launching SDL for display from a launcher is quite complex. Therefore, I'd like to ask: is there a simpler way to achieve this?"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions