ctreffs/SwiftSDL2

Can't start an iosApp

Opened this issue · 1 comments

Bug Description

I just created a new project, added the SDL Dependency, created the main.swift file, and when launching the app I get this error

sdlenginetest/main.swift:5: Fatal error: SDL could not initialize! SDL_Error: Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?

I'm using the minimal example you provide

Information

  • Package version: 1.4.1
  • Platform version: mac/ios
  • Swift version: swift-driver version: 1.87.1 Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)
    Target: x86_64-apple-macosx14.0

Checklist

  • If possible, I've reproduced the issue using the main/master branch of this package.
  • I've searched for existing issues under the issues tab.
  • The bug is reproducible

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a new XCode project (single app)
  2. Add the package dependency
  3. Copy the minimal example to main.swift file (create the new main file)
  4. comment out the appdelegate
  5. run the app

Expected behavior

To not crash

Actual behavior

Crash with the following error

sdlenginetest/main.swift:5: Fatal error: SDL could not initialize! SDL_Error: Application didn't initialize properly, did you include SDL_main.h in the file containing your main() function?

I'm getting the same thing!
image