How to run apps on Mac

Hello, I am a University researcher in Psychology. I bought Xojo in order to be able to build some apps for running online psychological experiments. I built an app that runs well on Windows, but I need to distribute it also to students who have Mac (for running only once, in fact). Unfortunately, when they try to run the app, it turns out that this app can’t be opened because it is not authorized (“you don’t have permission to run…”). It should be only a warning, according to “Mac Code signing” Xojo page, but we could never succeed in opening the app. We tried all methods proposed in Apple site:

  • checked that the user has read-write permissions on this file
  • right-clicked on the app and Open
  • CTRL clicked and Open
  • went to the Security &Privacy panel and tried to grant an exception for the blocked app by clicking the “Open anyway” button in the General panel, but this button is never available.
    What can we do?? Thanks in advance.
    Alberto Greco

My first thought was the “right-click on the app and Open”,
but now there must be a 2nd thought as well:
Which macOS architecture are you building for?
Please look at "Build settings / macOS for “architecture”

Can Windows build 64bit apps at all?

I seem to remember that something like this came up at least once here in the forum. But I don’t remember the solution.

What platform and OS version are you using to create the build?

Do you know what OS versions are being used by the students?

The macOS build has to be 64 bit to run under recent macOS versions, and as @Beatrix_Willius mentions, those may not be possible to build under Windows yet.

If you are making a 64 bit macOS build, consider code sign and notarize. My personal preference for that is to use App Wrapper so I don’t have to keep up with the moving target that is Apple’s ever changing hoops to jump through.

1 Like

Thank you everybody. Well, I built the app on a mac of a student (it is not possible to build apps for mac on Windows anymore), BigSur version.
However the selected architecture was “x86 64-bit”, perhaps that was the reason, at least I hope so…!
I can try to select “Universal” and build it again, when the computer of my student will be available again.
But if the problem was the selected architecture, why the app opens and runs ok on the computer of my student from the Build folder created by Xojo, but not if the app is zipped and sent to other students? (one has BigSur also).
I asked Apple support but they responded that methods I used are all known ones for opening apps coming from unidentified developers…

Douglas, my app should be run only once by a single student. I had read about App Wrapper, but it seems requiring a fee. I already payed for Xojo and I am not a professional developer.

Sadly, I don’t expect that to do it. The x86 64-bit should run on the student’s computer, unless a M1 based machine without rosetta enabled. (And that is not overly likely, but possible. In which has universal build may help.)

But the fact your original post stated it could not be opened because it was not authorized (as opposed to wrong architecture) suggests to me an Apple block because it is not code signed. Apple has made it increasingly hard to run apps on another computer without being code signed. :frowning:

There is a terminal command that can be run on that will “ad hoc” code sign the app on the other computer. But it has to be run on that computer, I think.

I don’t recall the details, since I use App Wrapper. Somebody else may chime in or web search for something like “macos adhoc code sign”.

Sending a ZIP file to another macOS Computer marks this file as in quarantine (by setting the quarantine bit). Normally this file would be inspected by macOS and checked if its codesigned and notarized - to defend malware.
If you don’t wan’t to codesign and notarize, you have to provide a way to remove the quarantine bit. This can be done with a terminal command

xattr -r -d

(replace with the complete path to the app)

or you use a small app for this purpose. Sam Rowlands “Permissions Reset 2” (Permissions Reset 2) or my “Ausbruch” (Ausbruch - DeltaworX Software) will do that job free of costs…

Hello. I think I solved the problem. Thanks to your suggestions, I understood that it depended on the zip file. It had been sent using wetransfer, and perhaps with this method the file appears suspicious, perhaps this sets the quarantine bit. The method that appeared to solve the puzzle was to use the native Mac’s zip app and put the file on a cloud (onedrive). Thanks again for your valuable hints!

1 Like

If so, try a Memory Stick or an external hard disk to copy the application (may be handly) to students computers.

I’ve seen this happen when a user uploads the .app bundle to a file sharing service. In the process, the file sharing service automatically Zips the bundle, but does a poor job of it. When unzipped, file permissions are incorrect, and you get the (confusing) error messages. Using the macOS zip feature before uploading solves the issue.

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