检查我的离子应用程序在AppStore和PlayStore上是否有新版本 [英] Check if my ionic app has a new version on AppStore and PlayStore

查看:92
本文介绍了检查我的离子应用程序在AppStore和PlayStore上是否有新版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想向基于Ionic的应用程序添加功能,以检查相应的应用程序商店是否有较新版本,如果存在,请提示用户下载一次(不能重复下载-他们应该能够跳过且不会被干扰).类似于 Siren ,但适用于Ionic以及Google Play和Apple App Store.我看到了对于本机应用程序和AppStore的类似请求对Play商店的类似请求,但没有特定于Ionic的内容.我觉得我可以使用应用版本和这些请求中列出的ajax调用将其拼接在一起,但是必须已经有其他人完成了此操作,并为此拥有了现有的Cordova/Capacitor插件.另外,可能还存在幼稚的解决方案可能失败的细微差别(即ajax调用失败,应用商店更改API,设备不支持较新版本等)的情况.

I would like to add functionality to my Ionic based application to check the respective app store for a newer version, and if present, prompt the user to download once (not repeatedly- they should be able to skip and not be nagged). Similar to Siren, but for Ionic and both Google Play and Apple App Store. I see this similar request for native apps and AppStore and this similar request for Play Store, but nothing specific to Ionic. I feel like I could stitch it together using App Version and ajax calls listed from those requests, but that there has to be other people who have done this already and have existing Cordova/Capacitor plugins for this. Also that there may be nuance that a naive solution could fail (ie ajax call fails, app stores change API, newer version is not supported on device, etc).

是否存在将实现上述行为的现有插件或代码?

Is there an existing plugin or code that will implement the behavior described above?

推荐答案

您可以使用市场插件,以及App版本的插件.

You can use Market plugin in addition to the App version plugin..

我没有遇到直接检查应用商店的解决方案,相反,我必须在服务器数据库中维护应用版本并在应用启动时进行检查.

I haven't come across a solution which directly checks the app store, instead i have to maintain the app version in my server db and check it at app start.

这是可以使用的流程.

  1. 应用启动
  2. 使用APP VERSION插件检查当前的应用版本
  3. 调用API端点到我的服务器以比较已部署的应用商店版本(在数据库中维护)
  4. 如果应用程序版本已过时,请使用MARKET插件将用户带到应用程序商店.

一个电容器替代品在那里,但是没有测试出来.请遵循电容器插件建议,以获取即将推出的解决方案.

A Capacitor alternative to the market plugin is there, but didn't test it out. Follow Capacitor plugins proposals, for an upcoming solution.

这篇关于检查我的离子应用程序在AppStore和PlayStore上是否有新版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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