Cross-platform programming is the practice of deliberately writing software to work on more than one platform.
Approaches There are different ways to write a cross-platform application. One approach is to create multiple versions of the same software in different
source trees—in other words, the Microsoft Windows version of an application might have one set of source code files and the
Macintosh version another, while a
FOSS *nix system might have a third. While this is straightforward, compared to developing for only one platform it can cost much more to pay a larger team or release products more slowly. It can also result in more bugs to be tracked and fixed. Another approach is to use software that hides the differences between the platforms. This
abstraction layer insulates the application from the platform. Such applications are
platform agnostic. Applications that run on the JVM are built this way. Some applications mix various methods of cross-platform programming to create the final application. An example is the Firefox web browser, which uses abstraction to build some of the lower-level components, with separate source subtrees for implementing platform-specific features (like the GUI), and the implementation of more than one scripting language to ease
software portability. Firefox implements
XUL,
CSS and JavaScript for extending the browser, in addition to classic
Netscape-style browser plugins. Much of the browser itself is written in XUL, CSS, and JavaScript.
Toolkits and environments There are many tools available to help the process of cross-platform programming: •
8th: a development language which utilizes
Juce as its GUI layer. It currently supports Android, iOS, Windows, macOS, Linux and Raspberry Pi. •
Anant Computing: A mobile application platform that works in all Indian languages, including their keyboards, and also supports AppWallet and native performance in all OSs. •
AppearIQ: a framework that supports the workflow of app development and deployment in an enterprise environment. Natively developed containers present hardware features of the mobile devices or tablets through an API to HTML5 code thus facilitating the development of mobile apps that run on different platforms. •
Boden: a UI framework written in C++. •
Cairo: a
free software library used to provide a vector graphics-based, device-independent API. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is written in C and has bindings for many programming languages. •
Cocos2d: an open-source toolkit and game engine for developing 2D and simple 3D cross-platform games and applications. •
Codename One: an open-source Write Once Run Anywhere (WORA) framework for Java and Kotlin developers. •
Delphi: an IDE which uses a Pascal-based language for development. It supports Android, iOS, Windows, macOS, Linux. •
Ecere SDK: a GUI and 2D/3D graphics toolkit and IDE, written in eC and with support for additional languages such as C and Python. It supports Linux, FreeBSD, Windows, Android, macOS and the Web through Emscripten or (WebAssembly). •
Eclipse: an open-source development environment. Implemented in Java with a configurable architecture which supports many tools for software development. Add-ons are available for several languages, including Java and C++. •
FLTK: an open-source toolkit, but more lightweight because it restricts itself to the GUI. •
Flutter: A cross-platform UI framework for IOS, Android, Mac, Windows and developed by
Google. •
fpGUI: An open-source widget toolkit that is completely implemented in Object Pascal. It currently supports Linux, Windows and a bit of Windows CE. •
GeneXus: A Windows rapid software development solution for cross-platform application creation and deployment based on
knowledge representation and supporting
C#,
COBOL,
Java including Android and BlackBerry smart devices,
Objective-C for
Apple mobile devices,
RPG,
Ruby,
Visual Basic, and
Visual FoxPro. •
GLBasic: A BASIC dialect and compiler that generates C++ code. It includes cross compilers for many platforms and supports numerous platform (Windows, Mac, Linux, Android, iOS and some exotic handhelds). •
Godot: an SDK which uses Godot Engine. •
GTK+: An open-source widget toolkit for Unix-like systems with X11 and Microsoft Windows. •
Haxe: An open-source language. •
Juce: An application framework written in C++, used to write native software on numerous systems (Microsoft Windows, POSIX, macOS), with no change to the code. •
Kivy: an open-source cross-platform UI framework written in
Python. It supports
Android,
iOS,
Linux,
OS X,
Windows and
Raspberry Pi. •
LEADTOOLS: Cross-platform SDK libraries to integrate recognition, document, medical, imaging, and multimedia technologies into Windows, iOS, macOS, Android, Linux and web applications. •
LiveCode: a commercial cross-platform rapid application development language inspired by HyperTalk. •
Lazarus: A programming environment for the FreePascal Compiler. It supports the creation of self-standing graphical and console applications and runs on Linux, MacOSX, iOS, Android, WinCE, Windows and WEB. •
Max/MSP: A
visual programming language that encapsulates platform-independent code with a platform-specific runtime environment into applications for macOS and Windows A cross-platform Android runtime. It allows unmodified Android apps to run natively on iOS and macOS •
Mendix: a cloud-based low-code application development platform. •
MonoCross: an open-source
model–view–controller design pattern where the model and controller are cross-platform but the view is platform-specific. •
Mono: An open-source cross-platform version of
Microsoft .NET (a framework for applications and programming languages) •
MoSync: an open-source SDK for mobile platform app development in the C++ family. •
Mozilla application framework: an open-source platform for building macOS, Windows and Linux applications. •
OpenGL: a 3D graphics library. •
Pixel Game Maker MV: A proprietary 2D game development software for Windows for developing Windows and
Nintendo Switch games. •
PureBasic: a proprietary language and IDE for building macOS, Windows and Linux applications. • ReNative: The universal development SDK to build multi-platform projects with React Native. Includes latest iOS, tvOS, Android, Android TV, Web, Tizen TV, Tizen Watch, LG webOS, macOS/OSX, Windows, KaiOS, Firefox OS and Firefox TV platforms. •
Qt: an application framework and
widget toolkit for
Unix-like systems with
X11, Microsoft Windows, macOS, and other systems—available under both proprietary and
open-source licenses. •
Simple and Fast Multimedia Library: A multimedia C++
API that provides low and high level access to graphics, input, audio, etc. •
Simple DirectMedia Layer: an open-source multimedia library written in C that creates an abstraction over various platforms' graphics, sound, and input
APIs. It runs on OSs including Linux, Windows and macOS and is aimed at games and multimedia applications. •
Smartface: a native app development tool to create mobile applications for Android and iOS, using
WYSIWYG design editor with JavaScript code editor. •
Tcl/
Tk •
Titanium Mobile: open source cross-platform framework for Android and iOS development. •
U++: a C++ GUI framework for performance. It includes a set of libraries (GUI, SQL, etc..), and IDE. It supports Windows, macOS and Linux. •
Unity: Another cross-platform SDK which uses Unity Engine. •
Uno Platform: Windows, macOS, iOS, Android, WebAssembly and Linux using C#. •
Unreal: A cross-platform SDK which uses Unreal Engine. •
V-Play Engine: V-Play is a cross-platform development SDK based on the popular Qt framework. V-Play apps and games are created within Qt Creator. •
WaveMaker: A low-code development tool to create responsive web and hybrid mobile (Android & iOS) applications. •
WinDev: an Integrated Development Environment for Windows, Linux, .Net and Java, and web browers. Optimized for business and industrial applications. •
wxWidgets: an open-source widget toolkit that is also an
application framework. It runs on
Unix-like systems with
X11, Microsoft Windows and macOS. •
Xojo: a RAD IDE that uses an object-oriented programming language to compile desktop, web and iOS apps. Xojo supports natively compiling to Windows, macOS, iOS and Linux, and can also create compiled web apps that are able to be run as standalone servers or through CGI. ==Challenges==