Josh Posted July 12, 2021 Share Posted July 12, 2021 It appears Mac applications are ignoring the current working directory set by Xcode, and do not even start in their own directory. Instead it always starts in some weird /..../libraries/blahblahblah/ folder. Very simple Xcode project here demonstrates the problem: testproject.zip Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 Occurs in Xcode 12.2 and 11.3.1 on OSX Catalina. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 Forum topic on Apple's site here: https://developer.apple.com/forums/thread/684650 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 Maybe related to this: https://www.symscape.com/node/1727 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 If I change the current directory using either NSFileManager:changeCurrentDirectoryPath or _wchdir, both functions succeed, but a following call to get the current directory fails. If getcwd is used, it produces errno 1 (operation not permitted), and NFFileManager.currentDicrectoryPath is equal to nil. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 I enabled full disk access to the application in the security and privacy system settings, but it seems to make no difference. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 I think the only way I can make this work is by copying all the project files into the application bundle like Apple wants. I don't think there is any other way with the restrictions they have added in recent versions of macOS. See the link above for more detail. This means ALL files in Materials, Models, Sound, etc. will get embedded in your Mac builds, not just the files your project uses. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 12, 2021 Author Share Posted July 12, 2021 Update is available now on Steam that has all this working now. It's a little different than how things worked previously but it is more compatible with the Mac App Store. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 13, 2021 Author Share Posted July 13, 2021 At the same time, VSCode is able to access all files everywhere, even if I remove permissions in the system settings. There's no rhyme or reason to it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted July 13, 2021 Author Share Posted July 13, 2021 I think I found the explanation...what a mess this is: https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html https://stackoverflow.com/questions/47902995/read-and-write-permission-for-user-selected-folder-in-mac-os-app Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.