31
SFML development / Re: iOS development progress
« on: February 17, 2018, 03:39:23 pm »
I've removed ARM 32 bits support, added an option to choose the iOS deployment target and made sure iOS static libs are found first, even if "matching" frameworks are installed in /Library/Frameworks.
Changes are still visible at https://github.com/Ceylo/SFML/compare/feature/CMakeTargetExport...Ceylo:feature/iOSCompilation
Also the crashes when launching examples in the simulator look to be related to code signing / bundle identifier. After setting them and doing clean/rebuild it launches correctly in simulator.
For now I could launch both the "window" and "opengl" example in simulator and real iOS device, but the display remains full black without any errors in logs. And pausing the app shows a normal running event loop.
Also I couldn't build the pong example because the freetype static lib wasn't built with bitcode enabled. I guess there'll be the same issue with the flac, ogg and vorbis static libs. According to Apple documentation, bitcode is optional when building for iOS, but is required for tvOS and watchOS. Also even for iOS it is enabled by default, so it feels like it will be much simpler if we stick with their default. I have no idea how iOS dependencies were previously built though. If we go with rebuilding them, we should also take this occasion to lower the iOS deployment target (currently 10.2) as I don't see any reason not to support iOS 9 for example.
Edit: I fixed CMake code to always the bundle identifier on examples so no more IDE crash. Also did half of the work for code signing to ease building for real devices. I say half because Xcode looks to automate some parts when a developer chooses a "Development Team" and I don't know how to do that with CMake.
Changes are still visible at https://github.com/Ceylo/SFML/compare/feature/CMakeTargetExport...Ceylo:feature/iOSCompilation
Also the crashes when launching examples in the simulator look to be related to code signing / bundle identifier. After setting them and doing clean/rebuild it launches correctly in simulator.
For now I could launch both the "window" and "opengl" example in simulator and real iOS device, but the display remains full black without any errors in logs. And pausing the app shows a normal running event loop.
Also I couldn't build the pong example because the freetype static lib wasn't built with bitcode enabled. I guess there'll be the same issue with the flac, ogg and vorbis static libs. According to Apple documentation, bitcode is optional when building for iOS, but is required for tvOS and watchOS. Also even for iOS it is enabled by default, so it feels like it will be much simpler if we stick with their default. I have no idea how iOS dependencies were previously built though. If we go with rebuilding them, we should also take this occasion to lower the iOS deployment target (currently 10.2) as I don't see any reason not to support iOS 9 for example.
Edit: I fixed CMake code to always the bundle identifier on examples so no more IDE crash. Also did half of the work for code signing to ease building for real devices. I say half because Xcode looks to automate some parts when a developer chooses a "Development Team" and I don't know how to do that with CMake.