检测 iPhone 应用程序版本更新? [英] Detecting iPhone app version update?

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

问题描述

我想确定我的应用程序的新版本何时在 Appstore 上可用,并在发生这种情况时向用户显示某种形式的通知 - 可能是 UIAlertView 或类似的 - 并且想知道是否有人知道任何预先设计的框架这样做?我找到了 iPhone SDK 提供的 StoreKit,但它似乎只返回应用程序名称,而不是版本号,所以对我没有用.

I'd like to determine when new versions of my app are available on the Appstore and display some form of notification to the user when this happens - perhaps a UIAlertView or similar - and wondered whether anybody knew of any pre-designed frameworks for doing this? I found the StoreKit provided by iPhone SDK but it seems to only return application names, not version numbers, so is of no use to me.

非常感谢任何帮助.

谢谢!

推荐答案

我认为没有针对此类问题的预制框架.至少我在处理那个话题时找不到一个.

I don't think that there is a prefabricated framework for that kind of issue. At least I couldn't find one when i was dealing with that topic.

我所做的很简单(前提是您可以访问任何可以上传文件的网络服务器)

What I did was fairly easy (provided that you have access to any kind of webserver where you're able to upload files)

我只是创建了一个包含两个内容的文本文件.

I simply created a text file with two things in it.

1) 可用的最新版本的版本号2) 显示给用户的文本(​​以防他的版本过时)

1) the version number of the most up to date version available 2) a text that is being displayed to the user (in case his version is out of date)

在启动时(实际上我在每 3 次启动时执行一次,每天不超过一次)我下载 txt 文件,阅读第一行,提取版本,将其与正在运行的应用程序的当前版本进行比较用户部门.如果版本已过期,我会从文本文件中读取第二行并将其显示在 UIAlertView 中.

on startup (actually I do it on every 3th startup and not more than once per day) i download the txt file, read the first line, extract the version, compare it to the current version of the app that is running on the users divice. if the version is out of date i then read the second line out of the text file and display it in an UIAlertView.

希望能帮到你
*山姆

I hope I could help
*sam

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

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