iOS 17.2 Simulator: black screen/crash fixed by rebuilding SDL2; doc & scripts inside -- (iOS 17.5 Simulator still problematic) #62
Replies: 1 comment
-
|
TL;DR (Kivy on iOS 17.x Simulator)
Quick checklist
Gists (Scripts/Recipes)
Status iOS 17.5 Simulator
Note
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
iOS 17.x Simulator (15.4 toolchain): black screen / launch exit — fixed by rebuilding SDL2 and adjusting build flags (docs + scripts inside)
TL;DR
On a clean macOS 14.7.6 + Xcode 15.4 host (MacStadium M2), a pure Kivy “Hello World” app:
OTHER_CFLAGS="-Umain -DSDL_MAIN_HANDLED"fromxcodebuildflags.iOS 17.2 runtime is stable; 17.5 still shows flaky simulator behavior (OpenGL ES/EAGL path).
Full write-up + scripts below.
Environment
cce9545Symptoms
OTHER_CFLAGS="-Umain -DSDL_MAIN_HANDLED"the app crashes with:What fixed it
kivy-iosrecipe, and ensure:OTHER_CFLAGS="-Umain -DSDL_MAIN_HANDLED"fromxcodebuildflags.Repro (minimal)
Label, setWindow.clearcolor=(0.2,0.6,0.9,1).kivy-iostoolchain, thenxcodebuildforiphonesimulator:OTHER_CFLAGS="-Umain -DSDL_MAIN_HANDLED".OTHER_LDFLAGS(static libs),EXCLUDED_ARCHS="i386 x86_64", etc.Why removing
-Umain -DSDL_MAIN_HANDLEDmattersThat flag combo overrides SDL’s main wiring and triggers the SDL_main error path on iOS simulator with Kivy. Removing it allowed SDL/Kivy bootstrap to proceed normally.
Scripts & docs (ready to use)
ReadMe__Kivy_iOS17_Simulator_Fixes_and_goldenPath.md
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-ReadMe__Kivy_iOS17_Simulator_Fixes_and_goldenPath-md
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/ReadMe__Kivy_iOS17_Simulator_Fixes_and_Workflow.md
sdl2_recipe__init__patched__rgba8_fix.py
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-sdl2_recipe__init__patched__rgba8_fix-py
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/sdl2_recipe__init__patched__rgba8_fix.py
python3_recipe__init__patched__preserve_libpython.py
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-python3_recipe__init__patched__preserve_libpython-py
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/python3_recipe__init__patched__preserve_libpython.py
sdl2_patch_verify.sh
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-sdl2_patch_verify-sh
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/sdl2_patch_verify.sh
simulator_device_UDID_and_Setup.sh
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-simulator_device_UDID_and_Setup-sh
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/simulator_device_UDID_and_Setup.sh
simulator_device_list_clean.sh
View: https://gist.github.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d#file-simulator_device_list_clean-sh
Raw : https://gist.githubusercontent.com/wolfgang-coder/7e88636fb3f19b492d565e982575939d/raw/simulator_device_list_clean.sh
Open questions / feedback wanted
kivy-iosstill ship or prefer prebuilt SDL2 artifacts in some flows that could mismatch with Xcode 15.4/SDK 17.x?Thanks a lot for maintaining
kivy-ios! Happy to A/B test patches or provide additional logs if helpful.Beta Was this translation helpful? Give feedback.
All reactions