C library fopen fails

63 views Asked by At

My macOS swift project incorporates a c library. This library has a function, which requires the path for a file as a string, then internally it opens a file at that path and does its stuff. However it fails to open the file

When the app is run in a sandbox the function successfully opens the fils (e.g. on the root of the container), and everything works fine. As soon as the sandbox is disabled, even if I previously open a OpenPanel instance and grant access to the folder in which the file will be open, the function fails to open the file and "throw" an error.

Which is the proper way to handle this situation? (this app cannot run in a sandbox for other reason, so this is not a valuable option for me)

0

There are 0 answers