Jump to content

Application ignores working directory


Josh
 Share

Recommended Posts

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

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

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.

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

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.

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

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.

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

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.

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...