But how does Mac work?

I have a desktop application that I mostly compile for Windows. I also compiled it for Mac, resulting in what is called a “bundle”, which is a folder that contains various files and subfolders. On 3 Macs I had no problems (one of them has S.O. Sierra, the other two I don’t know). This morning I can’t start the app on a Monterey, doing the classic double click on the bundle obtained from the compilation. is it a problem of apps not downloaded from the store? what should be done to run the app?

Do you see an error?

Your app should be properly code signed and for transport packaged, e.g. as dmg file.

Yes, a generic error “the application cannot be run” appears.

So it must be “signed”? I have no idea what this means and how this is done. Maybe on some older Mac versions it wasn’t mandatory? (since I managed to run the app)

Are you sure the bundle is copied fully?
e.g. if you miss files within the bundle.

Also read here:

Where are you running the IDE and creating the app? Can that be done under Windows these days?

I thought the IDE if run under macOS, at least, did a generic signing of an app being built for macOS. It looks that way when I create such an app, anyway.

Yes I’m sure. As I said before, I have successfully tested the app on 3 different Macs. I have the bundle generated by the compilation, as it is, plus 2 other folders that I copy by hand into “Application Support”. The app (the bundle) I copy it on the desktop, it is not “installed”

I compile the app on a Mac (Sierra) we have in the company. Cannot compile on windows. I use Xojo 2019 R 3.1

OK. Then have you tried doing: Right-Click → Open on this app?

Of course.
The owner of this Mac, on which I am having problems, claims that from the Monterey version it is not possible to run App not downloaded from the store or in any case App not “signed”.

Then you need to code-sign it. I use AppWrapper for that. Two clicks and it’s done. You may need to notarise it too, which AppWrapper can also do.

In any case for code-signing you need to (1) register with Apple as a developer and pay $100/year for the priviledge, (2) download from your Apple Developer login, and installl into keychain, some certificates, (3) obtain an app-specific password for the app and supply that to AppWrapper.

I’ve no idea what the purpose of these certificates and passwords is, other than that, with them, it all works.

1 Like

There are things is place to avoid a novice user to run/install malware.
So by default it will reject unsigned applications, which are also not notarized.

There are steps you can go through to properly sign and notarize your app and upload it as dmg to a website for anyone to download.

1 Like

Thanks everyone for the answers. This is all quite unpleasant, I’ll see what to do.

I agree 100%

unfortunately AppWrapper (I did not understand if it is free or paid) does not work with the version of the Mac we have in the company. Is it possible to sign the bundle compiled by Xojo with XCode?

AppWrapper is paid. It runs under Mojave anyway as I use that. I don’t use xcode so can’t answer that, sorry.

So, no, you can’t use Xcode to sign the app, but you can use the command-line tools. The main problem I see is the system that you are compiling on. Sierra. That’s macOS 10.12, which was

  1. Before any of the serious security changes were made
  2. 6 years old, so you’re not getting any security updates
  3. Old enough that you can’t run a modern version of Xcode anyway

I’m also assuming that because of your aversion to paid software that you do not have a paid Apple Developer account, which you will need to get the signing certificates anyway. That’s $99/yr in the United States.

IMHO, If you are serious about developing for macOS, you will need a system that runs at the very least 10.15 at this point.

I have absolutely nothing against paid systems (I used the very good .NET framework, I use Xojo).

I am averse to Mac and these absurd mechanisms, but not for the money itself, but for the difficulty of things.

In the company we should have an old developer account. But right now I don’t know if it’s expired and I don’t know how to use it. I was just reading about this command line possibility, but right now I can’t find CLEAR material explaining how to do it.

But, are you telling me that from this Mac I won’t be able to get a working app on Monterey or Ventura ??

1 Like

I didn’t read the full thread but when compiling in Windows the resulting package is a TAR file. DON’T UNPACK IT in Windows. Move the file.tar to a Mac, and unpack there or important flags are lost in the process, like the EXECUTE flag, and you will end with an APP bundle useless that does not run, regardless signing or whatever.

I thank you. I compile directly on a mac. On that mac it works. On two other macs it worked too. This morning on yet another mac, no.

compiling on mac i get the .app bundle

i am trying to sign it via command line codesign.

I have an error message: resource fork, finder information or similar detritus not allowed

What Xojo version? Looks like an old one.