Browse Source

Projucer: Fixed a bug in the iOS exporter where app group entitlements weren't being added correctly

tags/2021-05-28
ed 8 years ago
parent
commit
7ca714dfbb
1 changed files with 16 additions and 7 deletions
  1. +16
    -7
      extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h

+ 16
- 7
extras/Projucer/Source/Project Saving/jucer_ProjectExport_XCode.h View File

@@ -808,6 +808,20 @@ public:
return (fileType == executable && type != ConsoleApp) || fileType == pluginBundle || fileType == macOSAppex;
}
//==============================================================================
bool shouldAddEntitlements() const
{
if (owner.isPushNotificationsEnabled() || owner.isAppGroupsEnabled())
return true;
if (owner.project.getProjectType().isAudioPlugin()
&& ( (owner.isOSX() && type == Target::AudioUnitv3PlugIn)
|| (owner.isiOS() && type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA())))
return true;
return false;
}
//==============================================================================
StringArray getTargetSettings (const XcodeBuildConfiguration& config) const
{
@@ -946,8 +960,8 @@ public:
if (! config.codeSignIdentity.isUsingDefault())
s.add ("CODE_SIGN_IDENTITY = " + config.codeSignIdentity.get().quoted());
if (owner.isPushNotificationsEnabled())
s.add ("CODE_SIGN_ENTITLEMENTS = " + owner.getProject().getTitle() + ".entitlements");
if (shouldAddEntitlements())
s.add (String ("CODE_SIGN_ENTITLEMENTS = \"") + owner.getEntitlementsFileName() + String ("\""));
{
auto cppStandard = owner.project.getCppStandardValue().toString();
@@ -1011,11 +1025,6 @@ public:
s.add ("SEPARATE_STRIP = YES");
}
if (owner.project.getProjectType().isAudioPlugin()
&& ( (owner.isOSX() && type == Target::AudioUnitv3PlugIn)
|| (owner.isiOS() && type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA())))
s.add (String ("CODE_SIGN_ENTITLEMENTS = \"") + owner.getEntitlementsFileName() + String ("\""));
defines = mergePreprocessorDefs (defines, owner.getAllPreprocessorDefs (config, type));
StringArray defsList;


Loading…
Cancel
Save