This could be due to the fact that NSOpenPanel, like most macOS APIs, is designed to run within the context of a user-level process rather than a system-level process. Running an application under root privilege can cause system-level APIs to behave differently or fail to function altogether.
To resolve this issue, you can try running your application with standard user-level permissions instead of root privilege. Alternatively, you can investigate other ways to interact with the file system that are more suitable for use within a system-level process.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-12 02:43:23 +0000
Seen: 11 times
Last updated: Jun 12 '23
How to add a custom button in SwiftUI for iOS13 that enables going back between screens?
How can the update of properties from both ParentViewModel and ChildViewModel in SwiftUI be solved?
Can SwiftUI be utilized to restrict the touch region for a drag gesture?
How can the color of a selected element (Picker) be modified in SwiftUI for WatchOS?
How to make a calendar layout that is horizontal using Swiftui?
What is the process to add a radio button with a check mark on a TableView cell using Swift?
How to limit UITextField input to only accept numerical values?