Withincomputing,cross-platform software (also calledmulti-platform software,platform-agnostic software, orplatform-independent software) iscomputer software that is designed to work in severalcomputing platforms.[1] Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in aninterpreted language or compiled to portablebytecode for which theinterpreters or run-time packages are common or standard components of all supported platforms.[2]
For example, a cross-platformapplication may run onLinux,macOS andMicrosoft Windows. Cross-platform software may run on many platforms, or as few as two. Some frameworks for cross-platform development areCodename One, ArkUI-X,Kivy,Qt,GTK,Flutter,NativeScript,Xamarin,Apache Cordova,Ionic, andReact Native.[3]
Platform can refer to the type of processor (CPU) or other hardware on which anoperating system (OS) orapplication runs, the type of OS, or a combination of the two.[4] An example of a common platform isAndroid which runs on theARM architecture family. Other well-known platforms areLinux/Unix,macOS andWindows, these are all cross-platform.[4] Applications can be written to depend on the features of a particular platform—either the hardware, OS, orvirtual machine (VM) it runs on. For example, theJava platform is a common VM platform which runs on many OSs and hardware types.
A hardware platform can refer to aninstruction set architecture. For example: ARM or the x86 architecture. These machines can run different operating systems.
Smartphones and tablets generally run ARM architecture, these often run Android or iOS and othermobile operating systems.
Asoftware platform can be either anoperating system (OS) orprogramming environment, though more commonly it is a combination of both. An exception isJava, which uses an OS-independentvirtual machine (VM) to executeJava bytecode. Some software platforms are:
TheJava language is typically compiled to run on a VM that is part of the Java platform. TheJava virtual machine (Java VM, JVM) is a CPU implemented in software, which runs all Java code. This enables the same code to run on all systems that implement a JVM. Java software can be executed by a hardware-basedJava processor. This is used mostly in embedded systems.
Java code running in the JVM has access to OS-related services, like diskinput/output (I/O) and network access, if the appropriate privileges are granted. The JVM makes the system calls on behalf of the Java application. This lets users to decide the appropriate protection level, depending on anaccess-control list (ACL). For example, disk and network access is usually enabled for desktop applications, but not for browser-basedapplets. TheJava Native Interface (JNI) can also be used to access OS-specific functions, with a loss of portability.
Currently, Java Standard Edition software can run on Microsoft Windows, macOS, several Unix-like OSs, and severalreal-time operating systems for embedded devices. For mobile applications, browser plugins are used for Windows and Mac based devices, and Android has built-in support for Java. There are also subsets of Java, such asJava Card orJava Platform, Micro Edition, designed for resource-constrained devices.
For software to be considered cross-platform, it must function on more than onecomputer architecture or OS. Developing such software can be a time-consuming task because different OSs have differentapplication programming interfaces (API).
Software written for one OS may not automatically work on all architectures that OS supports. Just because software is written in a popularprogramming language such asC orC++, it does not mean it will run on all OSs that support that language—or even on different versions of the same OS.
Web applications are typically described as cross-platform because, ideally, they are accessible from anyweb browser: the browser is the platform. Web applications generally employ aclient–server model, but vary widely in complexity and functionality. It can be hard to reconcile the desire for features with the need for compatibility.
Basic web applications perform all or most processing from astateless server, and pass the result to the client web browser. All user interaction with the application consists of simple exchanges of data requests and server responses. This type of application was the norm in the early phases ofWorld Wide Web application development. Such applications follow a simpletransaction model, identical to that of servingstatic web pages. Today, they are still relatively common, especially where cross-platform compatibility and simplicity are deemed more critical than advanced functionality.
Prominent examples of advanced web applications include the Web interface toGmail andGoogle Maps. Such applications routinely depend on additional features found only in the more recent versions of popular web browsers. These features includeAjax,JavaScript,Dynamic HTML,SVG, and other components ofrich web applications.
Because of the competing interests of compatibility and functionality, numerous design strategies have emerged.
Many software systems use a layered architecture where platform-dependent code is restricted to the upper- and lowermost layers.
Graceful degradation attempts to provide the same or similar functionality to all users and platforms, while diminishing that functionality to a least common denominator for more limited client browsers. For example, a user attempting to use a limited-feature browser to access Gmail may notice that Gmail switches to basic mode, with reduced functionality but still of use.
Some software is maintained in distinct codebases for different (hardware and OS) platforms, with equivalent functionality. This requires more effort to maintain the code, but can be worthwhile where the amount of platform-specific code is high.
This strategy relies on having one codebase that may be compiled to multiple platform-specific formats. One technique isconditional compilation. With this technique, code that is common to all platforms is not repeated. Blocks of code that are only relevant to certain platforms are made conditional, so that they are onlyinterpreted orcompiled when needed. Another technique is separation of functionality, which disables functionality not supported by browsers or OSs, while still delivering a complete application to the user. (See also:Separation of concerns.) This technique is used in web development where interpreted code (as in scripting languages) can query the platform it is running on to execute different blocks conditionally.[6]
Third-party libraries attempt to simplify cross-platform capability by hiding the complexities of client differentiation behind a single, unified API, at the expense ofvendor lock-in.
Responsive web design (RWD) is a Web design approach aimed at crafting the visual layout of sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices, from mobile phones to desktop computer monitors. Little or no platform-specific code is used with this technique.
Cross-platform applications need much moreintegration testing. Some web browsers prohibit installation of different versions on the same machine. There are several approaches used to target multiple platforms, but all of them result in software that requires substantial manual effort for testing and maintenance.[7] Techniques such asfull virtualization are sometimes used as a workaround for this problem.
Tools such as the Page Object Model allow cross-platform tests to be scripted so that one test case covers multiple versions of an app. If different versions have similar user interfaces, all can be tested with one test case.
Web applications are becoming increasingly popular but many computer users still use traditional application software which does not rely on a client/web-server architecture. The distinction between traditional and web applications is not always clear. Features, installation methods and architectures for web and traditional applications overlap and blur the distinction. Nevertheless, this simplifying distinction is a common and useful generalization.
Traditional application software has been distributed as binary files, especiallyexecutable files. Executables only support the platform they were built for—which means that a single cross-platform executable could be very bloated with code that never executes on a particular platform. Instead, generally there is a selection of executables, each built for one platform.
For software that is distributed as a binary executable, such as that written in C or C++, there must be asoftware build for each platform, using a toolset that translates—transcompiles—a single codebase into multiple binary executables. For example,Firefox, an open-source web browser, is available on Windows, macOS (bothPowerPC and x86 through whatApple Inc. calls aUniversal binary), Linux, and BSD on multiple computer architectures. The four platforms (in this case, Windows, macOS, Linux, and BSD) are separate executable distributions, although they come largely from the samesource code. In rare cases, executable code built for several platforms is combined into a single executable file called afat binary.
The use of different toolsets may not be enough to build a working executables for different platforms. In this case, programmers mustport the source code to the new platform. For example, an application such as Firefox, which already runs on Windows on the x86 family, can be modified and re-built to run on Linux on the x86 (and potentially other architectures) as well. The multiple versions of the code may be stored as separate codebases, or merged into one codebase.
An alternative to porting iscross-platform virtualization, where applications compiled for one platform can run on another without modification of the source code or binaries. As an example, Apple'sRosetta, which is built intoIntel-based Macintosh computers, runs applications compiled for the previous generation of Macs that used PowerPC CPUs. Another example is IBMPowerVM Lx86, which allows Linux/x86 applications to run unmodified on the Linux/Power OS.
Example of cross-platform binary software:
A script can be considered to be cross-platform if itsinterpreter is available on multiple platforms and the script only uses the facilities built into the language. For example, a script written inPython for aUnix-like system will likely run with little or no modification on Windows, because Python also runs on Windows; indeed there are many implementations (e.g.IronPython for.NET Framework). The same goes for many of theopen-sourcescripting languages.
Unlike binary executable files, the same script can be used on all computers that have software to interpret the script. This is because the script is generally stored inplain text in atext file. There may be some trivial issues, such as the representation of anew line character.
Some popular cross-platform scripting languages are:
Cross-platform or multi-platform is a term that can also apply tovideo games released on a range ofvideo game consoles. Examples of cross-platform games include:Miner 2049er,Tomb Raider: Legend,FIFA series,NHL series andMinecraft.
Each has been released across a variety of gaming platforms, such as theWii,PlayStation 3,Xbox 360,personal computers, andmobile devices.
Some platforms are harder to write for than others, requiring more time to develop the video game to the same standard. To offset this, a video game may be released on a few platforms first, then later on others. Typically, this happens when a new gaming system is released, becausevideo game developers need to acquaint themselves with its hardware and software.
Some games may not be cross-platform because of licensing agreements between developers and video game console manufacturers that limit development to one particular console. As an example,Disney could create a game with the intention of release on the latestNintendo andSony game consoles. Should Disney license the game with Sony first, it may be required to release the game solely on Sony's console for a short timeor indefinitely.
Several developers have implemented ways to play games online while using different platforms.Psyonix,Epic Games,Microsoft, andValve all possess technology that allows Xbox 360 and PlayStation 3 gamers to play with PC gamers, leaving the decision of which platform to use to consumers. The first game to allow this level of interactivity between PC and console games (Dreamcast with specially produced keyboard and mouse) wasQuake 3.[11][12]
Games that feature cross-platformonline play includeRocket League,Final Fantasy XIV,Street Fighter V,Killer Instinct,Paragon andFable Fortune, andMinecraft with its Better Together update onWindows 10, VR editions,Pocket Edition andXbox One.
Cross-platform programming is the practice of deliberately writing software to work on more than one platform.
There are different ways to write a cross-platform application. One approach is to create multiple versions of the same software in differentsource trees—in other words, the Microsoft Windows version of an application might have one set of source code files and theMacintosh version another, while aFOSS*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. Thisabstraction layer insulates the application from the platform. Such applications areplatform 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 easesoftware portability. Firefox implementsXUL,CSS and JavaScript for extending the browser, in addition to classicNetscape-style browser plugins. Much of the browser itself is written in XUL, CSS, and JavaScript.
There are many tools[13][14] available to help the process of cross-platform programming:
![]() | This sectionpossibly containsoriginal research. Pleaseimprove it byverifying the claims made and addinginline citations. Statements consisting only of original research should be removed.(March 2025) (Learn how and when to remove this message) |
There are many challenges when developing cross-platform software:
Collabora Office is a popular open-source alternative to the Microsoft Office suite. It's based on LibreOffice, and it's available on a variety of platforms, including Windows, Linux, iOS, and Android. This year in July, a major update for the office suite brought support for Chrome OS devices.
...touch optimized interfaces: one for tablets and one for phone screens. ...(iOS, iPadOS, Chromebooks, Android).
the first viable self-hosted web office solution for the popular Raspberry Pi 4 platform