Mobile is an important part of the world around us ( we have a 3.8 billion smartphone users worldwide) - and they all use everyday mobile applications and games. But mobile has a less significant role in the Haxe ecosystem and definitely has a low adoption when it comes to native extension.
The reason for that could be :
- missing an easy way to compile to Android / iOS directly in Haxe ( maybe with some part of SDL integration in new display package);
- too many frameworks with different integration for native extension ;
- too small community;
- not many programmers work with Haxe and Java/Kotlin or Object-C/Swift.
Some time ago, there was one effort to bring many extensions in one place for different frameworks HaxeExtension ( Haxe Extensions · GitHub), but there were mostly OpenFL extensions,and not for other frameworks. Also, as you can see in the repository, there are no regular updates for the extensions.
On the other hand, @jeremyfa created one excellent tool for the automatic generation of iOS/Android bindings, but still, it is only used in Ceramic.
So I want to start an initiative for sharing more native Haxe extensions using the Bind for all frameworks - OpenFL, HaxeFixel, NME, Ceramic, and even in Heaps and Kha.
The idea here is to create an Android or an XCode project, create the binding files and write some instructions for integration.
For example for Android it may include build.gradle files, properties files, and so on.
After that, everyone can use it to integrate into the framework he uses.
Here is an example:
There is no active extension for Crashlytics . The last one ( extension-crashlytics (1.0.0)) uses Fabric SDK, which is not supported anymore. There is no updated extension, and even the old one maybe not work correctly for Android.
So, I created a separate Android project ( which can be used for tests directly in Android Studio ) and a sample project with OpenFL integration: GitHub - flashultra/ExtensionCrashlytics-Android
In the OpenFL project, you can find all the needed build.gradle files with short instructions for easy integration in any framework or copy/paste in your framework template system.
At the moment, It’s only for Android, but it can be integrated for iOS too.
The same could be done for in-app-purchase extension, push notification extension, AdMob , Facebook, Apple ID, and so on.
I think this will help anyone who wants to publish on a mobile platform and may even someday have a separate place ( at example extensions.haxe.org) for all native extensions for Haxe.