Two different provisioning profiles in Projucer

I would like to use two different provisioning profiles in my synth plugin project:
- first one for AUv3
- second one for all other targets

I need this because the bundle identifier for AUv3 is different.

When I set PROVISIONING_PROFILE_SPECIFIER = << My First Profile >> in custom xcode flags then it is being used for all targets. I haven’t found a way to set a second profile specifically for AUv3 target.

Is this possible in Projucer?

Thanks,
Antoan

EDIT: Or maybe I don’t need to separately build/export AUv3 if it is already bundled inside the standalone APP?

EDIT: Or maybe I don’t need the Standalone app if it is bundled inside the AUv3 target?

Alright, I found a solution.

  1. AUv3 extension is bundled inside the Standalone app so I need to distribute only the app.
  2. I don’t set any provisioning profile in Projucer.
  3. In Projucer I set only my Development Team ID:
  4. Then after I Archive the Standalone project I choose to distribute it with Developer ID:
  5. Then I upload it to Apple for notarization:
  6. Then XCode detects that something is not right with my signing and allows me to manually fix it:
  7. … and then finally it allows me to select the two different provisioning profiles for my app and appex:

After this everything else goes smoothly and my app get successfully notarized!

Hope this helps someone with the same issue.

Cheers,
Antoan

Hi! I have the same problem, I use two different provisioning profiles in my project, like @antoan:

  • one for AUv3 AppExtension
  • one for Standalone Plugin

unfortunately I have to configure a CI and from the Projucer I can only add into Custom Xcode Flag one provisioning for the Standalone target adding PROVISIONING_PROFILE_SPECIFIER flag.

Since every time I restart from the Projucer all Xcode configurations are overwritten, I can’t customize each target with a different provisioning profile values.

I solved this adding a script that directly modifies the Xcode project but it would be very useful to have in Projucer the possibility to set two different profiles.

I believe this is possible already, without making any changes to the Projucer.

In the “Custom Xcode Flags” field, you can do something like this:

"PROVISIONING_PROFILE_myplugin - Standalone Plugin" = abc,
"PROVISIONING_PROFILE_myplugin - AUv3 AppExtension" = xyz,
PROVISIONING_PROFILE_SPECIFIER=$(PROVISIONING_PROFILE_$(TARGET_NAME))

Please try this out and let me know if it solves your problem.

1 Like

Thank for your help, but the solution doesn’t work for me, I receive this errors on archive:

error project: "myplugin - Standalone Plugin" requires a provisioning profile with the App Groups, iCloud, and Inter-App Audio features. Select a provisioning profile in the Signing & Capabilities editor.

error project: "myplugin - AUv3 AppExtension" requires a provisioning profile with the App Groups, iCloud, and Inter-App Audio features. Select a provisioning profile in the Signing & Capabilities editor.

Seems that something still not configured correctly into project.pbxproj

  • Have you set a Development Team ID and Code-Signing Identity in the Projucer’s Xcode exporter options?
  • Have you definitely downloaded the profiles to your build machine (Xcode preferences → Accounts → Download Manual Profiles)?
  • Does the provisioning profile show up as expected on the “Signing & Capabilities” pane of the target settings?

For the AUv3SynthPlugin project, I put the following in the Custom Xcode Flags, for both Debug and Release configurations:

"PROVISIONING_PROFILE_AUv3SynthPlugin - Standalone Plugin" = "Test provisioning profile 2",
"PROVISIONING_PROFILE_AUv3SynthPlugin - AUv3 AppExtension" = "Test provisioning profile 1",
PROVISIONING_PROFILE_SPECIFIER=$(PROVISIONING_PROFILE_$(TARGET_NAME))

Then, Xcode shows the correct profiles when I select the Standalone/AUv3 from the list of targets.
Screenshot 2022-09-29 at 17.25.04

If it still doesn’t work after checking all of the above, you could try comparing the Projucer-generated xcode project against one modified by your script. Does your script just add PROVISIONING_PROFILE_SPECIFIER fields, or does it make other changes?

Hi @reuk, thanks for your time.

Yes, I’ve set Development Team ID and Code-Signing Identity.
I’ve downloaded the profiles in my build machine.
I follow you suggestions and I’ve added into Custom Xcode Flags, for both Debug and Release configurations this:

"PROVISIONING_PROFILE_myplugin - Standalone Plugin" = "myplugin Profile",
"PROVISIONING_PROFILE_myplugin - AUv3 AppExtension" = "myplugin AUv3 Profile",
PROVISIONING_PROFILE_SPECIFIER=$(PROVISIONING_PROFILE_$(TARGET_NAME))

And also for me Xcode shows the correct profiles when I select the Standalone/AUv3 from the list of targets.

But when I try to Archive my product I receive this errors:
error project: "myplugin - Standalone Plugin" requires a provisioning profile with the App Groups, iCloud, and Inter-App Audio features. Select a provisioning profile in the Signing & Capabilities editor.

error project: "myplugin - AUv3 AppExtension" requires a provisioning profile with the App Groups, iCloud, and Inter-App Audio features. Select a provisioning profile in the Signing & Capabilities editor.

Can you successfully Archive your test project?

In the meanwhile I continue to use my script that directly modifies project.pbxproj setting with the right profiles.

How are you archiving, and when do you see that error (during archive, or during export, or at some other point)?

Here, I’m running the following commands:

xcodebuild -scheme "AUv3SynthPlugin - Standalone Plugin" clean archive -configuration Release -archivePath out.xcarchive 
xcodebuild -exportArchive -archivePath out.xcarchive -exportOptionsPlist ~/Desktop/export.plist -exportPath ~/Desktop/archive

Both of these exit without errors, as long as I specify a valid provisioning profile. If I deliberately set a missing provisioning profile, then the first step still succeeds, but produces a completely unsigned binary. Then the following step fails, depending on the contents of the exportOptionsPlist. However, I’m still able to export the unsigned binary successfully with an exportOptionsPlist like the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>teamID</key>
    <string>10-letter team identifier would go here</string>
    <key>provisioningProfiles</key>
    <dict>
        <key>bundle ID one</key>
        <string>profile one</string>
        <key>bundle ID two</key>
        <string>profile two</string>
    </dict>
    <key>signingStyle</key>
    <string>manual</string>
</dict>
</plist>

If the archive step is giving you problems, perhaps you might have more luck clearing the custom Xcode flags from the Projucer project, and specifying the provisioning profiles in the export plist instead.