Two plist Entitlements

I want to add Calendar access (NSCalendarsUsageDescription) and Insecure HTTP loads (NSTemporaryExceptionAllowsInsecureHTTPLoads) for my macOS Desktop app. So I launched Xcode and added them in, and dragged the file into my app. Both entitlements appear in info.plist within both my debug and built apps, but only Insecure HTTP loads is working, my CalCalendarMBS array is empty (if I run a test app with calendar plist access alone, I get the full array of calendars).

How can I get them both entitlements working?

Here is my Xcode info.plist file:

<?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>NSCalendarsUsageDescription</key>
	<string>Please allow Calendar access</string>
	<key>NSAppTransportSecurity</key>
	<dict>
		<key>NSExceptionDomains</key>
		<dict>
			<key>holymackerelsoftware.com</key>
			<dict>
				<key>NSIncludesSubdomains</key>
				<true/>
				<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
				<true/>
			</dict>
		</dict>
	</dict>
</dict>
</plist>

And here is how it appears inside my built Xojo app:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
<plist version="0.9">
<dict>
   <key>NSCalendarsUsageDescription</key>
   <string>Please allow Calendar access</string>
   <key>NSAppTransportSecurity</key>
   <dict><key>NSExceptionDomains</key><dict><key>holymackerelsoftware.com</key><dict><key>NSIncludesSubdomains</key><true/><key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict>
… 'etc

It’s entirely possible that Apple prevents you from using “sensitive” user data and insecure connections at the same time in your app.

I’ve not done any calendar work recently, but it is my understanding that you need the following things.

  1. Either Hardened Runtime or App Sandbox security protocol enabled.
  2. The Privacy / Usage Message you’ve specified above.
  3. The Entitlement to access the Calendar, “com.apple.security.personal-information.calendars”.

If you have App Wrapper 4, the bottom two are set on the “Personal Data” section of the “Capabilities” Page.