Include an OpenFL game inside an existing iOS app

Hey guys, I wanted to know if it is easily doable to add an OpenFL game inside an iOS app written in Objective-C?

Could I add easily the OpenFL libs/project to my existing Xcode file without trouble?

The idea is to include several mini-games inside existing native apps (iOS and Android).

NME has done this before:

If there is interest, I’m sure it would be possible to support something similar.

Of course, you can use HTML5 to do this, but the performance is not great. Curious about the use-case, do you need to combine multiple titles under the same app (like it could all be OpenFL), or is the parent application (by design/necessity) external?

Do the mini-games need to be downloaded, or will everything be packaged at once?

Thanks for the links, that’s interesting.

Everything will be packaged inside the same app. Unfortunately the “parent” application is quite big, made with Objective-C inside Xcode. I’m not sure that the client would pay again to redevelop the same app.

Can it all be bundled at once, or does it need to download games on the fly?

Bundled together once. If a new game is added, the whole app will be updated via store.

Okay, that definitely makes it easier (otherwise there’s the Apple restrictions on scripting languages to contend with)

I would take a little time to see if the NME iOS/Android view works. Then we could figure the rest of it out from there

Awesome, thanks Joshua!

I know it’s a bit old but is it possible today? Is there something build in openfl to do this? I want to make a demo of haxe in my new company. Make a simple game and integrate it in our existing ( big) native projects (ios, android and web)
I hope it’s possible!!!

The easiest way would be the HTML5 target, then embed using a WebView, probably.

It is technically possible to embed a native application instead, but this would require some tinkering with SDL, which we use for iOS windows. Here’s someone who was doing the same:

There may be other options I’m not thinking of, and happy to help if we wanted to find a third option. With Haxe, a lot of things are possible