MATLAB: Does the deployed executable error during post installation tasks

applicationapptranslocationdeployederrorgatekeeperinstallmacMATLAB Compilerpathrandomizationsierra

I have compiled an executable and sent it to a colleague who is having trouble getting it installed.
The error message he gets is "File '/private/var/folders/24/94n68sdn20q28xdxtkkyhc6c8j4kms/T/AppTranslocation/59EC60A1-E0EC-4F65-8467-0E096690FF6B/d/myApp.app/Contents/Resources/bundle.zip' does not exist."
This error is encountered just prior to the "Performing post-installation tasks" part, after the MATLAB Compiler runtime has been checked and installed.
I created the application with MATLAB Compiler in Mac OS Sierra 10.12.6. My colleague is trying to install it on his computer that runs Mac OS High Sierra 10.13.3.
I've tried using the application compiler in both R2016a and R2018a but both produce the same error. He has both MATLAB Compiler Runtimes installed. Why is this happening?

Best Answer

Mac Sierra introduced a new security feature called gatekeeper path randomization. This security feature makes it difficult to run applications installed outside of the Mac App Store.
To see if this is the issue, open a new terminal on the target machine. Within the terminal window, navigate to the location of the deployed application. Execute the following command.:
sudo xattr <appName>.app
This will display any external attributes attached to the application. If the attribute "com.apple.quarantine" is present, the app will not function properly.
This attribute can be manually deleted with:
sudo xattr -d com.apple.quarantine <appName>.app
The application should now function properly.