Xcode 10.3 relative path to source file is wrong

Hi,


In my project, I have added a new source file. I added it as 'Relative to Group', but find that XCode is making a huge file path instead of just listing the file's name.


I would have expected:


MyFirmwareUpdateItem.swift


But instead I get:


../../../../../../../../../System/Volumes/Data/Users/My/Workspaces/MyProject/App/Sections/Firmware/Settings/Items/MyFirmwareUpdateItem.swift


The file is in the right place, and (already-existing) files in that same folder and group have been added fine (but already months ago).


Looking at the start of that, I see Volumes/Data. And that reminded me that I'm using Macos Catalina Beta, and my drive is formatted with APFS.

So is this a known issue?


NOTE:


Removing the reference and re-adding it doesn't help. I manually fixed it in the project.pbxproj file, but I think this is a bug of Xcode 10.3 working with an APFS file system.

Replies

Hi Peter,


I've encounterd the exact same behaviour.

Doesn't matter if it's the Beta version of Xcode or not.

Maybe this has something to do with Apple's new filessystem?


I've tried multiple idea's non of them seem to have an impact.

Your temporary solution is the one I use as well as a work around.

If you don't; Xcode will at some time start to place error's about files aren't found when they are clearly there.

I am also seeing the same behavior, although in my case removing the reference and dragging file back from finder works. Any one else have a more permanent solution?