Hi,
I want to compile SFML (and the demo app) for my iPad 3 (armv7, iOS 9.3.5).
I already solved some problems and it runs on the iOS Simulator.
I use the current master branch (from today) and XCode 9.2 and macOS 10.13.3 for XCode.
I used the tutorial „SFML for iOS“ with the iOS.toolchain.cmake file for the upcoming 2.5.0 version. (I have always used the 2.5.0 description instead of the 2.4.2)
https://github.com/SFML/SFML/wiki/Tutorial:-SFML-for-iOSFirst I compile SFML and the demo app for the iOS Simulator.
It compiles but the app closed immediately.
It seams like the sfmlMain() was not called. I had included the <SFML/Main.hpp> and have the main() function and I have tried it without the <SFML/Main.hpp> and rename directly from main() to sfmlMain() instead.
I have solved the Problem by removing the libsfml-main-s.a library and instead copy the SFML/src/SFML/Main/MainiOS.mm directly to my iOS subfolder from the SFML demo app.
So the demo app run now perfect on the iOS simulator!
Next challenge is to get the demo app running on my old iPad 3.
There were several problems.
The first problem was that the SFML library was compiled for arm64 only.
$ lipo -info libsfml-graphics-s.a
input file libsfml-graphics-s.a is not a fat file
Non-fat file: libsfml-graphics-s.a is architecture: arm64
I set the iOS Deployment Target to 9.3 and try by Build Settings armv7 for Architectures and Valid Architectures. But armv7 alone doesn’t work. Compiler put an error that arm64 is not possible because only armv7 is valid…
I solved the problem by edit the architecture directly in the iOS.toolchain.cmake from arm64 to armv7.
Now I have the libs for armv7 ;-)
=== 1) Is it possible to create a fat file for armv7 and arm64 (by set both in iOS.toolchain.cmake?) ?
On the SFML demo app I also set the iOS Deployment Target to 9.3 and the arch to armv7.
And now it compiles! But I can’t install/run it on my iPad.
Unable to install “iOS”
“iOS” requires the “metal” capability which is not supported by Jürgen's iPad
It seems like the problem is from the target template iOS Game.
Because wenn I create a new iOS Game Project (without any SFML stuff) and set the iOS Deployment Target to 9.3 and try to run it on my iPad 3 I get the same error message (only the target name „iOS“ is different).
I also have tried another demo app (without sfml). It is an example with cmake (
https://github.com/leetal/ios-cmake) and this hello world example works on my iPad 3.
=== 2) Does anybody know which settings must be changed to remove the error message with „Unable to install „iOS“. „iOS“ requires the “metal” capability which is not supported by … iPad“
Best regards
And sorry for my bad English :-)