SMS and MMS Message Filtering `handle` is not called

I'm trying to create a "hello world" a Message Filtering extension for iOS based on the following steps:

  1. Create a new project.

  2. Go to File -> Target -> Add Message Filter App Extension, enter a name MyMessageFiltering. Xcode generate the folder MyMessageFiltering contains MessageFilterExtension.swift

  3. In the MessageFilterExtension.swift, add one line below the handle function as follow:

func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterQueryResponse) -> Void) {
    NSLog("FILTEREXTENSION - handle") // add the log to see check the function handle 
  1. Run the app

  2. Enable the app in message extension on iPhone by Settings -> Message -> Unknown & spam

  3. Start the console app and record the phone.

  4. Send a sms message to iPhone by an unknown number (which is not existing in iPhone contact).

There is no log from the console app or XCode console

What steps did I do wrong to test the sms extension filtering ?