I'm trying to create a "hello world" a Message Filtering extension for iOS based on the following steps:
-
Create a new project.
-
Go to File -> Target -> Add Message Filter App Extension, enter a name MyMessageFiltering. Xcode generate the folder MyMessageFiltering contains MessageFilterExtension.swift
-
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
-
Run the app
-
Enable the app in message extension on iPhone by Settings -> Message -> Unknown & spam
-
Start the console app and record the phone.
-
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 ?