Message filter extension doesn't run on iOS 18

If I run an app with a message filter extension on < iOS 18 everything is as expected, if I run the same app, without any changes on iOS 18 then it doesn't work.

I've discovered that problems occur if the extension has the following code:

extension MessageFilterExtension: ILMessageFilterQueryHandling, ILMessageFilterCapabilitiesQueryHandling {
    func handle(_ capabilitiesQueryRequest: ILMessageFilterCapabilitiesQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterCapabilitiesQueryResponse) -> Void) {
      
      let response = ILMessageFilterCapabilitiesQueryResponse()
      
      response.transactionalSubActions = [.transactionalCarrier, .transactionalHealth, .transactionalPublicServices, .transactionalFinance, .transactionalWeather, .transactionalRewards, .transactionalOrders, .transactionalOthers, .transactionalReminders]

      
      response.transactionalSubActions = [.transactionalFinance,
                                          .transactionalOrders,
                                          .transactionalHealth]
      completion(response)
    }

This code doesn't run on iOS 18, however the following code does run on iOS 18:

      let response = ILMessageFilterCapabilitiesQueryResponse()
      completion(response)

I downloaded several apps from the app store which provide message filtering, within the Message app they all had one thing in common, on < iOS 18 they all show 12 filtering categories, but within iOS 18 they only show 2. So it seems the issue is endemic and effects other apps, not just mine.

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

Feedback submitted FB15266709

BTW there's a copy/paste typo in the original posting, this will cause the issue:

      response.transactionalSubActions = [.transactionalCarrier, .transactionalHealth, .transactionalPublicServices, .transactionalFinance, .transactionalWeather, .transactionalRewards, .transactionalOrders, .transactionalOthers, .transactionalReminders]

      response.promotionalSubActions = [.promotionalOffers, .promotionalOthers, .promotionalCoupons]

Or also this would too:

      response.transactionalSubActions = [ILMessageFilterSubAction.transactionalHealth]
      response.promotionalSubActions   = [ILMessageFilterSubAction.promotionalCoupons]
Message filter extension doesn't run on iOS 18
 
 
Q