当应用程序关闭或根本不打开应用程序时处理推送通知 - iOS [英] Handle Push Notification when the App is off, or without opening the App at all - iOS

查看:37
本文介绍了当应用程序关闭或根本不打开应用程序时处理推送通知 - iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Amazon SNS 构建推送通知平台,使用 Amazon Cognito 和其他 Amazon AWS 工具,到目前为止工作正常.

I'm building a Push Notification platform with Amazon SNS, using Amazon Cognito and other Amazon AWS tools, so far working flawlessly.

但我的应用程序是多语言的,所以我试图在有效负载中仅发送 1 条带有字典的推送消息,该字典将包含一个包含我支持的所有语言的数组.

But my App is multi-language, so I'm trying to send just 1 single push message with a dictionary within the payload, this dictionary will contain an array with all the languages that I'm supporting.

所以我只是不想简单地处理消息,我的意图是在选择应该向用户显示的正确语言之前根本不显示推送消息......应用程序被杀死或不是.

So I just don't want to simply handle the message, what I'm intending is to do not show the push message at all before selecting the proper language that should appear to the user... With the App killed or not.

所以我的问题:

  1. 这看起来可能吗?

  1. Is this seems possible?

您建议采用什么方法来实现这一目标?

What approach do you suggest to achieve this?

非常感谢大家.

推荐答案

  1. 否(当用户终止应用或关闭后台获取时,您的应用将不会收到通知).

  1. No (when the user kills the app or when backgroundfetching is turned off, no notifications will reach your app).

研究如何本地化苹果开发者网站上的推送通知.通过让系统进行本地化,您可以准确地实现您想要的.查看推送负载中的适用键:https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html

Look into how to localize pushnotifications on apple's developer website. You can acieve exactly what you want by letting the system do the localization. See the applicable keys in the push payload: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/TheNotificationPayload.html

这篇关于当应用程序关闭或根本不打开应用程序时处理推送通知 - iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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