"The Application Cannot Be Opened"

Hello Everyone,

I’m trying to create a Mac build through a Windows machine, every time I make the build and open it up on my Mac it throws the error “Application Name cannot be opened”.

Can you please guide me through the steps on how to properly make a build for a Mac machine using a Windows machine?

Cheers!

2 Likes

Any ideas anyone?

You might need to right click (or ctrl-click) and then select “Open” to get around Mac security settings. Unless you code sign your application you may need to also disable Gatekeeper by setting System Preferences → Security & Privacy → Allow apps downloaded from “Anywhere”

I highly recommend turning that back on after you start your application if you do end up needing to allow apps downloaded from “Anywhere”

Thanks for your reply, that didn’t really work for me. Thanks for the reply though.

Another thing to check is that the executable flag is set on the process for the .app.

Check inside .app/Contents/MacOS/ with ls -al .app/Contents/MacOS/

Or just run chmod on the parent directory or file itself (won’t hurt if it’s already set)

chmod -R +x .app/Contents/MacOS

10 Likes

When you build a Mac app on Windows it exports what looks like a folder. That folder is the app. Ensure you are sending over the entire folder and not what’s inside the folder.

Also if it was a Security thing you would get a specific message for that (which you probably will).

1 Like

Good advice! Just don’t forget about security for the Mac Remove MacWizz ads virus from Mac OS X in Safari, Chrome and Firefox - MacSecurity. Now the virus protection is important

1 Like

thanks for the link

Hi. I have the same problem. I’m building from a Mac to another Mac, and I get the same error message. I’ve fixed permissions for everything and I can’t find a single thing online.

Anyone get a fix for this? I have suddenly started getting this problem with a new app created in Unity 2017 on windows - an old app worked fine and still works so I don’t get it, but this does not work when copied to mac

Edit: Ok so I had a weird problem. I had an updater and if I download through the updater the first time it would not run it. If I first copied the app and then later updated it, it was ok. Basically when downloaded the app was not being trusted or something but if overwriting an existing app was ok

I know its old but it was happening in my app now…using unity 2018.2.2f1… any solution?

Assuming you have already tried the other suggestions in this thread? The only other thing I would think to check off the top of my head is code signing.

codesign -vvvv your_app.app

This worked for me. Codesigning might essentially do this for you, I don’t know. I suspect a Linux build could give you the same problem.

2 Likes

Or you can do this:

chmod -R 777 .app

5 Likes

Catalina can be the problem.

1 Like

I’ve only just come across this problem today and found this link

Seems like another step towards just not making it worthwhile programming anymore, yet another hoop to try to jump through.

Giving my apps away free and then telling end users to open terminal etc etc I can see they wont…so that’s the end of me building to MacOS

As far as I understand it’s the developer that has to do all these steps, not the end user.

Ok thanks & agreed,

but has Unity said nothing on this subject? I feel like this is a big deal and it should be easier than searching for some posted steps and Unity could make it easier.
Is this similar to what a normal Mac dev does and where are those instructions?

Note there are 2 issues though - 1. Security if Mac does not allow uncertified apps, 2. If app copied from windows you have file attribute problems often

@andrews_unity ?
@nickrapp

So to be clear it is up to the dev to follow the proper notarization setups, as it does require information and apple accounts specific the dev etc… So this is something really the devs need to do.

As for the windows attribute issue there is not much we can do there sadly as windows doesn’t honor certain attributes properly.

As for the first issue around security, this is something that is global to any application that is not signed properly or notarized for macOS 10.15 its not something specific to unity. So unless the application is signed/notarized then you will have to explicitly open it as mentioned in this thread.

1 Like

Thanks, I think building for Mac in windows is a bit of an issue with Unity for these and other oddities like selecting a folder to build to and then finding it adding a .app folder/‘app’ next to it on finishing!
Certification is… what is it then!