Enabling Special Entitlements

I’m trying to enable the entitlement I received from Apple for UDP multicast networking. I’m looking at Apple’s instructions here:

https://developer.apple.com/forums/thread/663271

Specifically, this is the section where I am having trouble:

Enable the Entitlement

The next step is to enable the entitlement in your project:

  1. In your app’s .entitlements file, add a com.apple.developer.networking.multicast entry with a Boolean value of true.
  2. Switch back to Signing & Capabilities and build your app for the device (not the simulator!). Xcode will then notice that you’re using an entitlement that’s not in the current provisioning profile’s allowlist but is in your App ID’s allowlist. It responds to this by rebuilding the provisioning profile. Yay!

I can’t find the .entitlements file in a Xojo built project. Not sure where we add this. I see there’s a way to add entitlements manually using a .plist file in Xojo but no instructions in the documents for creating that. And if I load that file will I still be able to add entitlements from the selections in the entitlements pane.

It would be helpful to have some more detailed documentation on this…

if you click on the iOS target in your Xojo project and then click on the Advanced tab in the Inspector, there’s a list of Capabilities there. None of those items are what you are looking for, but just above that is a place to select an entitlements file.

What I suggest is that you use Xcode to make the entitlements file that you need and then select it in that field. That should add the relevant keys where they need to go.

It’ll look like this:

<?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>com.apple.developer.networking.multicast</key>
	<true/>
</dict>
<dict/>
</plist>

edit: sorry, I missed a < dict >

Thanks Greg for your advice as always. I created the Entitlements file and it works.

But I can’t load the app anymore using the Devices and Simulators window in Xcode or running a remote debug in Xojo. It fails to install the app on the phone. The only way I can get the app on my phone now is via TestFlight and that gets to be a pain if doing a bunch of debugging.

Anyone have any ideas what might be causing this?

Thanks,

Jon

Do you get any sort of error?

When I try to load the add from Xcode:

image

When I try to run the app on my phone from the debugger:

Nothing very descriptive either way.

You might need to regenerate the development profile after changing the entitlements.

1 Like

That did it! Thank you. I had built a new Store profile but not development profile!

Thanks so much.

3 Likes