Missing API declaration

Hi,

I recently got a warning when submitting an iOS app to the App Store.

I’m using Juce 7.0.7 and Xcode 15.3.

I don’t see references to these APIs in my code or dependent libraries.

Has anyone else encountered this?

The warnings/errors are:

ITMS-91053: Missing API declaration - Your app’s code in the “Massive Meter Bridge” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategorySystemBootTime. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: Describing use of required reason API | Apple Developer Documentation.

ITMS-91053: Missing API declaration - Your app’s code in the “Massive Meter Bridge” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryFileTimestamp. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: Describing use of required reason API | Apple Developer Documentation.

1 Like

in addition i’m seeing this one too:

ITMS-91053: Missing API declaration - Your app’s code in the “ID700” file references one or more APIs that require reasons, including the following API categories: NSPrivacyAccessedAPICategoryUserDefaults. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, you must include a NSPrivacyAccessedAPITypes array in your app’s privacy manifest to provide approved reasons for these APIs used by your app’s code. For more details about this policy, including a list of required reason APIs and approved reasons for usage, visit: Describing use of required reason API | Apple Developer Documentation.

juce folks - we need a fix for this soon, as we won’t be able to distribute updates after may 1.

i got this working for ios. first follow the instructions here to add a privacy manifest file.

then you can edit it in xcode or manually, here’s what i ended up with:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSPrivacyAccessedAPITypes</key>
	<array>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>CA92.1</string>
				<string>1C8F.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>35F9.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>DDA9.1</string>
				<string>C617.1</string>
				<string>3B52.1</string>
			</array>
		</dict>
	</array>
</dict>
</plist>

with this i created a new app store submission and didn’t get the warning email.

3 Likes

Thank you! I tried your suggestion, I followed the instructions to create the App Privacy file and selected all targets (All, AUv3, Standalone, Shared Code). Then edited the file in an external editor and pasted your XML. I got this back from Apple:

ITMS-91056: Invalid privacy manifest - The PrivacyInfo.xcprivacy file from the following path is invalid: “PrivacyInfo.xcprivacy”. While no action is required at this time, starting May 1, 2024, when you upload a new app or app update, keys and values in your app’s privacy manifest must be in a valid format. For more details about privacy manifest files, visit: Privacy manifest files | Apple Developer Documentation.

Any clue?

I think two lines were missing, I added them here. I haven’t tried this myself though.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSPrivacyAccessedAPITypes</key>
	<array>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>CA92.1</string>
				<string>1C8F.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>35F9.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>DDA9.1</string>
				<string>C617.1</string>
				<string>3B52.1</string>
			</array>
		</dict>
	</array>
</dict>
</plist>

Found some good info here: ITMS-91053: Missing API declaration — for accessing UserDefaults, timestamps & other APIs

3 Likes

yup, i messed up copy/paste. i’m updating my original post now, thanks for catching this.

1 Like

Anyone how how to include this manifest in CMake?

check PLIST_TO_MERGE entry of juce_add_plugin

1 Like

Will the Projucer be updated to manage this other Apple annoyance automatically?
I hope so… that’s why we pay Juce every month.

2 Likes

one other thing i forgot to mention - i had to add Builds/iOS/PrivacyInfo.xcprivacy as an Xcode Resource in projucer.

This doesn’t seem to work.
I added to PLIST_TO_MERGE (like we already did for the exempt cryptography thing) and yet still get the same complaint from the app store.

Here’s what our Info.plist in the app payload looks like once it’s built but should these entries be in a different file? Everyone else is mentioning PrivacyInfo.xcprivacy.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildMachineOSBuild</key>
	<string>23E224</string>
	<key>CFBundleDisplayName</key>
	<string>AppName</string>
	<key>CFBundleExecutable</key>
	<string>AppName</string>
	<key>CFBundleIcons</key>
	<dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array>
				<string>AppIcon60x60</string>
			</array>
			<key>CFBundleIconName</key>
			<string>AppIcon</string>
		</dict>
	</dict>
	<key>CFBundleIcons~ipad</key>
	<dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array>
				<string>AppIcon60x60</string>
				<string>AppIcon76x76</string>
			</array>
			<key>CFBundleIconName</key>
			<string>AppIcon</string>
		</dict>
	</dict>
	<key>CFBundleIdentifier</key>
	<string>com.example.app</string>
	<key>CFBundleName</key>
	<string>AppName</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleSupportedPlatforms</key>
	<array>
		<string>iPhoneOS</string>
	</array>
	<key>CFBundleVersion</key>
	<string>1.0.0</string>
	<key>DTCompiler</key>
	<string>com.apple.compilers.llvm.clang.1_0</string>
	<key>DTPlatformBuild</key>
	<string>21E210</string>
	<key>DTPlatformName</key>
	<string>iphoneos</string>
	<key>DTPlatformVersion</key>
	<string>17.4</string>
	<key>DTSDKBuild</key>
	<string>21E210</string>
	<key>DTSDKName</key>
	<string>iphoneos17.4</string>
	<key>DTXcode</key>
	<string>1530</string>
	<key>DTXcodeBuild</key>
	<string>15E204a</string>
	<key>ITSAppUsesNonExemptEncryption</key>
	<false/>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>MinimumOSVersion</key>
	<string>12.0</string>
	<key>NSHighResolutionCapable</key>
	<true/>
	<key>NSMicrophoneUsageDescription</key>
	<string>Access to the microphone is needed for recording audio.</string>
	<key>NSPrivacyAccessedAPITypes</key>
	<array>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>35F9.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>3B52.1</string>
			</array>
		</dict>
	</array>
	<key>UIBackgroundModes</key>
	<array/>
	<key>UIDeviceFamily</key>
	<array>
		<integer>1</integer>
		<integer>2</integer>
	</array>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>arm64</string>
	</array>
	<key>UIRequiresFullScreen</key>
	<true/>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationLandscapeLeft</string>
		<string>UIInterfaceOrientationLandscapeRight</string>
	</array>
	<key>UIViewControllerBasedStatusBarAppearance</key>
	<true/>
</dict>
</plist>

I also tried with no success:

set(PRIVACY_INFO "${PROJECT_DIR}/PrivacyInfo.xcprivacy")

target_sources(${PROJECT_NAME}
...
    $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:${PRIVACY_INFO}>
...
)

set_source_files_properties(${PRIVACY_INFO} PROPERTIES
    MACOSX_PACKAGE_LOCATION "Resources"
)

set_property(TARGET ${PROJECT_NAME} APPEND PROPERTY RESOURCE
    ${PRIVACY_INFO}
)

Only 14 days to go until this is mandatory

Meanwhile thanks Tim Apple

+1

Would be great if we could see a Projucer update for this prior to the release of JUCE 8.

1 Like

I don’t want to be cynical, but I don’t think this will be addressed before the switch to Juce 8, I would not bet on it.

Considering the call for money Pace is doing with the new pricing and new restrictions introduced with Juce 8, this issue could be a point in their favor. They’ve given high priority to something that could attract new customers, rather than focusing on things that have been largely requested by existing customers. Juce has become a commercial product, they go where the money is. I hope I’m wrong.

1 Like

You can add the required info from within Xcode. Check the link I posted, it’s really not much work. Having the Projucer do this for us would be convenient, but it could well be that this is never addressed.

As I said, I hope I’m wrong.

I still haven’t figured out how to do via CMake though. Many of us don’t use Projucer.

i think not, unfortunately. iOS support has been woefully lacking for the last 3 years despite being regularly asked for by existing customers.

No CMake necessary, keep using the Projucer. Just do the required changes within Xcode. Look here.