The next release of Delphi 12 Athens (12.2) has just been released. As usual, I’ll be describing fixes/changes/features that are of significant interest to me, and are hopefully of interest to my readers/followers.
Linker Updated
The linker now supports linking to newer iOS/macOS frameworks (particularly 3rd party), fixing this issue.
This is a significant leap forward in terms of being able to use newer iOS SDKs such as Firebase (which includes Cloud Messaging, Analytics etc) and Facebook, etc.
Support for including .aar files
The IDE and Android build system of RAD Studio has been updated to allow addition of .aar files – the build system automatically includes the resources, and compiles “R” classes which it adds to the project.
Note that this means that if you add an .aar for a library where the corresponding .jar file is one of the “system defaults” used by Delphi, it will mean you will need to disable the system default so that Delphi does not include it when merging the classes into the app, causing a “duplicate class(es)” error.
WebStencils
Web Stencils (Formerly Delphi Razor) is a powerful template engine you can use – even outside of web development!With the initial release of Delphi 12, Delphi gained support for multi-line strings, fast forward to the second point release in the 12.x Athens series and we now have a template engine out of the box.
Web Stencils isn’t the only template engine available for Delphi. There’s also DMustache, Sempare Template Engine, TemplatePro (Originating from Delphi MVC Framework), Liquid and probably a few others I’ve forgotten.
With Web Stencils, the learning curve is pretty easy to get started, as it takes inspiration from the ASP.Net Razor templating library.Web Stencils integrates well into Web Broker and allows you to turn your tried and tested business logic into web applications with minimal effort. No need to migrate your Delphi application to a different language or ecosystem when your clients asks for web applications. The combination of HTMX to add dynamic interaction, a CSS library of choice (e.g. Bootstrap, Pure CSS or UI Kit) and a bit of HTML template snippets with Web Stencils template markers, enables you to generate advanced web user interfaces without having to touch JavaScript and helps you to build a simpler and more maintainable web application – what’s not to like?
You can also use Web Stencils outside of a web development setting, if you e.g. need to generate and send bulk emails based around a custom template – Web Stencils can be used as well to do the heavy lifting.
AI Services
Use the ToolsAPI to create plugins that access AI services such as OpenAI, Gemini, etc
Skia Update
Skia support has been updated to version 6.2.0
Focus Mode
This feature allows near “full screen” editing of source files, free from the distraction of IDE toolbars/windows.
Significant bug fixes/enhancements
Aside from the numerous bug fixes, one long awaited enhancement allows you to override the minSdkVersion and targetSdkVersion values for Android apps, right from the IDE.
Many thanks to Glenn Dufke (a fellow Delphi MVP) for his input regarding WebStencils.
Where is FMX Linux in Gitit?
Apparently they’re working on a new agreement (presumably with Eugene’s estate?) to include it. Marco/Ian mentioned this in the webinar.
Hey Dave, have you moved any code from D12.1 to 12.2? I moved a datasanp project and kept getting an error saying Datasnap.*Dont recallthe middle*Proxy was compiled with a different version of System.SysUtils.freeandnil. My brain was so fried after a weekend of troubleshooting other issues that I stopped there.
Is that a common issue and do you know the solution?
There have been code some changes recently, but none that are found only in Delphi 12.2.
The error message you are seeing usually means you have a source unit file (one of the Datasnap units, I assume) in the compiler search path (IDE or Project) that is mismatched with the compiled version of System.SysUtils. Check your IDE search paths (Tools > Options, Language > Delphi > Library, Library Path, for the target platform) and the project search path (Project Options, Building > Delphi Compiler > Search Path) – the unit is likely to be located in one of the “non-standard” paths.
Thank you kindly. I will update when I test this.
I just gave myself a re-education regarding the various paths in Delphi. I suppose you were correct as I am able to compile without fail. Thank you!
Should I be able to run a project built on Delphi 12.2 for iOS using Kastri FCM on a MacMini i5 Simulator? I get the following:
[DCC Error] E2597 ld: in C:\Users\Supervisor\Documents\Embarcadero\Studio\SDKs\iPhoneSimulator17.5.sdk/usr/lib/swift/iphoneos/libswiftCompatibilityDynamicReplacements.a(C11.cpp.o), building for iOS Simulator, but linking in object file built for iOS, for architecture arm64
Firebase v 11.2.0 / XCode v 15.4
I’ve updated DW.iOSapi.SwiftCompat.pas, the FCM Rebooted demo readme and the Add Swift Support readme on the How To repo.
Please update your local copy of Kastri, and carefully follow the instructions in the readme files regarding simulator. This will at least have it compiling and running, however I am finding that no token is being received – I am looking into why that is.
Thanks Dave! I’ll make these changes ASAP.
Also, if you have an issue with Kastri, it’s better to report it here. Easier to track, and it has more visitors than this blog
Worked like a charm. Just realized I have an Intel based Mac. So… But at least the repo is updated! Thanks. In the future I will post where you told me to.
Gn
Hey Dave. Is there a case tracker for not receiving the TOKEN on 12.2 w 11.2.0 and XCODE 15.4? I looked in the forum, but the post refers to Delphi 12.1 with other variables. I don’t want to create tickets for this if it’s already being reviewed elsewhere.
There aren’t any open issues regarding a token problem using Delphi 12.2, Firebase 11.2.0 and Xcode 15.4. This is a link to the issues page.
Part of the readme covers troubleshooting, such as not receiving a token.
Oh, a few messages ago, you said you weren’t receiving a token:
“Please update your local copy of Kastri, and carefully follow the instructions in the readme files regarding simulator. This will at least have it compiling and running, however I am finding that no token is being received – I am looking into why that is.”
My mistake. thanks. I’ll follow the land try to resolve it.
“Oh, a few messages ago, you said you weren’t receiving a token:”
That was on simulator. Works on a real device