re: camera permissions
Posted: Wed Jun 29, 2022 9:13 pm
I am hoping for some help on a pretty obscure problem. I have some code in a new-ish program (macOS) that (in part) allows the user to drag and drop lines of text in a list field.
The code is:
When the standalone is built, stapled and notarised and I run it, the first time it encounters this line the Mac up and asks "This program wants access to your camera. Do you allow?" (I am paraphrasing). The options are yes and deny. If I deny the program still works fine, the Mac never asks again, and the drag and drop with "image" works great.
If I say yes then something wacky happens to the drag and drop code and it forgets how to "let go" of the image. If you close and reopen the app all is ok again, but this looks spectacularly unprofessional.
Thoughts on potential workarounds? I could work up an example if that would be helpful. Obviously if I just build as a standalone the problem does not occur. It's just following the "installation" of a new (as far as Apple is concerned) app (and then only the first time this line is encountered).
I hope I have explained that accurately. (My ideal solution would be to never have the user presented with this dialog because based on the Deny response there is no loss of functionality in that situation anyway).
Cheers,
Mark
The code is:
Code: Select all
-- create a picture from a portion of the screen
export snapshot from rect globalrect to draggerData as PNG
If I say yes then something wacky happens to the drag and drop code and it forgets how to "let go" of the image. If you close and reopen the app all is ok again, but this looks spectacularly unprofessional.
Thoughts on potential workarounds? I could work up an example if that would be helpful. Obviously if I just build as a standalone the problem does not occur. It's just following the "installation" of a new (as far as Apple is concerned) app (and then only the first time this line is encountered).
I hope I have explained that accurately. (My ideal solution would be to never have the user presented with this dialog because based on the Deny response there is no loss of functionality in that situation anyway).
Cheers,
Mark