应用程序内的 IOS 应用程序更新检查 [英] IOS app update check within application

查看:41
本文介绍了应用程序内的 IOS 应用程序更新检查的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在应用程序内检查苹果商店中的应用程序更新.每次应用程序启动时,我们都需要检查这个..

I need to check application updation in apple store within the application. Every time application starting we need to check this..

请检查以下帖子中的答案:iOS 应用更新通知

please check answer in below post: iOS app update notification

哪个是最好的选择?哈比还是其他?

which one is best option? Harpy or any other?

推荐答案

你需要在你的服务器上有一个 WebService(或类似的东西),你的应用程序在启动时请求它,以了解哪个是可用的最新版本.(如果您还没有 WS 并且真的不想为此实现一个,您也可以简单地使用包含该版本的 XML 或文本文件)

You need to have a WebService on your server (or something similar) that your app requests at startup, to know which is the latest version available. (If you don't have a WS yet and really don't want to implement one for that, you may also simply use an XML or text file that contains the version too)

然后使用 [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] 比较从您的服务器检索到的这个版本与应用程序的当前版本.

如果它们不同,你可以显示alertview并重定向到itms-apps://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=[APPID]&mt=8(将APPID替换为您的iTunes Connect App ID),该链接将使您的iPhone直接在您的应用程序更新页面上打开AppStore应用程序.

If they are different, you can display the alertview and redirect to itms-apps://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftwareUpdate?id=[APPID]&mt=8 (replacing APPID with your iTunes Connect App ID), which is the link that will make your iPhone open the AppStore application directly on your application's update page.

您也可以使用 this 但如果您从应用商店中抓取您始终面临着应用商店更新的风险,并且您的应用将无法获取最新版本,因此您必须像上面的步骤一样进行自己的版本检查.

You can go with this too but if you Scrape from the app store you're always at risk of having the app store updated and your apps won't be able to fetch the latest version, so you must go with your own version checks like upper steps.

这篇关于应用程序内的 IOS 应用程序更新检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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