Custom PList in Projucer 4.1.0


Hi,
I am trying to add custom elements to the Projucer-generated Info.plist file for an audio plugin.


The below shows the Info.plist file generated by Projucer when Custom PList is left blank:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
  <dict>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>com.mycompany.myprod</string>
    <key>CFBundleName</key>
    <string>MyProd</string>
    <key>CFBundlePackageType</key>
    <string>TDMw</string>
    <key>CFBundleSignature</key>
    <string>PTul</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleVersion</key>
    <string>1.0.0</string>
    <key>NSHumanReadableCopyright</key>
    <string>My Company</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>AudioComponents</key>
    <array>
      <dict>
        <key>name</key>
        <string>My Company: MyProd</string>
        <key>description</key>
        <string>MyProd</string>
        <key>factoryFunction</key>
        <string>MyProdAUFactory</string>
        <key>manufacturer</key>
        <string>MYCO</string>
        <key>type</key>
        <string>aumu</string>
        <key>subtype</key>
        <string>MYPD</string>
        <key>version</key>
        <integer>65536</integer>
      </dict>
    </array>
  </dict>
</plist>

I'm trying to add
    <key>sandboxSafe</key>
    <true/>
within the AudioComponents array/dict (i.e. to be included along with all the other key/values)

However, if I populate the "Custom PList" area of Projucer 4.1.0 with this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
  <dict>
    <key>AudioComponents</key>
    <array>
      <dict>
        <key>sandboxSafe</key>
        <true/>
      </dict>
    </array>
  </dict>
</plist>


Then the new Info.plist file created by Projucer contains two separate AudioComponent arrays, and XCode seems to only interpret the last entry (which doesn't have my custom options):


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist>
  <dict>
    <key>AudioComponents</key>
    <array>
      <dict>
        <key>sandboxSafe</key>
        <true/>
      </dict>
    </array>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>com.mycompany.myprod</string>
    <key>CFBundleName</key>
    <string>MyProd</string>
    <key>CFBundlePackageType</key>
    <string>TDMw</string>
    <key>CFBundleSignature</key>
    <string>PTul</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0.0</string>
    <key>CFBundleVersion</key>
    <string>1.0.0</string>
    <key>NSHumanReadableCopyright</key>
    <string>My Company</string>
    <key>NSHighResolutionCapable</key>
    <true/>
    <key>AudioComponents</key>
    <array>
      <dict>
        <key>name</key>
        <string>My Company: MyProd</string>
        <key>description</key>
        <string>MyProd</string>
        <key>factoryFunction</key>
        <string>MyProdAUFactory</string>
        <key>manufacturer</key>
        <string>MYCO</string>
        <key>type</key>
        <string>aumu</string>
        <key>subtype</key>
        <string>MYPR</string>
        <key>version</key>
        <integer>65536</integer>
      </dict>
    </array>
  </dict>
</plist>

Is there a way to create the custom Info.plist that I'm describing?

Thanks for any guidance.

Best, Andrew

p.s. Apologies that this posting is not better "code" formatted, but whenever I tried to code-format more than one area of the post, everything from the first code-formatting onward became code formatted (Safari).

 

 

Could be that the plist merge algorithm would need to be smarter to handle that - I don't think it's designed to do anything more than look for a list of key/value pairs, it won't deal with sub-trees.

OK .. thanks for at least confirming that I wasn't missing something obvious .. smile.

Best, Andrew

Hi, is there a workaround for this? This still seems to be an issue, even on the latest tip.

It seems that the PList still has issues. And to be honest, I wish that the JUCE developers would have a policy where if they know that a feature has problems, they should give us the option of just letting XCode handle it and stop overwriting what we set up in XCode. I appreciate the great library of code, but I just wish JUCE would stick to what it was good at and leave everything else as it is.

1 Like