应用更新后如何唤醒? [英] How to wake up when the app has been updated?

查看:80
本文介绍了应用更新后如何唤醒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实联系了Apple开发人员技术支持,他们回答我"不,没有API会告诉您应用程序已更新."

I did contact the Apple Developper Technical Support and they answer me that "No, there are no APIs that will tell you that an app has been updated."

但是,当用户将应用程序更新到最新版本时,我真的需要唤醒我的应用程序. 因为我的推送通知系统的最新版本已更改,并且用户必须注册到新平台才能继续接收通知.
要注册用户,该应用应启动.

However, I really need to wake up my app when the user update it to last version. Because my push notification system has changed in the last version and the user must be registered to the new platform in order to continue to receive notifications.
To register the user, the app should launch.

有人知道我该怎么做吗?

Does anyone know how I could do that ?

我的一些应用程序在Objective C中,其他应用程序在Swift中.

Some of my apps are in Objective C, others are in Swift.

感谢您的帮助.

推荐答案

您可以使用后台访存来快速执行一小段代码并将通知显示在用户屏幕上.但是在这种情况下,您需要使用自己的服务器来存储发布的当前应用程序版本. 这是一个了不起的教程,您如何使用后台获取. https://www.raywenderlich.com/143128/background-modes-tutorial -getting-started

You can use background fetch in order to quick execute a small part of code and show an notification into user screen. But in this case you need your own server where you store current app version you have released. this is a wonder tutorial how you can use background fetch. https://www.raywenderlich.com/143128/background-modes-tutorial-getting-started

但是请记住,您不能将应用程序推送到iOS的前台.

but remember you can not push your application into foreground in iOS.

这篇关于应用更新后如何唤醒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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