Add Resources Folder to AUv3 setting is inverted


I noticed that the behaviour of this setting is exactly the other way around than its description:

Don’t Add resources folder to App Extension

If I enable this (= the box is ticked), I would expect that the Resources are not copied. However, it is exactly the other way around.

Also, the implementation in the Projucer exporter (that I suggested myself a few months ago) is not very clear as it’s using a lot of logic invertions and double negations up to a point that you could as well just roll a dice to figure out what it’s doing :slight_smile:

// Wow, very !logic, much brain
auto skipAUv3 = (target->type == XcodeTarget::AudioUnitv3PlugIn
                                 && ! shouldDuplicateResourcesFolderForAppExtension());

if (! projectType.isStaticLibrary() && target->type != XcodeTarget::SharedCodeTarget && ! skipAUv3)
    target->addBuildPhase ("PBXResourcesBuildPhase", resourceIDs);

So I’d suggest to just change the name (and the tooltip) to indicate the opposite behaviour.


I think what the code is saying here is that if you DON’T want the resource folder duplicated then skipAUv3 is true. So the next condition in the if statement is false and the resources are NOT added.

I do agree though that the condition is confusing…


Yes but shouldDuplicateAublablablabla() returns the value of the tick box which is the opposite of what the property label is saying.

The code above is not wrong, it just wasn‘t particularly helpful in finding out where the logic flip happened.


Got it, will fix this shortly.