I don't have permission to open an app I created

Hello,
I created an app in my iMac (running Catalina), built it as Universal and copied it into my MacBook (running Big Sur).
Whena I try to run it in the MB it says I don’t have permissions to open the app, although I’m the admin (see the screenshot - sorry, it’s in italian).
Is there something I did wrong or any catch while dealing with Big Sur?

Thank you
Screenshot of Bartender 4 (09-06-21, 10-54-29)

Hi @Armando_SORBI

It sound like some kind of problem related with Gatekeeper. May you try to go into your “Security and Privacy” in “System Preferences” and click to allow open it?

Apple has made macOS warn about all kinds of security things. You are allowed to run programs you create on your own machine without warnings, but programs transferred to another machine (even when run by an administrator) will get blocked unless code signed and notarized. As @Javier_Menendez mentions, you may be able to “Open Anyway” in the System Prefs > Security & Privacy > General settings. You may also need to right click the Finder entry to Open instead of double click to launch.

What I highly recommend is App Wrapper 4 to take the pain out of making programs be able to be transferred to another machine.

2 Likes

Wasn’t the same problem discussed a while ago? I don’t remember the solution.

Code signing. M1 code must be code signed. Universal builds contain M1 code. The error for it is just weird.

I do not know if you can “Open Anyway” the M1 code signing requirement.

Nope, I can still run an older version of my favourite Java app that isn’t codesigned at all.

Here is the topic I remembered: Access privileges

… an older version? That sounds like it’s not Apple Silicon, which does not have the requirement.

Edit: That is the thread I recall too, I was just summarizing the problem points. Here’s where Greg points out the problem

I’m trying App Wrapper as you said, I’m still confused about code signing since I don’t have an Apple Developer certificate, of course.
Will it work without one?

No, I tried right click and open but it did not work. I confess I did not modify OSX preferences to allow any app to run. I’ll try ASAP

I don’t believe so. I think the whole point of code signing is to tie the app to a known source (i.e. Apple Developer certificate). Without that, I think the only option is to ad-hoc code sign for the current machine once you install on another machine. Something you could do yourself, but not something you want to ask others to do.

There was a recent thread on how to ad-hoc code sign for your own machine you could search for.

I think Apple took that option away a few macOS releases ago, although there was a terminal command you could do at the time to get the option back. I doubt that terminal command still work on more recent releases.

What usually should happen though is once you try an app and get blocked, there should be a button in the prefs panel to open THAT app anyway. And then it should allow it on THAT machine without warning again.

Last I knew. I believe Big Sur still does that; I do not know about Monterey.

Have you held down the Option (Alt) key while selecting the “Open” command? If not, that’s still a “normal” opening.
P.S.: don’t be surprised if the enclosing window closes when you open with the option key. That key has two purpose (1: open item and close its window and 2: ask if you want to open a unsigned app anyway). The timing must be accurate to generate only 2:.

I tried but it does not work

Did you try to reset the permissions?

The only way I found it works is to use App Wrapper 4 (still in test mode), packe the app into a zip file, unzip it and it works. Don’t ask me why

No, you need to register as an Apple Developer. That gets you a developer id. Then you need to get the certificates. I seem to have four but I’m not sure which of these I actually need. Also you will need an app-specific password which you get from a different website than the developer site. Note: if you change your Apple-ID you will need to get a new app-specific password.

Once you have the certs you can code-sign your app. The app-specific p/w is needed for the notarisation step. Then, and only then, you can put your app on a website somewhere and people can download and run it.

AppWrapper can do both code-signing and notarisation.

1 Like

Your answer groups a lot of valuable information, especially for new users coming in this area, but also including some I was unaware of, like the need to get a new app password when you change your ID (I have no idea (no pun intended) how you can change your own ID, though; I always thought it was impossible).
So I’m wondering: is there somewhere in this forum (e.g. a function, or a thread) something to group useful answers like this, so we have filtered helpful posts for various subjects?
That’d be nice.

Well, if you forget your AppleID, you can’t login to the iCloud, etc etc. So you click on “I forgot my AppleID”, and you can then choose a new one. I found the hard way that this invalidates your app-specific passwords.

Of course they make it hard to choose a new AppleID, by refusing to let you re-use any that you’ve used in the previous 1000 years or so. And I always was forgetting mine, because I have no great reason to remember any of this stuff. So it’s written down now. Which is what everybody does, of course.

1 Like

It might be a problem with quarantine - programs and files transfered from another computer are marked with the so called “quarantine bit”, to be checked on start.

You can remove this bit by openiing a terminal and typing:

xttr -r -d com.apple.quarantine

then drop the app to the terminal window to get the full path to the app. With hitting Return, the quarantine bit is removed and the app should start without problems…

You can instead use apps with a graphical interface to do that job, like Sam Rowlands “Permisson Reset 2” (https://ohanaware.com/permissionsreset/) or my “Ausbruch” (Ausbruch - DeltaworX Software).

You’re talking about the password, or really the ID (“username”)?
If about the password, that’s usual. For the ID, I’ve never seen that anywhere, including in Apple, where I once needed this (changing my e-mail address, which is the Apple ID); that was just impossible at that time.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.