Faslur Rajah
Faslur Rajah

Reputation: 1005

UnwantedCommunicationReportingExtension API calling failing

I want to add UnwantedCommunicationReportingExtension to my iOS app to report calls from Call History. I created UI for that and I can see the report button on Call History and Extention is opening. I have followed every step to make sure UnwantedCommunicationReportingExtension will work with my app. But the API call is failing when I press the done button. Let me list here

  1. Adding a new target UnwantedCommunicationReportingExtension to my project
  2. Adding API endpoint ('''https://api.mycompany.net/call/v2/main/report''') 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

  2. 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 the 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. I checked the following website to ensure the file can be accessed. Both display 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

error_image

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

Upvotes: 1

Views: 56

Answers (0)

Related Questions