Validate Project Settings issue

For a while now, when Introjucer projects open in Xcode there’s an issue about validating project settings. The reason is that it wants to enable building for the active architecture only in debug builds. Introjucer does in fact enable this via ONLY_ACTIVE_ARCH, but does so at the target-level instead of at the project-level as Xcode would like.

To silence the issue, here is a patch that simply moves that variable up to the project-level:

Index: extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
--- extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h	(revision 8430)
+++ extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h	(working copy)
@@ -680,6 +680,13 @@
             s.add ("GCC_INLINES_ARE_PRIVATE_EXTERN = YES");
+        if (config.isDebug())
+        {
+            if (config.getMacArchitecture() == osxArch_Default
+                 || config.getMacArchitecture().isEmpty())
+                s.add ("ONLY_ACTIVE_ARCH = YES");
+        }
         if (iOS)
             s.add ("\"CODE_SIGN_IDENTITY[sdk=iphoneos*]\" = \"iPhone Developer\"");
@@ -813,10 +820,6 @@
             defines.set ("_DEBUG", "1");
             defines.set ("DEBUG", "1");
-            if (config.getMacArchitecture() == osxArch_Default
-                 || config.getMacArchitecture().isEmpty())
-                s.add ("ONLY_ACTIVE_ARCH = YES");
             s.add ("COPY_PHASE_STRIP = NO");
             s.add ("GCC_DYNAMIC_NO_PIC = NO");

Thanks, I'd been meaning to chase that warning and sort it out - will take a look at it now!

Thanks for the fix! I also have one more suggestion with regard to that pesky QuickTime.framework linker warning about it being 32-bit only. What I’ve done in my Introjucer is to exclude the QuickTime framework if the JUCE_QUICKTIME flag has been disabled. That way, at least if I’m not using QuickTime I can avoid the warning by setting that flag to disabled. Not a perfect solution, but much cleaner than trying to do something conditional based off of the architecture.

Adding this in addFrameworks() does the trick for me:

Index: extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h
--- extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h	(revision 8512)
+++ extras/Introjucer/Source/Project Saving/jucer_ProjectExport_XCode.h	(working copy)
@@ -861,6 +861,9 @@
             StringArray s (xcodeFrameworks);
             s.addTokens (getExtraFrameworksString(), ",;", "\"'");
+            if(project.getConfigFlag ("JUCE_QUICKTIME") == Project::configFlagDisabled)
+                s.removeString("QuickTime");
             s.removeDuplicates (true);
             s.sort (true);

Ok, seems like a good idea to add that. And it might be possible to disable it automatically in the 64-bit build, I'll see what I can do.

Hey Jules,

I have loaded (I think...) the latest commits from GitHub  but I still get these warnings, which seem to prevent my app from being accepted by Apple.

Is there something special I need to do or did you just NOT have the time to fix this (or is it safe to implement the workarounds suggested above)?


It's almost a year ago and is a simple fix, I'm sure I would have done it. You should check the code yourself if you want to make sure..

mmm... weird... the code is there indeed and I re-compiled it jic, and set the JUCE_QUICKTIME flag to 0 (JUCE_QUICKTIME=0 in my app's Introjucer's preprocessor window) and still get the following message:

ld: warning: ignoring file /Applications/, file was built for i386 which is not the architecture being linked (x86_64): /Applications/

Any hint on what I am doing wrong ?

did you re-save your project with the new introjucer?

Yes of course. But thanks for suggesting (it could have been something like that, I usually miss the obvious...).

Actually the procedure above does not work because you added a flag box in Introjucer for the juce_video module which probably overwites this.

So the solution is to remove the juce_video module, if you don't use it, or set the JUCE flag box in the juce_video window to Disabled.

Again, the JUCE_QUICKTIME=0 in preprocessor window is not sufficient.

Just reporting this in case somebody falls in the same case. Maybe Disabled should be the default case in juce_video flag box ?