获取 iOS 应用程序的最后更新日期 [英] Get last update date for iOS application

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

问题描述

我想在我的应用上次更新时向用户显示.在安卓上我说:

I'd like to display to the user when my app was last updated. On android I say:

PackageInfo p = a.PackageManager.GetPackageInfo(a.ApplicationInfo.PackageName, PackageInfoFlags.MetaData);
TextView lastUpdated = messageView.FindViewById<TextView>(Resource.Id.lastUpdated);
DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, 0, System.DateTimeKind.Utc);
lastUpdated.Text = "App Updated on " + dt.AddMilliseconds(p.LastUpdateTime).ToLocalTime().ToString("MM-dd-yyyy");

我如何为 iOS 做类似的事情?

How can I do something similar for iOS?

推荐答案

您可以从下面的 iTunes 应用搜索 api 中获取您的应用详细信息.
http://itunes.apple.com/lookup?bundleId=yourBundleID&country=appCountry

from the below itune app search api you can get your app details.
http://itunes.apple.com/lookup?bundleId=yourBundleID&country=appCountry

简单的在运行时从 url 下载文件并将数据读取为 json 字符串,现在在获得的结果中您可以从 key currentVersionReleaseDate

simple download the file from the url at runtime and read the data as json string, now in obtained result you can get your current version release date from key currentVersionReleaseDate

这篇关于获取 iOS 应用程序的最后更新日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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