我正在应用程序支持中创建“不需要的通信报告”扩展。我只找到了Apple的这篇指南:https://developer.apple.com/documentation/sms_and_call_reporting/sms_and_call_spam_reporting我跟着它
我做了:
- 从ILClassificationUIExtensionViewController示例化我的ViewController。
- 调用控制器的prepare(for:)方法来自定义UI。
- 创建按钮,以在完成信息收集后通知系统(将isReadyForClassificationResponse属性设置为true。)
- 按下Done按钮后配置classificationResponse(for:)方法。
我想通过网络发送响应,所以我按照以下说明将关联的域添加到扩展:https://developer.apple.com/documentation/xcode/supporting-associated-domain和来自互联网的建议。(支持关联域的Apple文档截图:https://i.stack.imgur.com/zxroa.png)
- 创建文件apple-app-site-association,在指定域时使用classificationreport而不是webcredentials。
{
"applinks": {
"apps": [],
"details": [
{
"appID": “XXXX.com.project.UnwantedCommunicationExtension",
"paths": ["*"]
}
]
},
"classificationreport": {
"apps": ["XXXX.com.project.UnwantedCommunicationExtension"]
}
}
- 将域添加到权利:https://i.stack.imgur.com/38qbn.png
- 使用扩展的Info.plist文件中的ILClassificationExtensionNetworkReportDestination键指定网络终结点的地址:https://i.stack.imgur.com/C6lbf.png
- 创建测试服务器并将apple-app-site-association文件发送到此服务器。
调试和代理我的应用程序,它不会向服务器发送任何请求。我找不到任何关于应该发送什么请求类型,服务器将接收什么数据类型的信息。有谁能帮忙找一下这方面的资料吗?也许建议我做错了什么,什么设置应该在服务器上?
1条答案
按热度按时间hec6srdp1#
您的
apple-app-site-association
应该看起来像这样(带有应用标识符,而不是扩展标识符):