diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp
index a81efe35d8..6e8d08d8c5 100644
--- a/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp
+++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.cpp
@@ -62,24 +62,24 @@ namespace juce:: build_tools
// entitlement iOS apps are unable to access AUv3 plug-ins.
if ((isAudioPluginProject && shouldEnableIAA) || isAUPluginHost)
entitlements.set ("inter-app-audio", "");
+ }
+ if (isiCloudPermissionsEnabled)
+ {
- if (isiCloudPermissionsEnabled)
- {
- entitlements.set ("com.apple.developer.icloud-container-identifiers",
- "\n"
- " iCloud.$(CFBundleIdentifier)\n"
- " ");
+ entitlements.set ("com.apple.developer.icloud-container-identifiers",
+ "\n"
+ "\t\tiCloud." + projectBundlerIdentifierString.trim() + "\n"
+ "\t");
- entitlements.set ("com.apple.developer.icloud-services",
- "\n"
- " CloudDocuments\n"
- " ");
+ entitlements.set ("com.apple.developer.icloud-services",
+ "\n"
+ "\t\tCloudDocuments\n"
+ "\t");
- entitlements.set ("com.apple.developer.ubiquity-container-identifiers",
- "\n"
- " iCloud.$(CFBundleIdentifier)\n"
- " ");
- }
+ entitlements.set ("com.apple.developer.ubiquity-container-identifiers",
+ "\n"
+ "\t\tiCloud." + projectBundlerIdentifierString.trim() + "\n"
+ "\t");
}
if (isPushNotificationsEnabled)
diff --git a/extras/Build/juce_build_tools/utils/juce_Entitlements.h b/extras/Build/juce_build_tools/utils/juce_Entitlements.h
index 2c0324ed59..2bff539569 100644
--- a/extras/Build/juce_build_tools/utils/juce_Entitlements.h
+++ b/extras/Build/juce_build_tools/utils/juce_Entitlements.h
@@ -54,7 +54,7 @@ namespace juce::build_tools
bool isNetworkingMulticastEnabled = false;
String appGroupIdString;
-
+ String projectBundlerIdentifierString;
StringArray hardenedRuntimeOptions;
StringArray appSandboxOptions;
diff --git a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
index f33424e541..45b77df33a 100644
--- a/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
+++ b/extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
@@ -400,7 +400,7 @@ public:
String getDevelopmentTeamIDString() const { return iosDevelopmentTeamIDValue.get(); }
String getAppGroupIdString() const { return iosAppGroupsIDValue.get(); }
-
+ String getProjectBundlerIdentifierString() const { return project.getBundleIdentifierString(); }
String getBuildNumber() const
{
const auto buildNumberString = buildNumber.get().toString();
@@ -811,12 +811,13 @@ public:
props.add (new ChoicePropertyComponent (iosAppGroupsValue, "App Groups Capability"),
"Enable this to grant your app the capability to share resources between apps using the same app group ID.");
-
- props.add (new ChoicePropertyComponent (iCloudPermissionsValue, "iCloud Permissions"),
- "Enable this to grant your app the capability to use native file load/save browser windows on iOS.");
-
}
+
+ props.add (new ChoicePropertyComponent (iCloudPermissionsValue, "iCloud Permissions"),
+ iOS ? "Enable this to grant your app the capability to use native file load/save browser windows on iOS." :
+ "Enable this to grant your app the capability to use iCloud Document Storage");
+
props.add (new ChoicePropertyComponent (networkingMulticastValue, "Networking Multicast Capability"),
"Your app must have this entitlement to send or receive IP multicast or broadcast. "
"You will also need permission from Apple to use this entitlement.");
@@ -1574,7 +1575,7 @@ public:
capabilities["Sandbox"] = shouldUseAppSandbox();
capabilities["HardenedRuntime"] = shouldUseHardenedRuntime();
- if (owner.iOS && owner.isiCloudPermissionsEnabled())
+ if (owner.isiCloudPermissionsEnabled())
capabilities["com.apple.iCloud"] = true;
StringArray capabilitiesStrings;
@@ -3535,6 +3536,7 @@ private:
options.isAppSandboxInhertianceEnabled = isAppSandboxInhertianceEnabled();
options.isNetworkingMulticastEnabled = isNetworkingMulticastEnabled();
options.appGroupIdString = getAppGroupIdString();
+ options.projectBundlerIdentifierString = getProjectBundlerIdentifierString();
options.hardenedRuntimeOptions = getHardenedRuntimeOptions();
options.appSandboxOptions = getAppSandboxOptions();
options.appSandboxTemporaryPaths = getAppSandboxTemporaryPaths();