3

I'm using a PC and I've created a build for Mac standalone.

I shared the file with my test user by zipping and emailing the build, but when he tries to run the application he sees this error:

The application "SomeApp.app" can't be opened.

After some searching, I learned that I need to do chmod to open the file. Can anyone tell me how to do that on a Mac?

2 Answers 2

7

The zip format doesn't have easy support for Unix-like file permissions, so your transfer process is stripping any permission flags that OSX uses to recognize files within that zip that are supposed to be executable. This can also happen with other file transfer solutions, so it's something to watch out for.

The best solution would be to create an archive which does keep those permissions, such as a tar archive.

Failing that, you can have a Mac user open a terminal and set the permission flag manually:

chmod a+x SomeApp.app/Contents/MacOS/*

(Replace SomeApp.app with whatever your .app folder is named)

2
  • This line worked for me - chmod a+x SomeApp.app/Contents/MacOS/*
    – Siddharth
    Jul 12, 2017 at 15:13
  • Zipping from WLS worked fine to preserve the permissions too.
    – Caio Cunha
    Jun 19 at 19:30
0

I had the same issue, I left an answer here, at the bottom: https://forum.unity.com/threads/mac-build-breaking-when-uploaded-to-storage.1093330/

The problem was not with the .zip, but rather with the build itself. Ran fine on my Mac, did NOT run fine once I uploaded it and downloaded it again (or if anyone else downloaded it).

Edited 12/8/2021, as per EmiOB's suggestion, to add the text of my answer (same as in the link):

This worked for me on 2020.3.16f1:

  1. In the Unity Editor: Build Settings, check the box that lets you make an XCode project (requires having XCode installed, I believe I have Xcode 11)
  2. Open the XCode project
  3. Build

That solved my problem :)

2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – Emi OB
    Oct 25, 2021 at 10:41
  • @EmiOB great point! I'll edit it now. Dec 9, 2021 at 3:08

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.