IN-63294 Issue with PBXProject.GetPBXProjectPath in Unity Build Process

I’m currently working on modifying the Xcode project file using PBXProject in a Unity build process. I encountered an issue where the path returned by PBXProject.GetPBXProjectPath is not what I expected.

Here’s the relevant part of my code:

static void OnPostProcessBuild(BuildTarget target, string path) {
    var projectPath = PBXProject.GetPBXProjectPath(path);

After executing this, I received a path that includes “Unity-iPhone.xcodeproj”.
However, I was expecting the path to be “Unity-VisionOS.xcodeproj”.
It seems like the PBXProject.GetPBXProjectPath method is not returning the correct path to the Xcode project file.

Has anyone else experienced this issue or have any insights on why this might be happening? Any help or suggestions would be greatly appreciated.

Thank you in advance!

1 Like

I have sent a bug report.

We’ve actually forked this entire Xcode Manipulation API and have fixed this and fixed/added other things in our own version

1 Like

Same issue.