Recent

Author Topic: Notarization under macOS Sonoma. TargetOS must be 10.9+  (Read 5604 times)

msintle

  • Full Member
  • ***
  • Posts: 233
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #15 on: October 02, 2023, 10:11:56 am »
This is an issue for us as well. To clarify, the conditional doesn't work as specified!

Having the same error as with Igor, but not just on Windows - on all platforms.

I see the superfluous "changing source file to compile" messages on Windows, macOS, and Linux.

Using the latest Lazarus version "3.9.9" installed with FPCUPDELUXE (trunk Lazarus, 3.3.1 Free Pascal compiler).

Or, also using the 2.2.6 Lazarus version with the 3.2.2 Free Pascal compiler - same outcome.

BTW sorry for the off topic but anybody seeing debugger oddities with LLDB after upgrading to Sonoma?

For example with our project it seems to work until we show a secondary form, when it hangs truly badly.
« Last Edit: October 02, 2023, 10:18:44 am by msintle »

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 375
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #16 on: October 02, 2023, 04:49:35 pm »
TRon,

Sorry to bother you again.

I installed Lazarus 2.2.6 (FPC 3.2.2) and checked again. When I compiled under Windows I get the same warnings (see above) and I need to use a space symbol here: ' -WM10.9'

I just need to compile my app under macOS with targetOS 10.9+ for a compatibility with notarization (notarytool). And also I compile with the same app under Windows. I use 2 build modes - for release and for testing/debugging.

msintle, thanks for the confirmation!

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #17 on: October 03, 2023, 01:40:30 am »
Sorry to bother you again.
No problem  :)

Quote
I installed Lazarus 2.2.6 (FPC 3.2.2) and checked again. When I compiled under Windows I get the same warnings (see above) and I need to use a space symbol here: ' -WM10.9'
You have inputted the text...

Code: Pascal  [Select][+][-]
  1.     If TargetOS = 'darwin' then
  2.     begin
  3.       CustomOptions += '-WM10.9';
  4.     end;
  5.  

... at the wrong location.

See attached screenshot, though in the screenshot I did use some other (example) condition because I do not have MacOS to test with/for.

Other than that and afaik you can add the option (and only the option) to a specific buildmode at the custom options memo field.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #18 on: October 03, 2023, 05:35:39 am »
Sorry to butt in at the tail end of this discussion but I'd like to offer some comments.

  • Are you using build modes ?  Its normal to have one or two build modes for each platform (etc) and then, switches like these do not need to have a test about the OS. Those build modes are available to lazbuild for example, so can be used in scripted builds as well.
  • in the Project Options form, there is a button down low that is called (from memory) "show options" It will show you the command line Lazarus (or lazbuild) will use to build that build mode. Look through it, if there are options there "stuck together" then they need a space between them and, perhaps thats a report-able bug ?  I have never needed to put a space in but my options are always set using build modes, maybe using that CustomOptions += '-WM10.9'; syntax has a bug, I expect its rarely encountered.


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

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #19 on: October 03, 2023, 01:18:32 pm »
I have never needed to put a space in but my options are always set using build modes, maybe using that CustomOptions += '-WM10.9'; syntax has a bug, I expect its rarely encountered.
In this particular case TS has stuffed the conditional code into the custom options memo. However, that memo field only accepts 'pure' options as you would provide them as argument to the command line compiler.

Because there is no space in front of the minus sign it will not recognize the -WM as an option. That is besides the fact that the conditional code can not be interpreted correctly (as is indicated by the compiler output from TS and which is) trying to interpret the conditional code either as a filename and/or switch argument and tries to feed that to the command line compiler (and obviously chokes on it).

I already opted to TS that he probably put the conditional code into the wrong memo field but have the hunch that the remark I made regarding it was lost in translation. Hence trying to inform TS with a picture instead :)
« Last Edit: October 03, 2023, 01:24:01 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Igor Kokarev

  • Sr. Member
  • ****
  • Posts: 375
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #20 on: October 03, 2023, 04:30:53 pm »
TRon,
dbannon,

Many thanks! You're right.

I typed that code into wrong field. When I moved to Conditionals it worked fine and no warning. It was really stupid mistake, sorry! For example, reason I thought that it's example in read-only, because I use classical Pascal theme with blue color background.

I actively use builds for other purposes and currently I use 2 build modes for this project. If use targetos in a build, I would need to create 4 builds, it's a little too much for my project.
This special conditional with targetos will be a temporary solution, I guess that future Lazarus will generate targetOS 10.9+ by default for macOS for all projects, and I will remove my custom conditional.

Thanks again for the great support and very friendly replies.
« Last Edit: October 03, 2023, 04:32:29 pm by Igor Kokarev »

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #21 on: October 03, 2023, 05:16:39 pm »
I typed that code into wrong field. When I moved to Conditionals it worked fine and no warning. It was really stupid mistake, sorry!
We have all been there one way or another  :).

Glad to hear you got it solved now. Thank you for reporting back.

Happy coding !
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #22 on: October 04, 2023, 06:33:52 am »
....
I actively use builds for other purposes and currently I use 2 build modes for this project. If use targetos in a build, I would need to create 4 builds, it's a little too much for my project.

Hmm, I have twenty build modes in my project, about to add another for Apple Raspberry Pi (ie Apple Silicon).  I honestly believe its the only way to manage such things.
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

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #23 on: October 04, 2023, 12:58:30 pm »
I guess it is down to personal preferences dbannon. Nothing wrong with using one method/provision over the other (or combine them) ?

I do wonder why you stated that you believe that to be the only way to be able to manage such things though (you could be perfectly right there, it is only that I have a different experience but that might be because I am an oddball  ).

For example, the notarization, seem pretty basic to me for that particular platform so personally I would try and incorporate that into my fpc.cfg so that the only time I need to have a look at it is when the notarization version needs to change (I have honestly no idea so assumed for that to be once in a blue moon ?). If notarization depends on the host/target platform version then automate it based on that).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Notarization under macOS Sonoma. TargetOS must be 10.9+
« Reply #24 on: October 06, 2023, 06:28:41 am »
Yeah, sure, careless wording. The build mode is definitely not the "only way". To be clearer, I should have said "I honestly believe its the only way for me to manage...".

I do think that using embedded {$ifdef .. is possible but I also believe, again, in my experience only, harder and possibly more error prone.

But again, sure, people are most certainly free to use what ever models they like, its their code and their choice. When I give someone some advice, its based on my own limited knowledge and, particularly, experience.

For the record, I don't notarize the Apple Mac releases of my project. Paying Apple for a right to sign my app ? I don't think so.

Davo

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

 

TinyPortal © 2005-2018