SFML community forums

General => General discussions => Topic started by: Static on May 02, 2025, 04:56:54 pm

Title: SFML 3, iOS toolchain?
Post by: Static on May 02, 2025, 04:56:54 pm
Hi,

there is no iOS.toolchain.cmake file anymore available with source code.

Is there one available somewhere?



 
Title: Re: SFML 3, iOS toolchain?
Post by: eXpl0it3r on May 02, 2025, 07:27:32 pm
We're utilizing the native iOS support by CMake, so the toolchain file is no longer needed.

Add -DCMAKE_SYSTEM_NAME=iOS to compile for iOS with CMake.
Title: Re: SFML 3, iOS toolchain?
Post by: Static on May 02, 2025, 10:20:56 pm
Thanks, this helped a lot to move on!

When finally trying to build a test app in Xcode 18.4 I got an error: Implicit instantiation of undefined template 'std::char_traits<unsigned int>'

ChatGPT gives an answer, but I don't know if this is the real case here:

That error —
“Implicit instantiation of undefined template ‘std::char_traits<unsigned int>’” —
means some code is trying to use std::basic_string<unsigned int>, which is not allowed because std::char_traits<unsigned int> is not defined by the standard library (libc++ doesn't support it).

This issue has come up in SFML, especially when trying to build for iOS using libc++, which is more strict than libstdc++.

Title: Re: SFML 3, iOS toolchain?
Post by: eXpl0it3r on May 03, 2025, 12:34:30 pm
This issue should have already been fixed with SFML 3: https://github.com/SFML/SFML/pull/2885

Are you sure, you're using SFML 3?

Can you provide the error and source of the error in full?