Trying to find any info about building Erlang like static library for iOS/Android. Is there any? The global goal is attempt to write mobile client for iOS/Android with Qt/QML/C++. My second field of expertise, beside of Erlang - developing mobile application for iOS/Android with Qt/QML/C++. There are small channel on Youtube created by me with Qt examples for mobile.
The global case for it is using mobile phone for interacting with Erlang nodes. For implementing it with Qt/QML/C++ Erlang has to be built like static library for iOS/Android.
Maybe not exactly what you’re looking for, but Erlang runs in Termux. Erlang/OTP is available as a binary package for Android, no assembly required.
From what I know, running any interpreter except Safari JavaScript on iOS is totally verboten due to totalitarian nature of the company behind this OS. Android is catching up on the whole freedom hating front, but it’s not quite there yet.
the elixir-desktop/runtimes are maybe little bit too old for the new requirements from Google. All new apps since 1. Nov. 2025 in the Play Store must be 16 kb page size compatible - https://developer.android.com/guide/practices/page-sizes - I don´t know if this is currently up to date, because I am compiling it for Android on my self.
for Android I am using a compiled erlang version on my Linux Server with the Android NDK. On iOS I am compiling it with Xcode Command Line Tools and creating finally a liberlang.a file.
Are you intend to use OpenSSL / Crypto in Erlang for Android / iOS - it belongs to build Android / iOS Version for OpenSSL and Erlang?
e.g. compiling without SSL on Mac for iOS:
compile_erlang.sh
#!/bin/bash
set -xeuo pipefail
(
./otp_build configure
–prefix=$(pwd)/\_build/ios64
–xcomp-conf=./xcomp/erl-xcomp-arm64-ios.conf
–without-ssl
./otp_build boot -a
./otp_build release -a
)
Usually using precompiled OpenSSL linked like static library for mobile development. Already have template CMake project within precompiled OpenSSL that needs to be just linked for iOS/Android. Using OpenSSL 3.5 LTS. Always trying to use LTS version for any kind of application.
To use liberlang.a no any requirements to wrap it into .xcframework. It’s only more comfortable to use it in Xcode in .cxframework. If you developing C/C++ application for iOS no need to wrap it out. Attach it directly to CMake/make.
Why is libz.a required? By default libz included in iOS. Should it be added additionally?
SUPER-MEGA-HUGE thanks for assistance. You made it clear for me. At least the global direction.
Will try to build it in a few days. The example Qt/QML/C++ application within Erlang going to publish on Github.
Do you know any published C/C++ examples of how to interact with Erlang node from C/C++ application?
I think the development environment is the difference to pack all in Xcode in the cxframework + liberlang.a Currently the other details I can’t answer, because I am using Embarcadero RAD Studio (Pascal Code) and therefore it is necessary to add liberlang.a
On the Android side, here is a project showing how to include an Erlang / OTP runtime within an Android project, using the Erlang Jinterface package. It also includes the build mechanism to make the right files executables, which is not trivial on Android:
And to build Erlang for Android, the official instructions are found in the Erlang official repository. Here is a repository where I had stored some build runs a while ago: