Recent

Author Topic: security dialogs appear during each build in macOS Catalina  (Read 460 times)

inferno

  • New Member
  • *
  • Posts: 28
Hi all,
I'm working on application that access user system preferences and files/directories stored on system disk and other storage attached to the system. On macOS Catalina after running each build system is asking to allow access to System Events and files in different locations:

Quote
“application” wants access to control “System Events“. Allowing control will provide access to documents and data in “System Events“, and to perform actions within that app.
Quote
“application” would like to access files on a network volume.
Quote
“application” would like to access files in your Desktop folder.
Quote
“application” would like to access files in your Documents folder.
Quote
“application” would like to access files in your Downloads folder.

Each new build is recognized by the system as different application, so it again is asking for permissions. What is interested this hasn't happen in macOS Mojave - it was enough to allow this once and each new compilantion has run without security dialogs.

How to bypass this security control during development process in macOS Catalina?

Best regards,
Inferno

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 941
  • Former Delphi 1-7, 10.2 User
Re: security dialogs appear during each build in macOS Catalina
« Reply #1 on: May 29, 2020, 02:19:57 pm »
From Eskimo (Apple Forum Dev):

Quote
Is your app code signed?  Most problems like this are caused by the app not being code signed, so the system can’t be sure that the new build of your app is the same code as the previous build that was OK’d be the user.

That probably explains it. I noticed even Mojave is logging a check for signing on every rebuilt application's launch but of course, unlike Catalina, it's not enforcing access permission requests.

It cannot be bypassed, it's a feature :)
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

inferno

  • New Member
  • *
  • Posts: 28
Re: security dialogs appear during each build in macOS Catalina
« Reply #2 on: May 29, 2020, 04:11:27 pm »
Apple last time makes tons of "improvements" especailly related to the security. But they forget to check how it affect the users...

So if I sign the code and allow once for access to System Events and files locations, system will not ask for permissions during all next compilations?

Best regards,
Inferno

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 941
  • Former Delphi 1-7, 10.2 User
Re: security dialogs appear during each build in macOS Catalina
« Reply #3 on: May 30, 2020, 03:12:48 am »
Apple last time makes tons of "improvements" especailly related to the security. But they forget to check how it affect the users...

The effect is fully intended for the "users" and only happens the first time the application is run. It's a little different for the developers :)

Quote
So if I sign the code and allow once for access to System Events and files locations, system will not ask for permissions during all next compilations?

I can't guarantee it, but it would seem to be implied by Eskimo if you incorporate code signing into your rebuilding workflow.

The alternative is to use Mojave for development which is what I do.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46876, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

 

TinyPortal © 2005-2018