With the recent macOS security enhancements, users are prompted to allow access when an application tries to access, say, the Desktop for the first time.
Our application, at certain points, enters a fullscreen mode that prevents these popups from being visible as they open "behind" the application.
The initial solution to this was to attempt to write then delete a ".temp.txt" file on the user's Desktop as the app was starting up to trigger the popup to appear.
However, it seems that the write/delete on startup works without issue, but as soon as the app tries to do anything with the Desktop afterward, the popup appears... behind the app.
My guess is that the reason the popup isn't appearing at the start is because the app was the process that created the file, and therefore doesn't need special permission to access it.
So, the question: is there any way to trigger the Desktop permission popup explicitly before the application enters full screen??
For context, we're working on macOS 11.6 in Objective-C, and the initial ".temp.txt" is being written using NSData writeToFile, then NSFileManager removeItemAtPath.