How do I open the realm file when I enable Sandbox?

Asked 2 months ago, Updated 2 months ago, 3 views

When Sandbox is enabled, opening the realm file selected from OpenPanel causes an exception when creating the realm file folder.
Please tell me how to avoid it.
The realm file assumes that the user is in a selectable location in the OpenPanel.

swift macos realm

2022-09-30 11:44

2 Answers

I think there is an orchid called File Access under App Sandboxing on the Capabilities tab in the project settings. What happens if User Selected File is Read/Write?

2022-09-30 11:44

I have given up using the realm file selected from the Open Panel in update mode.
Instead, we decided to first select a directory in the Open Panel to give permission to read and write, and then change the realm file under that directory to the UI to select it.
Also, I decided to delete the realm related file (lock, note, management) when the application ends.

2022-09-30 11:44

If you have any answers or tips

© 2022 OneMinuteCode. All rights reserved.