I'm trying to develop a message filtering extension for iOS. My steps as follows:
- Create a new project.
- Go to File -> Target -> Add Message Filter App Extension, enter a name
MyMessageFiltering. Xcode generate the folderMyMessageFilteringcontainsMessageFilterExtension.swift - In the
MessageFilterExtension.swift, add one line after thehandlefunction as follow:
func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterQueryResponse) -> Void) {
// First, check whether to filter using offline data (if possible).
NSLog("FILTEREXTENSION - 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.
There is no log from the console app or XCode console
What steps did I do wrong to test the sms extension filtering ?