使用静默 APNS 推送通知在没有用户通知的情况下发送令牌? [英] Use of silent APNS push notifications to send token without user notification?

查看:41
本文介绍了使用静默 APNS 推送通知在没有用户通知的情况下发送令牌?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 StackOverflow 上查看了其他问题和回复,但没有看到与此完全相同的内容;我希望能够通过 APNS 推送令牌.这样做的目的是验证后续用户对 Restful Web 服务的请求是否来自 iPhone 设备而不是来自非 iPhone 源(将 HTTP 标头更改为看起来像 iPhone 请求的假是微不足道的).

I've checked through other questions and responses here at StackOverflow but couldn't see something exactly like this; I would like to be able to push a token via APNS. The purpose of this is to verify that a subsequent user request to a restful web service comes from an iPhone device and not from a non-iPhone source (it's trivial to change HTTP headers to fake looking like an iPhone request).

几个问题:

  1. Apple 指南是否允许坚持启用推送通知?
  2. 是否可以发送带有一些小文本负载的 SILENT 推送通知?
  3. 有谁知道这是否会通过 Apple 的审查或违反他们的准则

非常感谢.

推荐答案

  1. 您不能强迫用户接受推送.用户始终可以选择拒绝.
  2. 是的,您可以发送没有声音/文字的通知,并添加元数据.
  3. 是的,发送令牌似乎是 Apple 可以接受的用途.

然而,我个人并不认为这个用例完全适合推送用例.您将需要许多边缘情况才能使其足够可靠(交货延迟和不保证交货等)

However, I do not personally think this use case does cleverly fit the push use case at all. You will have to many edge case to make it reliable enough (delivery delay and non garantee of delivery, etc)

采用其他机制会更容易(例如应用在 URL 中的秘密 + 签名).

It is easier to have other mechanisms in place (like secret + signature in the URL by the app).

这篇关于使用静默 APNS 推送通知在没有用户通知的情况下发送令牌?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆