Up to date info on Xcode templates for iOS?

I’ve been trying to get a SDL project targeting iOS set up and it seems like all the docs about template creation are outdated? From the SDL source, I can compile and run demos that target my real hardware so I can confirm that SDL itself works, but then README-ios.md says “FIXME: This needs to be updated for the latest methods” and indeed seems to refer to obsolete paths, also the template itself also doesn’t seem to match the current Xcode template format (not a .xctemplate). Where do I go from there?

1 Like

I am on that same boat.

If you figure this out, please shout back!

You don’t really need a template, it’s pretty simple, especially if you’re familiar with Xcode and iOS and/or Mac development.

Just create a normal Single View app, with Objective-C as the language.

Rip out anything about AppDelegate, ViewController, and SceneController. Delete Main.storyboard. Replace main.m with your main.c if you’re porting, otherwise delete main.m and create main.c, then stick your main() function and whatever else in there.

Drop SDL2.framework in your top level source code folder (the one YourApp.xcodeproj sits in) and then have Xcode link to it. Add a new Copy Files custom build phase, set it to copy your SDL2.framework to Frameworks, with code signing turned on for it.

In the other build settings, set your supported device orientations, whether you support iPad, what the oldest iOS version you’re going to support is, etc.

It’s what I do for Mac dev with SDL2, and should work fine for iOS.

Is there any empty SDL project that can be downloaded anywhere that compiles with XCode?
I love programming but I hate bureaucracy, and things are getting crazy, filing my taxes is less of a headache.

Ripping out the stuff from the app template, copying SDL2.framework, and creating a file named main.c/main.cpp isn’t that difficult.