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!
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"
Another thing to check is that the executable flag is set on the process for the .app. Check inside <app name>.app/Contents/MacOS/<executable name> with ls -al <app name>.app/Contents/MacOS/<executable name> Or just run chmod on the parent directory or file itself (won't hurt if it's already set) chmod -R +x <app name>.app/Contents/MacOS
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).
Good advice! Just don't forget about security for the Mac http://macsecurity.net/view/130/. Now the virus protection is important
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
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.
I've only just come across this problem today and found this link https://gist.github.com/dpid/270bdb6c1011fe07211edf431b2d0fe4 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
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.
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!
Yeah, I experienced the issue during development while trying to deploy a test build to Mac (which was created on Windows). But when you publish a Mac build on Steam, for example, this is not relevant to the end user because their computer has already "trusted" Steam. This means when they download the application it will be installed on Steam paths with executable permissions and there will be no launch issues.
I found another thing: the default zip extractor is worse on Catalina, I don't know what it does but it does not allow the app to be executed if extracted with the default system zip management. By extracting a zip file with a 3rd party application like The Unarchiver (free on the Mac App Store) or Keka (paid) etc, it should run fine. - Build the Mac app on Windows or Linux, wherever, and zip it to share on the Internet - Those who download, do not double click it: right click and extract using a 3rd party extractor like The Unarchiver or Keka - Double click the extracted app, Mac will show a message saying that it is not allowed to run - Go to system security settings, unlock it and click to open it - Now it should work! This sucks, it is the way Apple works, they hate indie developers... Making it harder each time to run apps that do not pay them that $100 per year. Someday in the future probably they will completely block the loading, like they already do on iOS. By the way on Catalina it still works like this. Hope that it helps!
I had this problem when sharing a Unity app with a friend using OS X 10.15.6 (Catalina) via dropbox. Both the following steps were needed before he could open it without the 'application can't be opened' message: Change the permissions of the executable file as others mentioned above Specifically allow the app in System Preferences > Security & Privacy > General > Allow "...<app name>"
So is there no way of fixing this issue using a Windows PC? I don't have access to Linux or Mac so I can't change the permissions using the methods described above.
I got it to work by building as an XCode project, clicking archive in xcode, then distribute app with developer ID. Xcode takes care of all the signing so you don't need to do any terminal nonesense.
Thank you, this looks like only way to handle this problem. All other solutions are for running application only for the developer's mac. If you want to create .dmg file from windows build, export xcode project and archive it on xcode.