iOS (experimental)

Requirements

You must have already build SFML for iOS and verified that you can run your sfml app on your device or emulator. Only then should you proceed with installing TGUI.

You will need to use CMake in order to build TGUI. You can download the latest version here.

CMake

Start by filling in the location of the source code (the TGUI folder that you downloaded) and a build directory (usually a new directory that you create inside the TGUI folder). But don't click the Configure button yet.

In order to build for iOS instead of for OS X, you must create a new entry named IOS and set it to TRUE. You do this by clicking the "Add Entry" button.

Add IOS entry

After that, you can press Configure. You will be asked to select a generator. You should select "Xcode" here.

CMake Select Generator

There are no more screenshots for the next part, so read everything extra careful.

In order to make CMake find SFML and its dependencies, you may have to set the SFML_ROOT entry to the location of your SFML folder, which contains the extlibs/libs-ios folder and provides a lib folder which directly contains the static sfml libraries (so no Debug/Release subfolder).

CMake seems to look for frameworks first. Even though it might configure fine, check to make sure that the FREETYPE_LIBRARY and the JPEG_LIBRARY are set to the .a files from the SFML_ROOT/extlibs/libs-ios folder. If they contain other values then change these entries manually.

You should now be able to click Configure and Generate without problems.

Building the library

CMake will have generated an Xcode project. Go into your build folder, open the project and build it.

XCode Build library

If all goes well, your build folder will contain a lib folder with the static tgui library in it (inside the Debug or Release subfolder).

Using TGUI

Just drag the tgui-s.a (or tgui-s-d.a) file into your project.

XCode drag framework

A screen like below will appear asking you what to do. Make sure that "Copy items if needed", "Create folder references" and your target are all checked.

XCode add framework