Search code examples
c++iosobjective-csdl

Universal links in iOS with C++ and SDL


I was tasked with adding support for universal links into our iOS app written in C++ with an additional complication that the app uses SDL 2 for wrapping iOS specific code (like the AppDelegate).

From my brief research SDL does not provide any API to get the url, or did I miss something ? Is there a way to get the URL from SDL without modifying SDL itself ?

If not, then at least an outline (a code snippet) of how to get the URL from Objective C to C++ would be nice, as my Objective-C knowledge is zero.


Solution

  • To answer my own question, I ended up modifying SDL and made a PR, see here: https://github.com/libsdl-org/SDL/pull/8356 If that gets through then there will be SDL_UNIVERSALLINK that gets triggered on every new URL.