Recent

Author Topic: Creating a fully cross platform app  (Read 474 times)

oblio

  • Newbie
  • Posts: 2
Creating a fully cross platform app
« on: November 11, 2025, 01:50:06 pm »
Hello folks!

I used to use Turbo Pascal a loooong time ago (I imagine a lot of you did the same). I've always liked it a lot more than C and definitely more than C++.

Due to work, I transition to Python, Java, C#, Ruby, all sorts of weird contraptions, but I'm thinking at some point to work on a cross platform app.

By cross platform, I mean the whole shebang: Linux, Windows, MacOS, Android, iOS.

I've looked desperately at solutions to reduce the amount of duplication work needed to create good quality applications, but at least on the mobile side is dire.

The best solution seems to create a sort of shared library, but due to iOS being very strict about JIT and general programming language availability, the consensus seems to be that the best way forward is to use a lower level programming language without a VM. So C/C++ %) , Rust (very complex, I would rather avoid it), and thinking more about it, Free Pascal.

Now, I've started using a very good file commander program, named Double Commander. From what I gather, it's built with Free Pascal and uses Qt. So at least I have an example of a solid cross platform app that runs on Linux, Windows, MacOS. The desktop side is easier in general, anyway, from this point of view.

On the mobile side, I'd want to create a shared library that I build for Android and iOS using FreePascal, and then call from native Android and iOS UIs.

How crazy is my plan? The apps would connect to a bunch of web services (S3, Dropbox, OneDrive, Google Drive, etc) and probably play/show some media (images, audio, maybe videos).

How solid is FreePascal support, especially for iOS (which I imagine is the bigger hurdle in general)? Has anyone built a big shared library for iOS using FreePascal? Or does anyone have links to apps that do this (ideally Open Source ones)?

Thank you for your help!
« Last Edit: November 12, 2025, 08:48:28 am by oblio »

AlexTP

  • Hero Member
  • *****
  • Posts: 2669
    • UVviewsoft
Re: Creating a fully cross platform app
« Reply #1 on: November 11, 2025, 03:13:39 pm »
desktop apps / mobile mobile apps -> 2 different approaches. DoubleCmd & CudaText [signature] are cross-platform but for the 1st approach. I did not try 2nd approach. guess, you cannot create the same codebase for 2 approaches if app uses Lazarus/LFM forms.

Thaddy

  • Hero Member
  • *****
  • Posts: 18695
  • To Europe: simply sell USA bonds: dollar collapses
Re: Creating a fully cross platform app
« Reply #2 on: November 11, 2025, 03:51:55 pm »
Yes, best approach is like above.
For mobile, though, I use the logic written in FPC and write the UI part with other means.
But Windows/Linux/MacOS is usually no problem at all and even for mobile platforms you can use FPC?Lazarus, but note that takes some effort and is not always straightforward.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018