Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: IOS support?  (Read 4358 times)

0 Members and 1 Guest are viewing this topic.

anttton

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • Email
IOS support?
« on: March 19, 2017, 08:47:37 pm »
Hello, I have started to think about to create a mobile game. I have read some old posts from 2013 and noticed that sfml had started to working on the ios function. I dont get it but have the sfml team fix so you can start to develop game to the ios?

sjaustirni

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: IOS support?
« Reply #1 on: March 19, 2017, 09:42:45 pm »
There's currently no one on the team who would take care of the iOS support and development. The former one quit some time ago.

wqking

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: IOS support?
« Reply #2 on: March 25, 2017, 06:33:41 am »
There's currently no one on the team who would take care of the iOS support and development. The former one quit some time ago.
I believe that will drive a lot of users away, include me.
Nowadays any game engines, especially 2D game engines (I know SFML is "multi media library"...), that not support mobile well, are not interesting.

sjaustirni

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: IOS support?
« Reply #3 on: March 25, 2017, 09:54:10 am »
Understandably. However, the iOS support is not present not because SFML team doesn't want to support it, but because of much more pragmatic reason - there's no one to do it. SFML is an open-source project though, so free feel to help it out there, if you will.

irrdev

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: IOS support?
« Reply #4 on: April 16, 2017, 09:46:12 pm »
I asked this very question in January and nobody responded... I was/am looking for a 2d graphics library, too, and iOS support is essential.

So I downloaded the source code for SFML and spent a few hours figuring it out. Long and short of it is: I got it working on iOS! But I really haven't tested it much.

Attached is a screenshot of SFML running in the iOS simulator as I type this, with sound working too! (the picture doesn't fill the screen because it is too small)

I haven't had time since then to document what I did to get it working. The amount of code I changed is tiny, actually: there are really three problems that I encountered and had to fix:
  • Code modification: SFML for iOS tries to use some crazy linking to allow int main() OR int main(int, char**) as the starting point of your app. It doesn't work. I removed the linking stuff and set int main(int, char**) as the only possible starting function and it works great! Of course, all those command line arguments are useless on iOS, but who cares? The relevant files to look at are SFMain.hpp, SFMain.mm, and SFAppDelegate.mm, all in the sfml-window/ios folder! Once you look at it, it's obvious what the problem is.
  • In order to compile the SFML library for iOS, I had to grab libjpeg.a from online - the file that is included with the repo refuses to link for the simulator. I think I grabbed libturbojpeg.a from this link and just renamed it libjpeg.a and it worked!
  • Setup all your linking flags correctly for the iOS SFML app to include all the core Frameworks (NOTE: I probably included more than I needed to!): OpenAL, AVFoundation, GameController, CoreMotion, AudioToolbox, QuartzCore, OpenGLES, CoreGraphics, UIKit, Foundation and CoreAudio

I've been meaning to fork the the SFML repo and document all of this, but haven't had time (and probably won't for a few more weeks).
« Last Edit: April 16, 2017, 09:51:32 pm by irrdev »

willm127

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: IOS support?
« Reply #5 on: April 26, 2017, 04:16:37 pm »
Awesome! Good job finding that! I'll have to give it a try, and see if I can get some documentation going once it runs on my end.


Sent from my iPhone using Tapatalk

 

anything