沉默APNS推送通知的应用发送的令牌不通知用户? [英] Use of silent APNS push notifications to send token without user notification?

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

问题描述

我已经通过其他问题和对策检查在这里计算器,但不能看到的东西完全一样;我希望能够通过APNS推令牌。这样做的目的是验证后续的用户请求一个RESTful Web服务来自一个iPhone设备,而不是从一个非iPhone源(是微不足道的改变HTTP头假看起来像iPhone的要求)。

问题的夫妇:


  1. 这是苹果下允许的准则坚持推送通知被启用?

  2. 是否有可能发送SILENT推送通知携带一些小的文本有效载荷?

  3. 有谁知道这是否会通过苹果的审查或运行中发生冲突的指引

非常感谢。


解决方案

  1. 您不能强迫用户接受推送。用户总是选择拒绝。

  2. 是的,你可以发送通知没有声音/文本,并添加元数据。

  3. 是,发送一个令牌,似乎苹果的可接受使用。

不过,我不个人认为这个用例并巧妙地在所有适合推用例。你将有很多优势的情况下,使其足够可靠(延迟交货,交货的非garantee等)

这是比较容易有其他机制在地方(如通过应用程序中的URL秘密+签名)。

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).

Couple of questions:

  1. Is it permissible under Apple Guidelines to insist that push notifications be enabled ?
  2. Is it possible to send a SILENT push notification carrying some small text payload?
  3. Does anyone know if this would pass Apple's scrutiny or run afoul of their guidelines

Many thanks.

解决方案

  1. You cannot force user to accept push. A user always has option to refuse.
  2. Yes you can send a notification with no sound / text, and add metadata.
  3. Yes, sending a token seems an acceptable use for 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)

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

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

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