iOS Message Filter Extension - deferQueryRequestToNetwork(completion:) error
I made a test app using the iOS App template and added a target using the Message Filter Extension template which invokes deferQueryRequestToNetwork(completion:) when receiving an SMS.
The app and the extension have same "Associated Domains Capabilities" with "messagefilter" pointing to a server which receives query requests and returns proper responses. The extension has the "ILMessageFilterExtensionNetworkURL" key in Info.plist file which specifies the server URL.
deferQueryRequestToNetwork(completion:) throws a com.apple.calls.messagefilter error which reads "Extension's containing app (appID ) unauthorized to defer requests to host "
SMS and Call Reporting
RSS for tagProvide extensions to manage unwanted communication using SMS and Call Reporting.
Posts under SMS and Call Reporting tag
22 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I’m encountering a problem with my iOS app with new Live Caller ID extension when uploading to TestFlight. Here’s what's happening:
When I try to upload the app to TestFlight without the NSExtensionPrincipalClass, I get the following error:
Missing Info.plist values. No values for NSExtensionMainStoryboard or NSExtensionPrincipalClass found in extension Info.plist for foo.app/PlugIns/bar.appex
However, if I include the NSExtensionPrincipalClass in the Info.plist of my extension, the app fails to launch on both the dev build and through TestFlight. The error message I receive is:
bar.appex with id <bundle_id> defines either an NSExtensionMainStoryboard or NSExtensionPrincipalClass key, which is not allowed for the extension point com.apple.live-lookup
Has anyone experienced a similar issue? How to fix it?
Is there a way for my app to know that a phone number has just been messaged to or a call to 911 just started? Or SOS has just been executed by the user?
My server that backs my Message Filter Extension stopped receiving messages last night.
I thought maybe I had broken something in the iOS code, even though I hadn't touched any of the logic related to filtering. So I rolled back my code to a previous version that was definitely working in both test and production and ran it on my test device, setting a breakpoint on the first line of the
func handle(_ queryRequest: ILMessageFilterQueryRequest, context: ILMessageFilterExtensionContext, completion: @escaping (ILMessageFilterQueryResponse) -> Void)
method in the extension. When sending a message to it from an unknown number, the breakpoint is never even hit.
To ensure it was somehow not my code, I started a new blank app and added the Message Filter Extension target. Running it on my test device, it also doesn't ever hit the breakpoint.
Is there some Apple service involved in determining whether to send unknown sender messages to Message Filter Extensions that might be down. Maybe it's a beta issue? I'm on iOS 18.1 Beta 4. But it seems odd that all of my users' devices would be encountering a beta-related issue at essentially the same time.
Hello there,
We are developing our own server for live caller ID service, and we have some questions for end-to-end testing:
According to the official documentation, it's said that the OS on user's iPhone will issue OHTTP request to 3rd party's gateway. Is it possible to verify this behavior at local environment, using physical device?
If answer to question 1. is no, will Apple provide other beta testing methods? For example via Testflight.
Any suggestion helps. Thanks!
I've noticed delays with the Live Caller ID Lookup feature, taking around 3 to 6 seconds to complete, even on repeated lookups. This seems odd since there's no server activity during these repeats, suggesting the information might be coming from a cache. Most of the time, it’s fast, but there are cases when it's unexpectedly slow, and I haven’t quite figured out the pattern yet. Is anyone else seeing this issue?
FB number FB15372765 - with sysdiagnose and video demonstrating the delay.
Hello, I am wondering about developing my application.
Can the new commands available with iOS 18 give me access to the call log (recent calls)? With a request prior to installing the application for example.
I saw that Truecaller has just launched an update on iOS to offer the same features as Android, i.e. capture the call log.
Apple allows applications like Truecaller to integrate their spam databases into the iOS caller ID system. I wonder by which command!
Otherwise, I can perhaps use the "SMS and Call Spam Reporting" commands and divert them to retrieve the call log.
To tell you the truth, I'm trying to find, for my application, a way to retrieve recent call data to create a call dashboard of certain calls, by retrieving the name or phone number, call date, call time and call duration.
Does anyone have an idea?
iOS 18 (22A3354) will not offer a option in settings (> Apps > Phone) after calling openSettings to enable live caller id lookup extension.
iPhone and MacBook are in the same network.
The PIRService runs on MacBook and is reachable via iPhone Safari (via http://MacBookPro:8080/).
Hummingbird print log: hb_method=GET hb_uri=/ [Hummingbird] Request.
After deploying the application via Xcode to the iPhone no requests are printed in the terminal.
The extension was added like documented and bundle id is also checked multiple times.
issuerRequestUri in service-config.json is http://MacBookPro:8080/issue.
As far as I can tell, everything has been set up in accordance with the Testing Live Caller ID instructions.
Is there something missing?
I am trying to set up a message filter extension that will use shared web credentials for basic auth when calling to its ILMessageFilterExtensionNetworkURL.
I have associated domains set up for both "messagefilter:" and "webcredentials:" and the message filter IS correctly calling the ILMessageFilterExtensionNetworkURL with each message - so that part is working.
As detailed here, I have set up Shared Web Credentials and my view controller is using SecAddSharedWebCredential() to save the creds to the correct domain. Using Authorization services, the creds are auto-filled into my app's login screen. When I go under Settings > Passwords, I see the creds are saved and they are the correct creds to the corrent website that matches ILMessageFilterExtensionNetworkURL.
Regardless of all of this, the deferQueryRequestToNetwork() refuses to use the creds and implement Basic Auth in its URL call. It makes the call to the correct URL, it just won't use the Shared Web Creds for basic auth.
Any help would be greatly appreciated.
We've created a Message Filter Extension that relies on the network action workflow of Message Filter Extensions (ILMessageFilterExtension). Has anyone applied authentication to these calls?
It works great when being called un-authenticated, but the logic behind this API costs us money, and we'd like to rate-limit it by the client to avoid someone DDOs'ing the exposed API and racking up our bill.
We've followed https://developer.apple.com/documentation/sms_and_call_reporting/sms_and_mms_message_filtering/creating_a_message_filter_app_extension and set up a Shared Web Credential (both webcredential and messagefilter associated domains). Still, our calls never have the created and verified credentials forwarded to our service with the REST API call.
Have any thoughts on how to apply a shared web credential to those delegated calls?
Hi all, I have an issue with iOS 18 Beta 2 (Since Beta 1) where SMS and MMS do not work. I can only send a receive iMessages. If the user is not using an iPhone and send a message to them, but I cannot receive the reply. I initially thought this was an RCS issues, but I turned RCS off in iOS 18 Beta 2 when the switch showed up. This still has not solved the issue. Any Ideas? Has anyone else experienced this issue? If so, how did you resolve it? I am using an iPhone 15 Pro Max 512GB on Verizon Wireless.
Hi,
I'm having headaches with the debugging of my Unwanted Communication Reporting extension.
iPhone log says:
com.apple.IdentityLookup.MessageFilter[1774] <Error>: Extension's containing app (appID <private>) unauthorized to defer requests to host <private>
So I guess I have something wrong with my apple-app-site-association.
The AASA file I get with swcutil dl -d services.mydomain.com
{
classificationreport = {
apps = (
"<MYTEAMID>.com.mydomain.myapp",
"<MYTEAMID>.com.mydomain.myapp.unwanted"
);
};
}
where .com.mydomain.myapp is my containing app (bundle id).
and .com.mydomain.myapp.unwanted is my extension
The AASA file on the server is obviously in JSON format and correctly served from the server : services.mydomain.com
In the extension Info.plist I've set the following :
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
<dict>
<key>ILClassificationExtensionNetworkReportDestination</key>
<string>https://services.mydomain.com/path/unwanted/report</string>
</dict>
<key>NSExtensionMainStoryboard</key>
<string>MainInterface</string>
<key>NSExtensionPointIdentifier</key>
<string>com.apple.identitylookup.classification-ui</string>
</dict>
I suppose the reply from classificationResponse method is correct since MessageFilter "tries" to send the request.
Where am I mistakening ?
Difficult to debug... MessageFilter's log keeps interesting data as private (so there is no way to check what it's actually doing). And I've found no way to go deeper in the debug process.
Many thanks
Emmanuel
I’m wonder if Apple can allow users to save a message within the messages (text messages) like Snapchat allows to easily reference a specific message
At present, I am developing a multimedia messaging application, but I have found that when sending messages through a mobile phone, Android can receive them, but iPhone cannot. By using Wireshark to capture packets, I can see that I have received a mms packet, but the log shows that the message parsing has failed(Because of unknown fields). Do you have any solutions?
Hi,
I have implemented VOIP calling feature in my application using OpenTok SDK and CallKit framework. Calling feature is working most of the time. But there is one strange issue I have come across.
During a call, if any external cellular call appears and if I decline that external call then my running voip call also disconnects. This is happening some of the iPhone devices.
iPhone config is as follows
Model : iPhone 11
iOS Version : 17.3
I have added loggers CXEndCallAction and -provider:performEndCallAction and debugged at my end . I found that CXEndCallAction is not executing from my end but still -provider:performEndCallAction is triggered by iOS along with my ongoing callUUID
This is very strange behaviour I am observing in one of my iPhone device. I have tested this in around 3-4 iPhone devices but i am facing this issue only in 1 iPhone .
Kindly help me here if anyone has solution around it .
Thanks
Dear Appple Dev Team,
we have developed an app to identify incoming phone calls via CallKit (https://developer.apple.com/documentation/callkit/cxcalldirectoryextensioncontext). This function works great. However, we are missing a similar function for SMS/iMessage sender identification. Is it possible to integrate this function into iOS.
Thanks
Markus
I'm new to iOS development, and not currently ready to pay Apple $99/y for the privilege of playing around with some APIs.
I would like to create an SMS/Call filter and reporting extension but got to a point where the "associated domain" entitlement is required.
Is there a way to get the entitlement for local development without enrolling for the Apple Developer Program?
When there is an ongoing call, if the user gets another one, we don't want to support multi-call and directly send the new call to the voicemail. For this operation what should be CXCallEndedReason?
My understanding is that remoteEnded is used when the call connected and then ended. unanswered might be the choice for me but would it cause any issue if i directly reject a call with this status (the difference between the incoming call and reject time would be too short)? There is also declinedElsewhere , which might be suitable
This issue did not occur until we mandated our workforce update to 17.2 to be compliant. Once users who had large contact lists updated, they started to experience delayed / freezing calls.
We utilize Microsoft Intune as our MDM, but I have to assume this is hitting other MDM's as well since this is a policy that the management profile portion of the software either has toggled on or off. The policy triggering this issue, if enabled is "Block viewing corporate documents in unmanaged apps".
I've linked a dummy google account with an imported contact list of 16k contacts (yes somehow we have a handful of folks who have this) and the issue replicates with this policy enabled.
With a mirrored configuration profile, minus this setting enabled, calls flow as they should. Even with the large contact list.
I have no clue if this is right place for this, but the issue still persists after updating my device to 17.3
Hi,
Since iOS 16, when we present a keyboard in the sms/call reporting extension, the app will crash with error:
failure in NSXPCConnectionWithEndpoint:configurator: of BSServiceConnection:0x1efcd9a78 (BSServiceConnection+NSXPCConnection.m:20) : Invalid condition not satisfying: endpoint
In ideas?
Furthermore, when reporting mms message with image, the sender phone is empty. And we are unable to determine what the number is that needs reporting.