Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
DelphiNews

Delphi 11.2 Supercharges Cross-Platform Development

Delphi 112 cross platform development

Delphi 11.2 is here, and it’s packed with features that will make cross-platform development faster and easier than ever. Whether you’re building mobile apps, desktop software, or anything in between, Delphi 11.2 has the tools you need to get the job done quickly and efficiently. In this article, we’ll take a look at some of the most impressive new features in Delphi 11.2 and see how they can help you streamline your workflow. So what are you waiting for? Get started using Delphi 11.2 today!

What platforms does Delphi support?

Delphi is a powerful IDE and software development platform that supports cross-platform development on Android, iOS, macOS, Windows, and Linux. Delphi’s cross-platform support makes it a great choice for developers who need to target multiple platforms with their applications. Delphi’s IDE is also very well suited for developing mobile applications. Delphi applications can be compiled for multiple architectures (depending on the target platform), including ARM and x86. This makes Delphi a versatile choice for developers who want to target multiple platforms with their applications. Delphi’s IDE also includes a number of productivity enhancing features such as a visual designer for creating user interfaces and fast compile times.

Read on to see how conditional compilation allows for handling the edge cases when building single codebases for multiple platforms.

What is conditional compilation?

Conditional compilation is a feature of some programming languages (like Object Pascal) allows code to be compiled conditionally. This can be useful for debugging, optimizing, or porting code to different platforms. For example, if a programmer knows that a particular piece of code will only be used on one platform, they can use conditional compilation to compile it only for that platform. This can result in faster code execution and smaller file sizes. Conditional compilation can also be used to include or exclude code based on user input. For instance, a programmer might use conditional compilation to include code that is only executed when a debug flag is set. This can make it easier to test and debug code without having to recompile the entire program each time. Conditional compilation is a powerful tool that can be used to improve the speed, size, and portability of code.

Find out more from this Innovation Timeline infographic from Delphi’s 27th Anniversary as it walks you back through the history of Delphi and its evolution.

Here are the platforms and CPUs supported by Delphi 11.2 Alexandria:

Category Symbol DCC32 DCC64
Since XE2
DCCOSX64
Since 10.3 Rio Release 2
DCCAARM
In XE5
DCCIOSARM64
Since XE8
DCCLINUX64
Since 10.2 Tokyo
DCCAARM64
Since 10.3 Rio Release 3
DCCOSXARM64
Since 11.0 Alexandria Release
Comments
Compiler DCC DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED not defined
VER0
For a list of compiler versions, see Compiler Versions.
DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED not defined For Delphi Alexandria, compiler version .0 has VER0 defined.
Platform CONSOLE DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED Defined if an application is being compiled as a console application.
IOS not defined not defined not defined N/A DEFINED not defined not defined not defined Defined if the target platform is iOS.
*New* in XE4/iOS.
IOS64 not defined not defined not defined not defined DEFINED not defined not defined not defined Defined if the target platform is iOS64.
Since XE8/iOSarm64.
OSX not defined not defined DEFINED not defined not defined not defined not defined DEFINED Defined if the target platform is macOS.
*New* in Alexandria.
OSX64 not defined not defined DEFINED not defined not defined not defined not defined DEFINED Defined if the target platform is macOS.
*New* in Alexandria.
NATIVECODE DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED Since Delphi.Net
MSWINDOWS DEFINED DEFINED not defined not defined not defined not defined not defined not defined Indicates that the operating environment is Windows. Use MSWINDOWS to test for any flavor of the Windows platform instead of WIN32.
WIN32 DEFINED not defined not defined not defined not defined not defined not defined not defined Target platform is the native 32-bit Windows platform.
WIN64 not defined DEFINED not defined not defined not defined not defined not defined not defined Target platform is 64-bit Windows.
*New* in XE2/x64.
MACOS not defined not defined DEFINED not defined DEFINED not defined not defined DEFINED Target platform is an Apple Darwin OS (macOS or iOS).

Note: This symbol existed before Apple changed the name of OS X to macOS.

*New* in XE2/macOS.

MACOS32 not defined not defined not defined not defined not defined not defined not defined not defined Target platform is 32-bit Apple Darwin OS (32-bit macOS or 32-bit iOS).

Note: This symbol existed before Apple changed the name of OS X to macOS.

*New* in XE2/macOS.

MACOS64 not defined not defined DEFINED not defined DEFINED not defined not defined DEFINED Target platform is 64-bit Apple Darwin OS (64-bit macOS or 64-bit iOS).

Note: This symbol existed before Apple changed the name of OS X to macOS.

*New* in XE8/macOS.

LINUX not defined not defined not defined not defined not defined DEFINED not defined not defined Since Kylix.
LINUX32 not defined not defined not defined not defined not defined not defined not defined not defined Since Kylix.
LINUX64 not defined not defined not defined not defined not defined DEFINED not defined not defined New in 10.2
POSIX not defined not defined DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED Since Kylix.
POSIX32 not defined not defined not defined DEFINED DEFINED not defined not defined not defined Since Kylix.
POSIX64 not defined not defined DEFINED not defined DEFINED DEFINED DEFINED DEFINED Since Kylix.
ANDROID not defined not defined not defined DEFINED not defined not defined DEFINED not defined Defined if the target platform is Android.
*New* in XE5.
ANDROID32 not defined not defined not defined DEFINED not defined not defined not defined not defined Since XE8/iOSarm64.
ANDROID64 not defined not defined not defined not defined not defined not defined DEFINED not defined Delphi compiler for Android 64-bit platform.
*New* in 10.3.3.
CPU CPU386 DEFINED not defined DEFINED not defined not defined note defined not defined not defined Indicates that the CPU is an Intel 386 or later.
CPUX86 DEFINED not defined not defined not defined not defined not defined not defined not defined CPU is an Intel 386 or later on any platform.
*New* in XE2/x64.
CPUX64 not defined DEFINED DEFINED not defined not defined DEFINED not defined not defined The CPU supports the x86-64 instruction set, and is in a 64-bit environment.
*New* in XE2/x64.
CPU32BITS DEFINED not defined not defined DEFINED not defined not defined not defined not defined The CPU is in a 32-bit environment, such as DCC32.EXE.
*New* in XE8.
CPU64BITS not defined DEFINED DEFINED not defined DEFINED DEFINED DEFINED DEFINED The CPU is in a 64-bit environment, such as DCC64.EXE.
*New* in XE8.
CPUARM not defined not defined not defined DEFINED DEFINED not defined DEFINED DEFINED Defined if the CPU is based on the ARM architecture..
*New* in XE4/iOS.
CPUARM32 not defined not defined not defined DEFINED not defined not defined not defined not defined The CPU is in a 32-bit ARM environment.
*New* in XE8.
CPUARM64 not defined not defined not defined not defined DEFINED not defined DEFINED DEFINED The CPU is in a 64-bit ARM environment, such as DCCIOSARM64.EXE.
*New* in XE8.
Availability ALIGN_STACK not defined not defined not defined not defined not defined not defined not defined not defined Defined in code that may be shared with the macOS compiler and another compiler on another platform such as Linux that does not have a rigid stack alignment requirement. For more information, see Eli Boling’s blog at http://blogs.embarcadero.com/eboling/2009/05/20/5607 .
*New* in XE2/macOS.
ASSEMBLER DEFINED DEFINED not defined not defined not defined not defined not defined not defined Assembler syntax is accepted.
AUTOREFCOUNT (*) not defined not defined DEFINED DEFINED DEFINED not defined DEFINED if 10.2.
Not defined since 10.3.
not defined Defined for compilers that use automatic reference counting, such as the Delphi mobile compilers.
*New* in XE4/iOS. Removed in 10.4 Sydney.
EXTERNALLINKER not defined not defined DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED Defined for compilers that have an external linker and the LLVM code generator; the Delphi mobile compilers have the external ld linker and use LLVM as code generator.
*New* in XE4/iOS.
UNICODE DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED not defined UNICODE is defined as the default string type.
CONDITIONALEXPRESSIONS DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED DEFINED not defined Tests for the use of the $IF directive.
ELF not defined not defined not defined not defined not defined DEFINED not defined not defined Defined when targeting Executable and Linkable Format (ELF) files.
NEXTGEN (*) not defined not defined DEFINED DEFINED DEFINED DEFINED if 10.2.
Not defined since 10.3.
not defined not defined Defined for compilers (such as the Delphi mobile compilers) that use “next-generation” language features, such as 0-based strings.
*New* in XE4/iOS. Removed in 10.4 Sydney.
PC_MAPPED_EXCEPTIONS not defined not defined not defined not defined not defined not defined not defined not defined Defined when compiling on a platform or for a target platform that uses address maps instead of stack frames to unwind exceptions (such as macOS).
*New* in XE2.
PIC never never always DEFINED always DEFINED always DEFINED always DEFINED always DEFINED DEFINED Defined for platforms that require Position-Independent Code (PIC), such as macOS.
UNDERSCOREIMPORTNAME DEFINED not defined not defined not defined not defined not defined not defined not defined Defined for compilers that add a leading underscore (for example, in names of dynamic libraries imported from Mac OS).
*New* in XE4/iOS.
WEAKREF not defined not defined DEFINED DEFINED DEFINED DEFINED DEFINED not defined Defined for compilers that can use weak references (the [weak] attribute).
*New* in XE4/iOS.
WEAKINSTREF (*) not defined not defined DEFINED DEFINED DEFINED not defined DEFINED if 10.2.
Not defined since 10.3.
not defined Defined when weak references are defined for instances.
*New* in XE4/iOS. Removed in 10.4 Sydney.
WEAKINTFREF not defined not defined DEFINED DEFINED DEFINED DEFINED DEFINED not defined Defined when weak references are defined for interfaces.
*New* in XE4/iOS.

Does Delphi 11.2 offer enhanced conditional compilation support?

Yes! RAD Studio 11.2 offers enhanced conditional compilation which syntax highlights code that is active for the currently selected platform. This can help you know what code is going to run for the current platform and easily see which code is not going to run on the currently selected platform.

What is the iOS simulator and how does it support iOS development?

The iOS simulator is a software development tool that allows developers to test their apps on a simulated iOS device. This allows developers to see how their app would look and behave on a real iOS device, without having to actually use one. The iOS simulator is available as part of the Xcode developer tools. It can be used on Macs running macOS. The iOS simulator is a valuable tool for developers who want to ensure that their apps are compatible with all iOS devices and operating system versions.

The simulator also has a number of built-in features, such as the ability to simulate different network conditions and device orientations. While the simulator is extremely useful, it is important to note that it does not always accurately reflect the behavior of a real iOS device. Therefore, developers should always test their app on a real device (which Delphi 11.2 also supports) before releasing it to the public.

Delphi 11.2  offers enhanced iOS simulator support on macOS ARM 64-Bit M1 and M2 chips. This has the advantage as running native ARM code which is the same an iOS device. You can interact with your app, rotate your screen, and capture screen shots. This includes the latest iPads.

What debugger does Delphi 11.2 use for Linux applications?

Delphi’s Linux toolchain previously used GDB for debugging. 11.2 switches to LLDB, which provides a strong quality improvement both in features and in Delphi language syntax support. LLDB has been upgraded to version 12 and adopted for the iOS Simulator, along with existing use of LLDB for C++ Win64, and Delphi macOS, iOS, and Android 64 platforms.

Does Delphi 11.2 support Android API Level 32?

Yes! The 11.2 IDE targets Android API Level 32 (up from API level 30 in 11.1), which will be required by Google Play in November 2022. The installer has also been updated to offer the Eclipse Temurin JDK 11, required by the latest Android SDK tools.

What Windows development enhancements do Delphi 11.0, 11.1, and 11.2 bring?

In the latest Delphi 11.0, 11.1, and 11.2 versions Delphi offers many optimizations and quality improvements to the core Delphi RTL. There is also a new TURLStream class, a TStream descendant with support for async operations. Support for Windows 11 and Server 2022 in the TOSVersion data structure.

VCL enhancements to TTreeView, TRichEdit, TEdgeBrowser, TLabelledEdit and TNumberBox, flickering and DoubleBuffering, VCL high-DPI and scaling. New Demo through GetIt showing the use of WinUI 3 library in Delphi. FireMonkey quality improvements to TListView, improved Android SDK integration, TWebBrowser, Windows high-DPI-related issues, and performance.

Is there enhanced Windows EXE security in Delphi 11.1 and 11.2?

Yes! Delphi 11.1 enables a number of PE security flags for Windows applications by default, some of which were previously available but a little hidden. ASLR and other recommended Windows security flags have long been supported by Delphi. In Delphi 11.1, it became easier to use those flags in Delphi by surfacing specific linker options, enabling them by default and also building packages and applications that are part of RAD Studio with those flags enabled.

In a separate article, get insights about the fun LED Scroller app for androids and how helpful it is in making text and emojis on the screen without breaking a sweat!

Does Delphi 11.2 also support building macOS applications including for the Apple M1 and M2?

Yes! You can use RAD Studio to create macOS applications, and you can use your Mac as the required intermediate platform for iOS apps.

From the hardware point of view, in addition to the development PC, you need a Mac connected with the development computer (where RAD Studio is installed); for example, using a local area network (LAN). The Delphi compiler for macOS supports both 64-bit (Intel) and macOS 64-bit (ARM). Delphi also offers Metal as a rendering target on macOS and iOS.

Ready to get started building amazing cross-platforms apps faster today?

If you’re looking to get started with cross-platform development, or want to supercharge your team’s productivity, Delphi 11.2 is the perfect solution. With powerful new features and quality improvements across all platforms, it’s never been easier to create high-quality applications that work seamlessly on any device. Ready to get started? Download a free trial of Delphi today and see for yourself how easy it is to build amazing apps with Delphi.

On this blog, discoverCOM based drag and drop and learn how it makes it easier to drag and drop from your application to other applications and improve your efficiency.

Also, know more about the brilliance of DNA manipulation in this article about Delphi’s DNABaser.


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

FMXExpress.com has over 600 articles with all kinds of tips and tricks for Delphi FireMonkey on Android, IOS, OSX, Windows, and Linux.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES