Installing on macOS Sequoia (security warning) and save as mod file workaround

Dynare is not yet approved into the Apple developer program. Trying to install the Dynare pkg on macOS Sequoia triggers an additional security layer. You need to go to the System Settings → Privacy and Security and scroll to Security. It will say there

dynare-VERSION-ARCHITECTURE.pkg was blocked to protect your Mac.
Apple could not verify “dynare-VERSION-ARCHITECTURE.pkg” is free of malware that may harm your Mac or compromise your privacy.

You need to click on Open Anyway. See also

Hi,

Having upgraded to Sequoia, I find it impossible to create a new mod. file.

Usual steps followed to setup Dynare:

  1. Set path - Add folder - Dynare - 6.2 - matlab
  2. Checked Preferences - Editor/Debugger - Language - File extensions - mod is included.

Does someone have a clue how to resolve the issue?

PS1: I can run already existing mod.files, it’s just that I can’t create a new one
The issue is summarised here

PS2: The problem initially showed up in 5.5-arm64 version, after having upgraded from Sonoma to Sequoia. I deleted 5.5-arm and upgraded to 6.2, but still the problem remains.

This looks like an issue in your Matlab settings. You can see in the screenshot that you are not changing the file ending itself. It is still .m. You only added .mod in the middle of the name.

The problem is that this started to appear after the upgrade from Sonoma to Sequoia.

In any case, I removed Matlab and all related files (clean removal) and re-installed. The problem seems to persist, and Matlab settings are all the default ones.

@wmutschl Do you know why that problem appears? Is it related to security features introduced?

Thanks for reporting this! This has nothing to do with Dynare, but is either a MATLAB or macOS Sequoia issue. I can confirm this behavior in both R2024b and R2024a running macOS Sequoia. I also did not have this issue previously (particularly in the older MATLAB versions).
I’ll ask at Mathworks why this happens and whether it is their choice to enforce this or some Apple API change.

Workaround: save the file as .m, then right-click the file and rename it.

Alternatively: Use Visual Studio code with the official MATLAB extensions (however debugger is not working yet), it works very nicely.

Thank you for looking into the issue.

Please keep us posted.

It has been reported to Mathworks and it is clearly not intentional, because e.g. if you save as “test.json” file it works. So something weird going on, they are looking into this bug. But again, nothing the Dynare team can do.

Perfect, thank you very much.