Skip to content

Commit

Permalink
Projucer: Disable hardened runtime for LV2 and VST3 helpers
Browse files Browse the repository at this point in the history
Enabling the hardened runtime also enables library validation, which
means that the manifest generator may not be able to load the built
plugin if the generator runs before the signing step.

The manifest generator tools should not be distributed/archived, so
disabling the hardened runtime for these targets is appropriate.
  • Loading branch information
reuk committed Jun 20, 2023
1 parent cb55176 commit 0bf9f74
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,11 @@ class XcodeProjectExporter : public ProjectExporter
owner.addObject (v);
}

bool shouldUseHardenedRuntime() const
{
return type != VST3Helper && type != LV2Helper && owner.isHardenedRuntimeEnabled();
}

//==============================================================================
String getTargetAttributes() const
{
Expand All @@ -1341,7 +1346,7 @@ class XcodeProjectExporter : public ProjectExporter
|| owner.getProject().isAUPluginHost());
capabilities["Push"] = owner.isPushNotificationsEnabled();
capabilities["Sandbox"] = type == Target::AudioUnitv3PlugIn || owner.isAppSandboxEnabled();
capabilities["HardenedRuntime"] = owner.isHardenedRuntimeEnabled();
capabilities["HardenedRuntime"] = shouldUseHardenedRuntime();

if (owner.iOS && owner.isiCloudPermissionsEnabled())
capabilities["com.apple.iCloud"] = true;
Expand Down Expand Up @@ -1397,7 +1402,7 @@ class XcodeProjectExporter : public ProjectExporter
if (owner.isPushNotificationsEnabled()
|| owner.isAppGroupsEnabled()
|| owner.isAppSandboxEnabled()
|| owner.isHardenedRuntimeEnabled()
|| shouldUseHardenedRuntime()
|| owner.isNetworkingMulticastEnabled()
|| (owner.isiOS() && owner.isiCloudPermissionsEnabled())
|| (owner.isiOS() && owner.getProject().isAUPluginHost()))
Expand Down Expand Up @@ -1687,7 +1692,7 @@ class XcodeProjectExporter : public ProjectExporter

s.set ("CONFIGURATION_BUILD_DIR", addQuotesIfRequired (adjustedConfigBuildDir));

if (owner.isHardenedRuntimeEnabled())
if (shouldUseHardenedRuntime())
s.set ("ENABLE_HARDENED_RUNTIME", "YES");

String gccVersion ("com.apple.compilers.llvm.clang.1_0");
Expand Down

0 comments on commit 0bf9f74

Please sign in to comment.