Build process includes main project capabilities to iOS extensions

Hi!

We are working on a project for iOS. We have added push notification support, and also, we are including a Rich Notification extension.

But we have discovered that, when building the app, the Build Tools is adding the “push messaging” capability to the extension, which shouldn’t have it. This is causing errors at the time of receiving push notifications, as both, the base app and the extension are trying to process them.

Regards.

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

Hi Emilio,

Are you using ResignApp.sh in your builds?

Best regards.

[Attachment Removed]

Hi!

No, we are not aware of being using that script. We see this in the direct .xcworkspace ouput from the Unreal Build Tool.

As you can see, also the Associated Domains capability is also assigned to the Extension

[Image Removed]Regards.

[Attachment Removed]

Hi Emilio,

Can you confirm that if you were to remove some capabilities from the extension target manually in the Xcode project, that the application still installs successfully to the iOS device? Some developers here have experienced issues whereby iOS would reject the installation when there was a mismatch of main app and extension capabilities. If the app installs successfully with the mismatch, could you confirm the Xcode version you are using?

Best regards.

[Attachment Removed]

Hi Stéphane!

I’ve been through this and I’ve discovered a few things:

By default, when the extension is added to the project, the same .entitlements file defined in the project configuration is assigned to the extension. Then, if we try to remove a capability from the extension, as the entitlement is shared between the game and extension targets, the capability is removed from all.

I’ve manually edited the Xcode project and set a different .entitlements file to use with the extension. Then, I was able to have the push notification capability only on the Game Target and have it removed from the extension. I built the app, and it was installed correctly on the device (in Debug Mode) . I tested the push notifications and rich push, and we are receiving both types correctly.

I’ve been searching for some code inside the engine that allow us to setup a different entitlements file for the iOS extension, but It seems, there is no possibility to do this yet, right?

To do this tests, we are using XCode 16.4 (16F6) to build the project.

Regards.

[Attachment Removed]

Hi Emilio,

Thanks for the additional details and trying a local test case. It is possible that at the time of implementation, the development environment enforced extension capabilities differently than they do on 16.4.

You are correct in your assessment that there isn’t currently a mechanism for differentiating extension and main app caps/entitlements. Your use case seems to indicate that this may be something we’ll want to look at. I’ll circle back to development and come back to you once I have information.

Best regards.

[Attachment Removed]