How to add IOS Entitlements

Currently,

[/Script/MacTargetPlatform.XcodeProjectSettings]  
bUseModernXcode=true  

is already set.

The generated .xcworkspace files are split into three separate files:

  • UE5 (Mac).xcworkspace
  • UE5 (TVOS).xcworkspace
  • UE5 (IOS).xcworkspace

Here’s the issue in detail:
When I open MyProject (Mac).xcworkspace and try to add Sign in with Apple in the Signing & Capabilities tab using the + Capability button, an error occurs.
So instead, I add Sign in with Apple in the MyProject (IOS).xcworkspace.
However, even after packaging the app, the Sign in with Apple entitlement is not included inside the app.

To fix this, I added the following to Config/DefaultEngine.ini:

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]  
AdditionalEntitlements=../../Build/IOS/ProjectName.entitlements  

And I placed the ProjectName.entitlements file in the Build/IOS folder.

However, the Sign in with Apple capability still doesn’t appear in the packaged app.

Could you please help me figure out how to properly add and apply the entitlements?