Standalone Mac permissions launch problem

jb@bmbcon.demon.nl's icon

Hi there,
I have a Mac standalone made with Max 8.2.0 which uses an audio input (actually from loopback) and an external USB camera (to trigger things).

It's working fine. But as it needs to run for a long time (months) in an installation, I would like to launch it automatically when the computer starts up (as a Login item). This works, but during the startup process, dialog boxes appear asking for permission for "... MSP to capture audio from the microphone." and to "Allow Jitter to capture video". Which need to be clicked on.

I thought that the computer (mac mini running 10.13.4) would learn that it's ok for the app to do this (it appears in and stays in the relevant lists in the Security control panel). but these dialogs appear EVERY TIME.

Launching the standalone app on my laptop (OS 12.1) displays the same behaviour, so I don't think it's just an OS thing.

I've done this kind of thing before and can't remember ever having this problem.

can anyone help?

very best wishes, Justin

tdc's icon

Interested in resolving this permissions issue also.

jb@bmbcon.demon.nl's icon

Actually I'm talking to support about it now.

Going back to Max 8.1.11 and making the standalone with that version solves the problem, - i only have to give permission once, then the computer remembers the permissions. so it seems to be a bug in the newer version(s). I'll post here again when I have more news about it! J

personal_username's icon

Hi Justine,

if I recall correctly you can bypass this with an apple developer ID.
Once you have one, you should codesign* the app with a script.

Check this thread:
https://stackoverflow.com/questions/13204407/how-to-codesign-an-existing-mac-os-x-app-file-for-gatekeeper

jb@bmbcon.demon.nl's icon

Thanks for the link! I'll check it out. It all seems to work anyway by using Max 8.1.11. And hopefully the bug will be fixed in a future version of Max.

Carlos Caires's icon

Same here. I'm forced to export my App (https://irin.carloscaires.com/ ) using max 8.1.11. Did anyone reported this issue in the bug report form?

CharBoogie's icon

Anybody have any news on this? I can't even find where to download Max 8.1.11 anymore! Seems the oldest avail on the website is 8.2 something...

Source Audio's icon

Max 8.1.11. is surelly still available for download, but link is not shown
is this for your own needs?
in which case you could get rid of stupid apple
security restrictions.
if you think solution is to use 8.1.11
I could digg download link from archives

Source Audio's icon

https://akiaj5esl75o5wbdcv2a-maxmspjitter.s3.amazonaws.com/Max8111_210413.dmg

Francois Weber's icon

Hi all,
Same thing with my standalone... but i can't use the 8.1.11 because of some objects that have since been updated (ex : mc.resize).
I hope C74 solves this problem in the next release...

Rob Ramirez's icon

You simply need to codesign the standalone app bundle.
From a terminal:

codesign -s - -f mystandalone.app
Francois Weber's icon

Hi Rob,

Thank you for your reply.
I did that, but unfortunately it doesn't work. I get the following error message in the terminal :
" resource fork, Finder information, or similar detritus not allowed "

billyanok's icon

Run first before codesign

sudo xattr -cr mystandalone.app

CharBoogie's icon

Thank you everyone for your replies!

I'm having the same issue now -- realizing that I need the functionality of some updates since 8.1.1.

I thought that you needed to register an Apple developer ID in order to co-design the app?

billyanok's icon

Yes you do as far as I know?
B

Rob Ramirez's icon

you don't need a developer ID when you sign anonymously, which is what passing "-" to the "-s" flag does

Francois Weber's icon

Thanks Rob, Thanks Billyanok !!!!

I did :

sudo xattr -cr mystandalone.app

then

codesign -s - -f mystandalone.app

And all is right now, without Apple developer ID.


billyanok's icon

No problem, glad to help!

@Rob Ramirez - interesting, I didn't know this-
"you don't need a developer ID when you sign anonymously, which is what passing "-" to the "-s" flag does"

B

CharBoogie's icon

Amazing! Going to give it a shot... thanks everyone!

Martin.Jirsak's icon

Hi all,

I have an issue, which might be related (or not, I don't know).

I tried to use mxj_autobot and/or 11clicks externals. Everything works as expected until I export my patch as stand-alone application on Mac. In the exported stand-alone the mouse movement doesn't work anymore. My expectation is, I have to enable the application in the System Settings > Privacy & Security > Accessibility on macOS. But even if I do so, the mouse doesn't move.

Max is also enabled in the Accessibility and both the externals work within Max.

Do you have any idea, please? Do I have to setup something specific in the [standalone] object or on the export, so the system recognizes the new application correctly? Or any other idea, please?

I tried to use the Terminal tricks, you recommended, but it didn't help.

Thank you for any hint!

Hans Leeuw's icon

Is Cycling on top of this issue? I used the suggestions made above, xattr and codesign, I get no error or other warnings when I use these commands in the terminal, but the issues still persist. In my case it is the microphone that I have to allow to be used over and over again even when I switch to other tabs in the same application and back. It is particularly frustrating since I have an automatic kill switch for audio in other tabs (users often forgot about audio in other tabs) but this bug makes it almost impossible to use it.

pechnatunk's icon

Hi,

Thanks for this.
Does the Standalone need to be in a specific location?

I'm trying to open a Standalone I made - doesn't use Audio at all - just midi.
Worked fine with Mojave, but now I'm trying in Ventura on a different machine, but getting the error - The application “MyStandalone” can’t be opened.

I'm trying the above Terminal commands, however both are saying "no such file". Triple checked the name I'm using and tried removing ".app" tried while bundle was in Applications folder and when in Downloads folder.

I made it using - Max 8.0.6 (build c36dce5) apparently - as I found this in the info.plist file.

Tsuyoshi Aino's icon

For me (Mac 13.6.3), it worked better with an "--deep" option as follows:

codesign -s - --deep -f mystandalone.app

Don't forget to write full path for your app file or do the command in the same directory.

thomasswell's icon

none of this worked for me

tried max 9 but a bunch of my objects dont work

8.1.11 didnt help either.... when compiled with that i get completely blocked from running the app

thomasswell's icon

im on 15.3.1

im able to change the permission setting in privacy - accessibility for the max itself. And I can see that that permisiion is the culprit. It works for max itself. When I compile the app it asks me for permission... I give it to no avail. Ive found the right address of the app in my aplications forlder... in my case its /Applications/BM7.app

none of these move the needle

sudo xattr -cr /Applications/BM7.app

codesign -s - -f /Applications/BM7.app

codesign -s - --deep -f Applications/BM7.app

Source Audio's icon

If you build standalone WITHOUT using project,

and give it proper bundle indentifier in standalone inspector,

set own preferences path, you should be able to use your app

without restrictions.

thomasswell's icon

thanks for the reply Source

can you explain how to do this?

"set own preferences path"

Source Audio's icon

read standalone object help file

it is self explaining, just go through inspector settings

thomasswell's icon

i think i know what you mean by this

"and give it proper bundle indentifier in standalone inspector"

i put in a standalone app and labeled the bundle something I could remember and point terminal to.... instead of just myapp.myapp....

i dont see an option to use with or without a project

not sure what that means

thomasswell's icon

my app works in general it just wont let me control the mouse the way i can when its a max patch

thomasswell's icon

thanks so much

did the reading and put this together.... still no luck

not sure what to do with the preferences folder itself - if anything - doesnt seem to be created

I downloaded the latest version of 8. And now the mic access keeps popping up no matter how many times i allow it.... 8.1.11 didnt work for me.....





Source Audio's icon

I guess your app is upsidedown, because you launched it allready using different identifiers,

and who knows what.

I can't help you directly because I don't use MacOS higher then Catalina.

Maybe you need to investigate about TCC.db which is a file that stores

privacy settings.

Your posts are also a bit contradictory,

all works, but not mouse ?

or Audio ?

what is exactly the problem, and

what your app actually does ?

thomasswell's icon

basically it works as a patch

but it doesnt work when I make it an app

the redux of the app is just here attached and a screenshot of it. This is the part that doesnt work. My app does a couple of things to control pieces of hardware in my mix room. But the thing that isnt working is that the .app wont move my mouse. Even when I give it permission. I am not a programmer and my max chops are very spotty. Thanks for looking, Im doing more testing and reading to try! thanks. I can recompile and remake the app however needed.

REDUX.maxpat
Max Patch

thomasswell's icon

this video might be helpful

putting this code in terminal didnt do it for me

"codesign -s - --deep -f Applications/redux.app"

here's a video to the issue: https://f.io/lppqSOtT

here is a screenshot of my terminal - to be fair i have no idea what im doing in the terminal - i am clearly just copy and pasting things i dont understand. the thing is this is an app i made for an older computer and i rely on it. but am not spending anytime programming or using max. sorry for being such a n

oob

Source Audio's icon

1 you are using --deep option which is for older systems.

2 problem could be java - mxj that you use.

try

;

max pupdate $1 $2

message instead.

thomasswell's icon

thanks sound! that works great to move the mouse. It wont allow me to simulate a mouse click. whic uis something i need to do do outside the app itself. the cursor goes to a specific place does a click and then returns to the previous place. Apparently I need to use java to make the mouse click. Thanks for trying! thanks a lot!

Source Audio's icon

If java problem persists, you can try 11clicks external.

Which works great, just as all Olsen's software does.

thomasswell's icon

im going to just use it as a patch I think.

11 clicks seems great. same problwm with permission not truly granting me permission.

Rob Ramirez's icon

On macos 14 I have no problem running a standalone locally that uses 11clicks external, after giving it permission upon initial launch. Maybe things have tightened up once again for macos 15.

One thing I noticed in your screen shot is that you are passing the path to the app incorrectly:

codesign -s - --deep -f Applications/BM7.app

you are missing an initial forward slash, should be

codesign -s - --deep -f /Applications/BM7.app

no idea if that's the source of your problems, but thought I'd mention.

Rob Ramirez's icon

im going to just use it as a patch I think.

That sounds like the right move to me

thomasswell's icon

thanks RR

i fixed the forward slash and no dice :) thanks for trying

patch it is :)