iOS Xcode archiving fails when trying to link against SDLUIKitDelegate symbol

My Xcode project is set up based on the recommended doc: My App’s Xcode project contains the SDL2 Xcode source project as a subproject. It builds the SDL2.framework for iOS, and I use that as the reference framework for my App.

I created a new ObjC class extension in my project for SDLUIKitDelegate for me to add in some third-party frameworks through the applicationWillFinishLaunching method.

I build and debug on the device and simulator, and the app runs fine and calls the applicationWillFinishLaunching method, but when I get to archive, I get the following error:

ld: Undefined symbols:
  _OBJC_CLASS_$_SDLUIKitDelegate, referenced from:
      __OBJC_$_CATEGORY_SDLUIKitDelegate_$_MyExtension in SDLUIKitDelegate_MyExtension.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Looking at the SDL.framework build settings, some optimizations in the release build may strip out the symbol _OBJC_CLASS_$_SDLUIKitDelegate. But I’m not sure how to keep it for my app.

Does anyone have ideas on what can be done to resolve this?