I have no iOS device so I can't test the app, but it looks nice.
Thank you
Even though the concept was simple it still took a bit of work.
Since there are only very few people who have done iOS development with SFML, it might be interesting if you could talk a bit about how you did it.
Compiling SFML and Setting up the EnvironmentSure, I'd love to.
Note: I do not currently have access to the Mac the game was developed on. So if I do not give exact instructions in XCode, this is why.Setting up the environment was honestly the hard part. Like you said, very few people actually develop iOS apps with SFML, so finding a tutorial on how to actually set it up was impossible. I built and compiled SFML like the old tutorial (
http://en.sfml-dev.org/forums/index.php?topic=13716.0) shows how. Around this time things started getting tricky. I could not include the SFML include files, I added the path to them in XCodes "User Defined Header Paths" section and to the "Header Paths" section to no avail. I eventually investigated the predefined location in "Header Paths" but the path was no existent, I created it and dragged the SFML include file it. This fixed the problem. After successfully getting SFML to include and link, I decided to give my app a test run, sadly this lead to even more errors (
http://en.sfml-dev.org/forums/index.php?topic=18323.0). These errors were because I didn't link to the iOS libraries required by SFML, sadly a list of these is no where to be found. To fix this problem I simply dug around in the SFML source, each of the main source directories (i.e. "...\SFML\Graphics\" or "...\SFML\Window\") has a CMakeList.txt file. In these files you can find the dependencies for each system. The required iOS frameworks are:
Foundation
UIKit
CoreGraphics
QuartzCore
CoreMotion
When building an iOS app it is mandatory to include these. After finally getting that all sorted out I started writing the code and again decided to give it a test run. This time libJpeg was giving me problems. I'm not entirely sure how it was built, but when I tried to run my app it was telling me it was built using different architectures. I simply downloaded the libJpeg source (
http://www.ijg.org/files/) and rebuilt it with the architectures I was using. After this it was smooth sailing for awhile. Everything ran on the simulator no errors, not even a warning. Then I tried to build on a device. Apple seems to enjoy watching developers suffer, I did some searching online and eventually found that in order for my app to work on a device I needed to build the SFML source for simulator and device. After building it for both I needed to combine the outputs and create what is known as a "Fat" library, to accomplish this there was a terminal command like so
lipo -create lib-sfml-graphics-device.a lib-sfml-graphics-sim.a -output lib-sfml-graphics-s.a
. Do so with each library eventually worked and my app worked great on devices.
*Skip forward a bit*
The code was now complete and worked perfectly, by now I was used to XCode and knew that I needed to build the app in archive format, verify it in XCode a few times, navigate to the directory where a stored my archive and upload it to iTunesConnect.
My Experience with AppleWorking with Apple isn't easy, they are very thorough with anything that makes it onto their stores. A quick read through the iOS review guidelines (
https://developer.apple.com/app-store/review/guidelines/) will show you what I mean. That's not including the iOS Human Interface Guidelines (
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/) or the... well you get the point. Anyways, after uploading the app to iTunesConnect I was able to allow friends and family test the app using Apples TestFlight beta. Several builds later I was finally ready to submit the app. I submitted the app for the first time, less than two days later one of my testers informs me of a bug he had found. I fixed the bug, and added a few things we planned to wait on, but decided it was better to add in the initial release. After uploading the new build to iTunesConnect I was distraught when I found that I was not simply allowed to update the app currently in review. I needed to take it out of review and submit the new one, making the previous 2 days worthless. Ten days later I received word from Apple. My app had been rejected because the screenshots did not show the app in action. Again, disappointed that my previous time had gone to waste I immediately took screenshots of everything. I mean everything. I uploaded them and again submitted my app. This time I only needed to wait 7 days to here from Apple. My app had finally been accepted and was ready to hit the store.
What's Next?With no longer having access to a Mac, my only option for updating the game, and my plans for future games, is to find a way to develop apps on my PC. Preferably Visual Studios, considering it is the compiler I am used to. After some searching I was disappointed to find no solution that allowed me to continue development in C++. I would need to learn C# if anyone here started with C++ then took a look at C# you know it is very foreign (I mean, why is everything in a class? Seriously?) but that is a discussion for another time. I am using Xamarin, a Visual Studios plugin for iOS, Android and windows phone development, it is only available with C#, luckily SFML has a dotNet binding. I will be setting everything up later today or tomorrow, and will report back with my findings. I also plan to incorporate Thor, I started to mess with it just after this project was uploaded, and I must say it is a very nice addition to SFML.
Thank you to the SFML forums for all your support.