UnwantedCommunicationReportingExtension API calling failing

I have followed every step to make sure UnwantedCommunicationReportingExtension will work with my app. Let me list here

  1. Adding a new target UnwantedCommunicationReportingExtension to my project
  2. Adding API endpoint to Info.plist
<dict>
	<key>NSExtension</key>
	<dict>
		<key>NSExtensionAttributes</key>
		<dict>
			<key>ILClassificationExtensionNetworkReportDestination</key>
			<string>https://api.mycompany.net/call/v2/main/report</string>
		</dict>
		<key>NSExtensionMainStoryboard</key>
		<string>MainInterface</string>
		<key>NSExtensionPointIdentifier</key>
		<string>com.apple.identitylookup.classification-ui</string>
	</dict>
</dict>
</plist>
  1. Added classificationreport to Associate domain in Capability section.

classificationreport:api.mycompany.net

  1. Created an apple-app-site-association file without json extension and returned this when api.mycompany.net called. I don't know whether to add app's bundle id or extension's bundle id. So added both. Complete apple-app-site-association below
{
    "classificationreport": {
        "apps": [
            "XXXXXX.com.company.appname.CallReport",
            "XXXXXX.com.company.appname"
        ]
    }
}
  1. Checked the following website to ensure the file can be accessed. Both are displaying the file

https://app-site-association.cdn-apple.com/a/v1/api.mycompany.net https://api.mycompany.net/.well-known/apple-app-site-association

But I cannot call API https://api.mycompany.net/call/v2/main/report. It always fails with the following error

Can anyone tell me what I'm missing? I tried for a week and was exhausted .

Replies

Have you made a server API call using URLSession or any other frameworks?

In fact, it's not necessary; you only need to override the func classificationResponse(for request: ILClassificationRequest) -> ILClassificationResponse method.

For more details, you can refer to this link: https://stackoverflow.com/questions/76504101/http-request-fails-trying-to-report-unwanted-communication-report-via-api/76645829#76645829