Author Topic: [SOLVED] CFBundleVersion value not set in Info.plist of App Bundle  (Read 2051 times)


  • Hero Member
  • *****
  • Posts: 800
I noticed following a bug report that when one creates an app bundle with Lazarus for Apple OSX, the CFBundleVersion is set, by default, to 0.1. even when the Project Settings have the build and version number defined.

The value is stored in the bundles Info.plist file. And if I, as the developer, go in and edit the info.plist file manually to show "1.3.2" (or whatever value I need), it then displays properly in the Apple Finder properties of the app bundle.

But I wonder if Lazarus should be\could be\will be updated to do that for us automatically when the App bundle is created? Or is there a setting somewhere I am missing that I need to enable? I am using v2.0.10 on OSX< which I appreciate is a release behind 2.0.12, so it may be that it is corrected in that but sadly I am not able to apply that release to my Apple so cant check.

(PS I did read this, which seems to be a way to achieve it programmatically :,_Version,_and_Company but my point is that all that needs to happen when the developer hits the "Crate App Bundle" button is for Lazarus to lookup the project version number and copy it to the info.plist file. I can also see here that Lazarus itself has this setting applied, but perhaps via code pipeline automation than by Lazarus itself )
« Last Edit: June 07, 2021, 10:24:53 am by Gizmo »
Lazarus 2.0.12 and fpc 3.2.0 - Linux Mint 19 LTS, Windows 10 64 and Mac OSX Big Sur
Useful Page to remember :


  • Hero Member
  • *****
  • Posts: 1187
    • formatio reticularis
Re: CFBundleVersion value not set in Info.plist of App Bundle
« Reply #1 on: May 27, 2021, 01:24:11 pm »
This is an interesting and, of course, important question.

I always use to create and edit the info.plist files of my apps manually. Before releasing a new version I copy the files into the app bundle. This works perfectly and leaves much room for manual optimisation.

But you are right that it would be way more elegant if the Lazarus IDE would be able to automate this process.
function GetRandomNumber: integer; //
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.

Lazarus 2.0.12 | FPC 3.2.0 | PPC, Intel, ARM | macOS, Windows, Linux


  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1589
  • Former Delphi 1-7, 10.2 user
Re: CFBundleVersion value not set in Info.plist of App Bundle
« Reply #2 on: May 30, 2021, 04:50:18 am »
I do what jwdietrich does, the last thing I do is copy in my own plist file(s) at the same time as I delete the link and copy in the executable (which includes both Intel and ARM64 binaries).

Short of providing a plist file editor, Lazarus will not be able to setup all the things that an application may require in its plist files. The current defaults generally at least provides a working application bundle for users who have yet to become acquainted with plist files.
Lazarus 2.3 2021-08-10 FPC 3.3.1 r49223 macOS 10.14.6 Xcode 11.3.1
Lazarus 2.3 r65500 FPC 3.3.1 r49634 macOS 11.6 aarch64 Xcode 13
Lazarus 2.3 2021-08-11 FPC 3.2.2 FreeBSD 13.0 amd64 VMware VM
Lazarus 2.1 r61574 FPC 3.0.4 Ubuntu 20.04 Parallels VM
Lazarus 2.0.10 FPC 3.2.0 Win10 Parallels VM


TinyPortal © 2005-2018