Recent

Author Topic: How to use newer macOS SDK headers (11.3) with Lazarus?  (Read 501 times)

Hansaplast

  • Hero Member
  • *****
  • Posts: 688
  • Tweaking4All.com
    • Tweaking4All
How to use newer macOS SDK headers (11.3) with Lazarus?
« on: September 11, 2024, 05:42:07 pm »
I would like to do some experiments with the newer macOS frameworks (11.x) which are not yet included in Lazarus (currently 10.9 I believe).

Searching the forum, I did find this great post where Ryan Joseph gave us a link to the new macOS headers he cerated for macOS 11.3 (link).
But as he states: he's not really a Lazarus user (at that time anyway).


As this was a rather old post, I figured I better create a new one asking if someone can show how to use these new headers.
Anyone can show me how to use these headers?
I already tried replacing the headers that came with FPC, but either this is not how to use this, or I goofed up somehow.

apeoperaio

  • Sr. Member
  • ****
  • Posts: 281
Re: How to use newer macOS SDK headers (11.3) with Lazarus?
« Reply #1 on: September 13, 2024, 06:02:07 pm »
Thank you for your post.
I have a related issue.
I cannot notarize my applications since the MacOS notarization tool gives me an error:
"The binary uses an SDK older than the 10.9 SDK"

I get this error notarizing x86_64 executables, while I got no error if I notarize aarch64 executables.

Any hint?

Hansaplast

  • Hero Member
  • *****
  • Posts: 688
  • Tweaking4All.com
    • Tweaking4All
Re: How to use newer macOS SDK headers (11.3) with Lazarus?
« Reply #2 on: September 13, 2024, 09:34:22 pm »
Not relevant for my question, but you could try the following when building your binaries ...



In Lazarus go to Project - Project Options - Compiler Options - Custom Options.


In the field "Custom options", we need to at the "-WM" option which allows us to select a specific SDK.
For example: -WM11.0 will enforce the macOS 11.0 SDK.

apeoperaio

  • Sr. Member
  • ****
  • Posts: 281
Re: How to use newer macOS SDK headers (11.3) with Lazarus?
« Reply #3 on: September 16, 2024, 09:59:46 am »
Thank you Hansaplast,
I also found the thread https://forum.lazarus.freepascal.org/index.php?topic=64740.0 that was useful too.

Regarding the choice of the sdk using the custom options, what's the difference in choosing different sdk?
e.g. -WM10.9 or -WM11.0

Thanks.

Hansaplast

  • Hero Member
  • *****
  • Posts: 688
  • Tweaking4All.com
    • Tweaking4All
Re: How to use newer macOS SDK headers (11.3) with Lazarus?
« Reply #4 on: September 16, 2024, 11:19:59 am »
I would have to guess (but am most certainly not an expert):
- 10.9 is the minimum version to support dark mode
- 11.0 appears to support it even better and supports the newer frameworks provided by Apple (if the headers are included in Lazarus/FPC)


Personally, I stick with 11.0 but it may depend on your target audience as well.


Others may be able to provide more info or wisdom on this 😉

Hansaplast

  • Hero Member
  • *****
  • Posts: 688
  • Tweaking4All.com
    • Tweaking4All
Re: How to use newer macOS SDK headers (11.3) with Lazarus?
« Reply #5 on: September 21, 2024, 10:52:35 am »
Posted this question at that Github page as well (link).
Any help would be greatly appreciated.

 

TinyPortal © 2005-2018