I am not sure if it is related with beta software I am using. I've recorded a video which shows the problem:
https://youtu.be/AuxjNpylaMc
When I create new files in Xcode, they're put in super weird location which causes a lot of problems when pushing files to repository.
When I create a file in Xcode (no matter where in project, no matter which project I am loaded into, no matter where is the project located on my drive) this is how the relative path is generated:
../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
I've found out a solution which is to move the file in xcode project navigator to another group, which will make a copy of the file with valid path. I can then remove old file and move back copied version.
Is it related with macOS beta 4 version? Did they broke something? Is there any way to fix it?
(these invalid paths cause the project to work only on my machine)
macOS Catalina 10.15 Beta (19A512f) xcode Version 10.3 (10G8) (tested also on Xcode 11 beta 4 and same issue)
Clicking on the Folder icon next to the name will bring up an open panel from which you can choose the correct location of the file.
Importing into Xcode xcodeproj” extension in the root directory. Select the file and click Open. Xcode will open the project. On the left side you will see the Project Navigator, with a folder representing your project by name.
You can only open XCODEPROJ files with Apple Xcode in macOS. To open the file, select File → Open....
I came across the same issue right after updating to macOS Catalina Beta 4 as well. Here is a workaround:
Navigate to the project file in Finder, right click the xcodeproj > Open With > Other... > Enable: All Applications > [text editor of choice]. Open up the project.pbxproj
file.
Find the section named /* Begin PBXFileReference section */
and below it, locate the section where it says:
path = ../../../../../../System/Volumes/Data/Users/patryksredzinski/Desktop/PerfTester/PerfTester-Xcode/PerfTester-Xcode/wtfTableViewCell.swift
and replace it with path = wtfTableViewCell.swift
.
[filename].swift
.Hopefully a permanent fix will come out soon.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With