Receiving writing-related error message while running a dmg app

1 次查看(过去 30 天)
Hi,
I’m receiving the below error message while running a dmg app created via Application Compiler.
I’m using macOS Monterey (v12). I checked all Security & Privacy configurations and enabled every possible option. The interesting thing is that when I run the m file inside Matlab, it generates the outputs successfully. Any ideas on how to handle this issue?
Thanks in advance,
Mel

采纳的回答

Melanie VT
Melanie VT 2023-3-7
Thank you very much @Walter Roberson. It turns out that dmg files compiled by Application Compiler cannot write to relative file paths. Changing relative paths into absolute ones solved my problem!
E.g.
Changing this:
writetable(data, 'file.xlsx')
into this:
writetable(data, fullfile(path, 'file.xlsx'))
Cheers,
Mel
  2 个评论
Melanie VT
Melanie VT 2023-3-7
As a matter of fact, it is. Because as I mentioned in my first message, the same m.file (that the dmg application is compiled) generates outputs successfully through Matlab Command Window in the same computer. However, the permission is somehow not granted when the same request is sent from the dmg application.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Entering Commands 的更多信息

产品


版本

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by