Skip to content

Commit

Permalink
iOS: Remove default Inter-App Audio entitlement from AU hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoole committed Jun 1, 2023
1 parent eb0ba22 commit 82377a7
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 18 deletions.
20 changes: 20 additions & 0 deletions BREAKING-CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ JUCE breaking changes
develop
=======

Change
------
The Projucer no longer automatically adds the iOS Inter-App Audio entitlement
to AU hosts.

Possible Issues
----------------
iOS AU hosts that rely upon Inter-App Audio will no longer be able to receive
Inter-App Audio.

Workaround
----------
Use the new "[Deprecated] AU Host Inter-App Audio Capability" option in the
Projucer.

Rationale
---------
Inter-App Audio is deprecated in iOS 13.


Change
------
Unique device IDs on Windows have been updated to use a more reliable SMBIOS
Expand Down
8 changes: 0 additions & 8 deletions extras/AudioPluginHost/Builds/iOS/App.entitlements

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@
94CB96C8E4B51F52776C2638 /* juce_graphics */ /* juce_graphics */ = {isa = PBXFileReference; lastKnownFileType = folder; name = juce_graphics; path = ../../../../modules/juce_graphics; sourceTree = SOURCE_ROOT; };
97918AB43AD460AFA8FA2FFE /* PluginWindow.h */ /* PluginWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PluginWindow.h; path = ../../Source/UI/PluginWindow.h; sourceTree = SOURCE_ROOT; };
97E63C295843A1E665E70473 /* cello.wav */ /* cello.wav */ = {isa = PBXFileReference; lastKnownFileType = file.wav; name = cello.wav; path = ../../../../examples/Assets/cello.wav; sourceTree = SOURCE_ROOT; };
9A92E8C5ECBBF926B5CF57BC /* App.entitlements */ /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = App.entitlements; path = App.entitlements; sourceTree = SOURCE_ROOT; };
9F9B445E6755CAA19E4344ED /* CoreAudio.framework */ /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
A43CE79CB190C2D69E17E1E3 /* include_juce_audio_processors_ara.cpp */ /* include_juce_audio_processors_ara.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = include_juce_audio_processors_ara.cpp; path = ../../JuceLibraryCode/include_juce_audio_processors_ara.cpp; sourceTree = SOURCE_ROOT; };
A5DFC13E4F09134B0D226A3E /* MainHostWindow.h */ /* MainHostWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainHostWindow.h; path = ../../Source/UI/MainHostWindow.h; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -361,7 +360,7 @@
enabled = 0;
};
com.apple.InterAppAudio = {
enabled = 1;
enabled = 0;
};
com.apple.Push = {
enabled = 0;
Expand Down Expand Up @@ -445,7 +444,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_ENTITLEMENTS = "App.entitlements";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
DEAD_CODE_STRIPPING = YES;
Expand Down Expand Up @@ -585,7 +583,6 @@
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_LINK_OBJC_RUNTIME = NO;
CODE_SIGN_ENTITLEMENTS = "App.entitlements";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(PROJECT_DIR)/build/$(CONFIGURATION)";
COPY_PHASE_STRIP = NO;
Expand Down
2 changes: 1 addition & 1 deletion extras/Build/juce_build_tools/utils/juce_Entitlements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace build_tools

if (isiOS)
{
if ((isAudioPluginProject && shouldEnableIAA) || isAUPluginHost)
if ((isAudioPluginProject && shouldEnableIAA) || (isAUPluginHost && isAUHostIAAEnabled))
entitlements.set ("inter-app-audio", "<true/>");

if (isiCloudPermissionsEnabled)
Expand Down
1 change: 1 addition & 0 deletions extras/Build/juce_build_tools/utils/juce_Entitlements.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace build_tools
bool isAUPluginHost = false;
bool isiCloudPermissionsEnabled = false;
bool isPushNotificationsEnabled = false;
bool isAUHostIAAEnabled = false;
bool isAppGroupsEnabled = false;
bool isHardenedRuntimeEnabled = false;
bool isAppSandboxEnabled = false;
Expand Down
15 changes: 10 additions & 5 deletions extras/Projucer/Source/ProjectSaving/jucer_ProjectExport_Xcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class XcodeProjectExporter : public ProjectExporter
iosBackgroundAudioValue (settings, Ids::iosBackgroundAudio, getUndoManager()),
iosBackgroundBleValue (settings, Ids::iosBackgroundBle, getUndoManager()),
iosPushNotificationsValue (settings, Ids::iosPushNotifications, getUndoManager()),
iosAUHostIAAValue (settings, Ids::iosAUHostIAA, getUndoManager()),
iosAppGroupsValue (settings, Ids::iosAppGroups, getUndoManager()),
iCloudPermissionsValue (settings, Ids::iCloudPermissions, getUndoManager()),
networkingMulticastValue (settings, Ids::networkingMulticast, getUndoManager()),
Expand Down Expand Up @@ -224,6 +225,7 @@ class XcodeProjectExporter : public ProjectExporter
bool isBackgroundAudioEnabled() const { return iosBackgroundAudioValue.get(); }
bool isBackgroundBleEnabled() const { return iosBackgroundBleValue.get(); }
bool isPushNotificationsEnabled() const { return iosPushNotificationsValue.get(); }
bool isAUHostIAAEnabled() const { return iosAUHostIAAValue.get(); }
bool isAppGroupsEnabled() const { return iosAppGroupsValue.get(); }
bool isiCloudPermissionsEnabled() const { return iCloudPermissionsValue.get(); }
bool isNetworkingMulticastEnabled() const { return networkingMulticastValue.get(); }
Expand Down Expand Up @@ -616,6 +618,9 @@ class XcodeProjectExporter : public ProjectExporter
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 (iosAUHostIAAValue, "[Deprecated] AU Host Inter-App Audio Capability"),
"If your app is an AU host then you can enable this to grant your app the capability to receive Inter-App Audio. "
"Inter-App Audio is deprecated in iOS 13.");
}

props.add (new ChoicePropertyComponent (networkingMulticastValue, "Networking Multicast Capability"),
Expand Down Expand Up @@ -1336,9 +1341,8 @@ class XcodeProjectExporter : public ProjectExporter

capabilities["ApplicationGroups.iOS"] = owner.iOS && owner.isAppGroupsEnabled();
capabilities["InAppPurchase"] = owner.isInAppPurchasesEnabled();
capabilities["InterAppAudio"] = owner.iOS && ((type == Target::StandalonePlugIn
&& owner.getProject().shouldEnableIAA())
|| owner.getProject().isAUPluginHost());
capabilities["InterAppAudio"] = owner.iOS && ((type == Target::StandalonePlugIn && owner.getProject().shouldEnableIAA())
|| (owner.getProject().isAUPluginHost() && owner.isAUHostIAAEnabled()));
capabilities["Push"] = owner.isPushNotificationsEnabled();
capabilities["Sandbox"] = type == Target::AudioUnitv3PlugIn || owner.isAppSandboxEnabled();
capabilities["HardenedRuntime"] = owner.isHardenedRuntimeEnabled();
Expand Down Expand Up @@ -1400,7 +1404,7 @@ class XcodeProjectExporter : public ProjectExporter
|| owner.isHardenedRuntimeEnabled()
|| owner.isNetworkingMulticastEnabled()
|| (owner.isiOS() && owner.isiCloudPermissionsEnabled())
|| (owner.isiOS() && owner.getProject().isAUPluginHost()))
|| (owner.isiOS() && owner.getProject().isAUPluginHost() && owner.isAUHostIAAEnabled()))
return true;

if (owner.project.isAudioPluginProject()
Expand Down Expand Up @@ -3197,6 +3201,7 @@ class XcodeProjectExporter : public ProjectExporter
options.isAUPluginHost = project.isAUPluginHost();
options.isiCloudPermissionsEnabled = isiCloudPermissionsEnabled();
options.isPushNotificationsEnabled = isPushNotificationsEnabled();
options.isAUHostIAAEnabled = isAUHostIAAEnabled();
options.isAppGroupsEnabled = isAppGroupsEnabled();
options.isHardenedRuntimeEnabled = isHardenedRuntimeEnabled();
options.isAppSandboxEnabled = isAppSandboxEnabled();
Expand Down Expand Up @@ -3692,7 +3697,7 @@ class XcodeProjectExporter : public ProjectExporter
bluetoothPermissionNeededValue, bluetoothPermissionTextValue,
sendAppleEventsPermissionNeededValue, sendAppleEventsPermissionTextValue,
uiFileSharingEnabledValue, uiSupportsDocumentBrowserValue, uiStatusBarHiddenValue, uiRequiresFullScreenValue, documentExtensionsValue, iosInAppPurchasesValue,
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAppGroupsValue, iCloudPermissionsValue,
iosContentSharingValue, iosBackgroundAudioValue, iosBackgroundBleValue, iosPushNotificationsValue, iosAUHostIAAValue, iosAppGroupsValue, iCloudPermissionsValue,
networkingMulticastValue, iosDevelopmentTeamIDValue, iosAppGroupsIDValue, keepCustomXcodeSchemesValue, useHeaderMapValue, customLaunchStoryboardValue,
exporterBundleIdentifierValue, suppressPlistResourceUsageValue, useLegacyBuildSystemValue, buildNumber;
ScopedMessageBox messageBox;
Expand Down
1 change: 1 addition & 0 deletions extras/Projucer/Source/Utility/Helpers/jucer_PresetIDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ namespace Ids
DECLARE_ID (iosBackgroundAudio);
DECLARE_ID (iosBackgroundBle);
DECLARE_ID (iosPushNotifications);
DECLARE_ID (iosAUHostIAA);
DECLARE_ID (iosAppGroups);
DECLARE_ID (iCloudPermissions);
DECLARE_ID (networkingMulticast);
Expand Down

2 comments on commit 82377a7

@talaviram
Copy link

@talaviram talaviram commented on 82377a7 Jun 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is no longer needed? is there any assurance future iOS/iPadOS scan properly without this entitlement?

https://forum.juce.com/t/auv3-not-showing-up-in-ios-simulator-device/28404/13?u=ttg

@tpoole
Copy link
Member Author

@tpoole tpoole commented on 82377a7 Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to revert this change - I now think deprecation of this behaviour is too aggressive, given that older iOS versions will still require the entitlement.

Please sign in to comment.