XCode projects creation broken after commit 882be2606

Hi guys,

I’ve updated to the latest tip (7d71efe6e), rebuilt the Projucer and updated an existing project. XCode can’t open the project due to parsing error, identifying the file as damaged. I’ve tested creating a brand new project from Projucer and the result is the same.

Before updating to the latest tip, I were on JUCE 6.0.5, stable, on my test machine (Apple Silicon Macbook Pro) with XCode 12.4
Making projects with Projucer worked as expected with 6.0.5. No errors of that kind.

EDIT:
Looks like that the issue has been introduced with the develop commit 882be2606
Before that one, any XCode project created/saved by Projucer works as expected.
@ed95 @t0m please can you check?

Thanks!

I’ve just double checked this. On an M1 machine I can check out the develop branch, compile and run the Projucer, create an empty default JUCE project, export that to an Xcode project, and open that in Xcode 12.4.

There must be something else going on.

I can’t imagine what… the machine is brand new, with macOS 11.2.1, and only has JUCE with a couple of our projects I cloned from our repo to test if they build and run here.

EDIT:
I just tried removing my JUCE folder, cloning again, checking out develop, building Projucer, making a new project. Same error.
More info… my XCode build is 12D4e.

Anyways, going back to develop commit ba37f915d, the one before the pbxproj changes, makes everything working as expected. Moving to 882be2606 and the XCode projects fail.

If you have some 'OTHER_XCODE_FLAGS` (or similar, don’t remember now the JUCE names).
sometimes failed escaping results broken Xcode projects.

That’s not the case, since I’m testing this issue with factory Projucer’s new projects, so I don’t even add the company name.

TL;DR:

  • XCode projects created with Projucer built with develop commit up to ba37f915d (Jan 27th) works fine.
  • XCode projects created with Projucer built with develop commit AFTER ba37f915d are broken.

Can you share the broken project.pbxproj file?

1 Like

Sure. I guess I found what’s causing the issue. I tested it by creating a new GUI project, which is less complex than the Plugin one. I found that MTL_HEADER_SEARCH_PATHS lines are ending the line with \ " instead of \ “”.

Fixing that will get the project to open as expected.

project.pbxproj.zip (4.8 KB)

The attached file is the “bad” one. Check on lines 298 and 355.

thanks!

EDIT:
confirmed. I did the same work on the Plugin project file. Fixing the endings of all the MTL_HEADER_SEARCH_PATHS lines made the project working.

And I think I’ve found what’s causing the missing quotes at the end of these lines. My path to JUCE contains whitespaces. If I rename the folders having whitespaces, the project is working fine even with dev tip. I think this needs to be addressed, since I cannot rename all folders in my production machines.
Thanks!

1 Like

We’ll get this fixed. Thank you for reporting.

1 Like

When implementing the fix, please also consider situations where the folders may contain environment variables that need to be resolved.

In my situation, I need include folders that look something like this:
$(MYSDK)/include

I don’t have any spaces in the folder names and I am experiencing a similar problem.

Have you tried the develop branch? The fix is already on there, so if you’re still experiencing problems then it might be something else. Does reverting to before 882be2606 make things behave as expected?

EDIT: works with commit 060f96a

I got the same problem, too., using public release of JUCE v7.0.7.

I was about to attach the problematic VST plugin project file here, but:

Okay… I can’t find where hinders the pbxproj file from being loaded.
The problematix pbxproj file content is here: JUCE 7.0.7 default Xcode project `pbxproj` file error. · GitHub

This issue still exists after downgrading JUCE from 7.0.7 to 7.0.6.

Can you please share the .jucer file that was used to generate this project?

I can repro the problem now. It’s caused by having JUCE under !JUCEDev and XCode apparently doesn’t like the ! in include paths or something.

This can be a quick remedy for you, I’m not sure yet if there is even a way to properly add such a path everywhere in an XCode project.

2 Likes

A little off-topic, but is there a way to reliably show certain files/folders at the top of lists everywhere (eg. in Finder/Explorer and when using ls in a shell)?

I’ve done stuff like prepending + or _ to folder names in order hack this required behaviour into alphabetical sorting, and I’m sure it’s something lots of people do. It’s also caused me issues with certain software assuming a folder name would never start with a + for instance. So surely there must be some way to achieve this built into macOS/Windows to avoid these dirty work-arounds and then the inevitable errors due to bad assumptions that programmers are wont to make?

Many thanks.

Paths containing exclamations work with my other Xcode projects (written in Swift), hence my confusion with what you have found. I wonder whether this is an Xcode-specific incompatibility issue.

I’m closing this GitHub issue now: [Bug]: JUCE 7.0.7 always exports wrecked VST Plugin projects for Xcode. · Issue #1268 · juce-framework/JUCE · GitHub