[macos Sequoia beta] How to trigger Screen Capture weekly for testingprompt

We are seeing in Sequoia, and confirmed in https://9to5mac.com/2024/08/06/macos-sequoia-screen-recording-privacy-prompt/, that screen capture permission dialog is triggered at specific time intervals. With B5 this seems to be only every week.

Our app does not currently handle this dialog well, and we want to fix this. However, the documentation does not mention any way of triggering this dialog (or reset the counter since the last reminder). Does Apple provide any way for Apple Developers to test this?

We are seeing in Sequoia, and confirmed in https://9to5mac.com/2024/08/06/macos-sequoia-screen-recording-privacy-prompt/, that screen capture permission dialog is triggered at specific time intervals. With B5 this seems to be only every week.

As a general side comment, it's not unusual for developers to end up seeing these kinds of dialogs FAR more often than a typical user would. There are a variety of check/heuristics in tcc to ensure that you can't bypass these check by simply replacing an approved app with an unapproved app and the dynamics of the build/test/repeat cycle can end up failing those checks, as well as other usage/testing patterns.

One particular case to be aware of here is if you're a user of your app as well as a developer. The system uses the bundle ID as THE core app identifier, and that means you can end up with confusing failure because the system doesn't really differentiate between your production and development app. You may want to consider creating a "development" configuration that uses a different bundle ID so that you can maintain a clear seperation between the release app (which you're "using") and the development app (which you're testing/working on).

Our app does not currently handle this dialog well, and we want to fix this. However, the documentation does not mention any way of triggering this dialog (or reset the counter since the last reminder). Does Apple provide any way for Apple Developers to test this?

A few answers/tricks here:

  • When your working on a specific issue like this, I recommend creating a new user account and working out of that user account while you're sorting out any issues. Anything that goes wrong is the confined to that user account, which you can simply delete without losing anything.

  • The command line utility "tcc_util" will let you reset any of these decisions. For app level testing, this command should work:

sudo tccutil reset All <app bundle id>

And you can also reset "everything" using:

sudo tccutil reset All

  • These kind of settings are almost always tied to the bundle ID, so you can always "reset" the systems view of "your app" by simply modifying your bundle ID. I wouldn't recommend this as your standard testing technique (it will basically just build up "junk" in tcc), but it can be useful when your trying to understand a very specific issue and you don't want to complicate/disturb things by triggering a reset.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

[macos Sequoia beta] How to trigger Screen Capture weekly for testingprompt
 
 
Q