Recent

Author Topic: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps  (Read 5509 times)

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Hello,

I have been developing apps for Mac OS X with Embarcadero FireMonkey for some years, and now I am willing to move to Lazarus.

To be honest, a few years ago, I tried using Lazarus for some of my apps but, at a certain point, I decided to switch to FireMonkey because I had encountered some "Access Violation" problems that I was unable to solve in Lazarus.

As you probably know, very soon all apps for macOS developed with FireMonkey (which can only compile to 32-bit) will warn the user that they should be upgraded to 64-bit. Needless to say, those users will just drag them to the trash and look elsewhere.

I've heard Lazarus already allows you to produce 64-bit macOS apps but, as I have no experience with that, I was wondering whether there is anyone in this forum who may be willing to share his or her experience using this free programming environment. Do you know what Lazarus' pros and cons are for those like me who have been using FireMonkey so far?

Any help will be appreciated.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps
« Reply #1 on: February 19, 2018, 08:03:37 pm »
I use Lazarus and Free Pascal for Mac programming for about 10 years, and I am largely happy with it (albeit sometimes being annoyed by a few minor glitches). Up to now, I only develop 32-bit apps, however, since I use the Carbon interface.

The Cocoa widgetset is currently maturing. I expect it to be ready for professional development soon, and I would be interested in learning from those, who made their first experiences with it.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps
« Reply #2 on: February 20, 2018, 04:38:50 am »
Similar response to jwdietrich, I build my app on Linux (32 & 64), Windows (32 & 64) but only on 32bit Mac using Carbon.

I do try and keep my code compiling with Cocoa but last time I tried, maybe November, 2017, several memory leaks and some visual components had issues.

There appears to have been a lot of recent progress however. But that means the easy install of v1.8 and its default libraries may not be a good choice. Probably safe to say you will need to use the head version of LCL at least.

User Phil has a great HowTo https://macpgmr.github.io/MacXPlatform/UsingCocoaFromTrunk.html - but I suggest you MIGHT be able skip some of that, continue to use the 1.8 carbon based IDE at least.

And note that the memory leak detection code on Mac is not capable of telling you where a leak started, just that there is one. Thats a pity ...

Davo


Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

pasquale

  • Sr. Member
  • ****
  • Posts: 267
    • Esposito Software
Re: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps
« Reply #3 on: February 20, 2018, 08:00:54 am »
I'm sure you all know that Apple no longer allows you to publish 32-bit macOS apps on the App Store.

Even worse, by June 2018, your 32-bit macOS apps that are already on the App Store must be updated to 64-bit, otherwise they will be eliminated by Apple.

The following quotation is taken from https://arstechnica.com/gadgets/2018/01/apple-prepares-macos-users-for-discontinuation-of-32-bit-app-support/

Quote
To prepare for a future release of macOS in which 32-bit software will no longer run without compromise, starting in macOS High Sierra 10.13.4, a user is notified on the launch of an app that depends on 32-bit software. The alert appears only once per app.

When users attempt to launch a 32-bit app in 10.13.4, it will still launch, but it will do so with a warning message notifying the user that the app will eventually not be compatible with the operating system unless it is updated. This follows the same approach that Apple took with iOS, which completed its sunset of 32-bit app support with iOS 11 last fall.

I think it is vital for the Lazarus team to concentrate their efforts on Cocoa and abandon Carbon, which has no future.
Apple loves breaking backward compatibility to make money. If you want to be sure that your apps will never stop working, use Windows and trash macOS!

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps
« Reply #4 on: February 20, 2018, 11:17:09 am »
Disable the warning message... If that's not possible change to...

1. SNOW LEOPARD
2. LINUX
3. WINDOWS



// I couldn't deny myself...  :)
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Advice on moving from FireMonkey to Lazarus to develop 64-bit macOS apps
« Reply #5 on: February 20, 2018, 11:27:40 am »
pasquale said :
Quote
I'm sure you all know that Apple no longer allows you to publish 32-bit macOS apps on the App Store.

Speaking to me specifically here pasquale ? Does not worry me at all. I use and make open source. I don't charge for anything I make and I sure don't pay to have it distributed  :D

and RAW said :
Quote
// I couldn't deny myself...
and why should you ?

But pasquale is right, cocoa is the future. I'll see how my project works with it, now all that good stuff has been done. Was pretty close last time.

David
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018