macOS 10.14 - asks for permissions

Yesterday I stumbled on some odd things with macOS 10.14
I received some mails from customers, who are running macOS 10.14 and said my app asks for access permissions to the Contacts.
The odd bit is that my app doesn’t call any code to access the contacts.

I first thought it was the MBS plugins triggering this. But I am not fully convinced this is the case.
Maybe the Xojo framework triggers this?

Looking into this in detail, it seems Mojava indeed checks if apps access certain things like mails, contacts, backups, file systems, …
Still, it is odd it triggers this even when my app does not call any of this (in this case Contacts) so maybe it does this because of the plugins or Xojo framework.

Debugging is extremely difficult because you only see this popup ones. You cannot remove the permission in System Preferences/Privacy options to see the warning again.

ahh beta software used by millions of persons … good luck.

macOS becomes more of a nanny with each version.

You should be able to remove the entry in Preferences/Privacy. Then you will see the popup again.

Can your users tell you when the popup showed up? Do they remember what they did in your app?

There is a command called tccutil that you can use to reset stuff. For instance:

tccutil reset AppleEvents tccutil reset SystemPolicyAllFiles

[quote=402855:@Beatrix Willius]macOS becomes more of a nanny with each version.

You should be able to remove the entry in Preferences/Privacy. Then you will see the popup again.

Can your users tell you when the popup showed up? Do they remember what they did in your app?[/quote]

Happens on launch so it seems.

In this case it is feature, not a bug.
Here is a good read about it:
https://www.google.be/amp/s/www.howtogeek.com/361707/how-macos-mojaves-privacy-protection-works/amp/

From what I have seen in my own app that uses AppleScript the popup happens when you actually use the AppleScript. And not on launch.

Well, you can always run a sample on the process with activity monitor to know what it may do.
And maybe you find the call in the plugin, runtime or your code which triggers it.

How will a non-MAS app ‘request’ such permissions?

Check out the article. If our app needs access to something it will ask. macOS remembers the answer.

[quote=402856:@Beatrix Willius]There is a command called tccutil that you can use to reset stuff. For instance:

tccutil reset AppleEvents tccutil reset SystemPolicyAllFiles[/quote]

This doesn’t seems to reset those warnings/popups.

It happens when your software uses the feature (e.g. access to the camera, the microphone…).

In some apps, there is a crash reporter that launches at startup and that often wants access to your contacts so it can access your email address for crash reporting purposes.

I would recommend that you add the appropriate Info.plist entries (e.g. NSCameraUsageDescription and NSMicrophoneUsageDescription) if your app uses these features of macOS, as they are completely backwards-compatible.

As for debugging / resetting the permissions, here we’re testing with VMs so we simply snapshot them. I have not tried tccutil.

Yes, I think we all know that. But the problem is that it also triggers when the app does not call such code (in macOS 10.14).

If you remove all of your plugins, launch the IDE and build an app, do you get the same warning messages?

Another way to diagnose…

Parallels has a rollback function which lets you quickly take the VM back to a previous state. That would allow you to see the message, roll back, try something else, roll back.

You could probably subtly change the app Identifier for each build too using a build script, perhaps appending a ln ever incrementing number.