xcode 如何在 App Store 上发布新更新/版本时通知用户?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9092513/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to notify a user when new updates / version is released on the App Store?
提问by GURU
When my iPhone application start, I want to notify the user if there is a new updates / version released on App store.
当我的 iPhone 应用程序启动时,如果 App Store 上发布了新的更新/版本,我想通知用户。
Does anybody have any ideas or has anybody else achieved anything similar?
有没有人有任何想法或其他人取得了类似的成果?
Thanks
谢谢
回答by pasawaya
Use Nick Lockwood's iVersion library. It's whole purpose is to notify the user when new updates are available.
使用 Nick Lockwood 的 iVersion 库。它的全部目的是在新的更新可用时通知用户。
iVersion is a library for dynamically checking for updates to Mac/iPhone App Store apps from within the application and notifying users about the new release. It can also notify users about new features in the app the first time they launch after an upgrade.
Purpose:
The Mac and iOS App Store update mechanism is somewhat cumbersome and disconnected from the apps themselves. Users often fail to notice when new versions of an app are released, and if they do notice, the App Store's "download all" option means that users often won't see the release notes for the new versions of each of their apps.
Whilst it is not permitted to update an App Store app from within the app itself, there is no reason why an app should not inform the user that the new release is ready, and direct them to the App Store to download the update.
And if your app is not on the App Store, either because it's an in-house/enterprise iOS app, or a Mac app delivered to customers outside of the store, you can't use the App Store update mechanism anyway.
iVersion is a simple, zero-config class to allow iPhone and Mac App Store apps to automatically check for updates and inform the user about new features.
iVersion automatically detects when the new version of an app is released on the App Store and informs the user with a helpful alert that links them directly to the app download page.
Or if your app is not on the store, iVersion lets you specify a remote plist file to check for new releases, and a download URL where users can get the latest release.
iVersion has an additional function, which is to tell users about important new features when they first run an app after downloading a new version.
iVersion 是一个库,用于从应用程序中动态检查 Mac/iPhone App Store 应用程序的更新并通知用户新版本。它还可以在用户升级后首次启动时通知用户有关应用程序中的新功能。
目的:
Mac 和 iOS App Store 的更新机制有些繁琐,与应用本身脱节。用户通常不会注意到应用程序的新版本何时发布,如果他们注意到了,App Store 的“全部下载”选项意味着用户通常不会看到每个应用程序新版本的发行说明。
虽然不允许从应用程序内部更新 App Store 应用程序,但应用程序没有理由不通知用户新版本已准备就绪,并引导他们到 App Store 下载更新。
如果您的应用程序不在 App Store 上,无论是因为它是内部/企业 iOS 应用程序,还是交付给商店外客户的 Mac 应用程序,您都无法使用 App Store 更新机制。
iVersion 是一个简单的零配置类,允许 iPhone 和 Mac App Store 应用程序自动检查更新并通知用户新功能。
iVersion 会自动检测应用程序的新版本何时在 App Store 上发布,并通过有用的警报通知用户,将他们直接链接到应用程序下载页面。
或者,如果您的应用程序不在商店中,iVersion 允许您指定一个远程 plist 文件来检查新版本,以及一个用户可以获取最新版本的下载 URL。
iVersion 有一个附加功能,即在用户下载新版本后第一次运行应用程序时告诉用户重要的新功能。
These excerpts were taken from the Github page here, where you can download it. There is also a comprehensive tutorial on installing and configuring iVersion, so I recommend that you check it out.
这些摘录来自此处的 Github 页面,您可以在此处下载。还有一个关于安装和配置 iVersion 的综合教程,因此我建议您查看它。
Hope this helps!
希望这可以帮助!
回答by Sebastian Wramba
To give a comprehensive answer. There are basically two ways you can go here. Depends on where you want to put the responsibility.
给出一个全面的答案。基本上有两种方式可以到这里。取决于你想把责任放在哪里。
App checks for new versions on server
应用程序检查服务器上的新版本
Using this approach, you would add a method to your app that is being called on every launch to compare the current version of the app (wherever you want to save that) with the version stored on the server. To achieve this, the server must implement a small web service that returns the latest version as a string or something else very simple. No rocket science there.
使用这种方法,您可以向每次启动时调用的应用程序添加一个方法,以将应用程序的当前版本(无论您想保存在何处)与存储在服务器上的版本进行比较。为此,服务器必须实现一个小型 Web 服务,该服务以字符串或其他非常简单的形式返回最新版本。那里没有火箭科学。
Server pushes new version information to app
服务器向应用推送新版本信息
This way you implement more code on the server-side to do a Push Notification to your app which informs the app about the new version. Advantage here is: Less client-side code and less effort to check, because the version check does not happen every time the app is started but instead only once the new version is actually released.
通过这种方式,您可以在服务器端实现更多代码,以向您的应用程序发送推送通知,通知应用程序有关新版本的信息。这里的优点是:客户端代码更少,检查的工作量更少,因为版本检查不会在每次应用程序启动时进行,而是只有在新版本实际发布时才会进行。
回答by Steven Straatemans
you can do a call to your server when the app starts. and that way check for a news item in your database, for example.
您可以在应用程序启动时调用您的服务器。例如,以这种方式检查数据库中的新闻项目。
When the server gives you something. show it in an alert.
当服务器给你东西时。在警报中显示它。
On the other hand, when there is an update in the appstore, doesn't the iphone give a warning?
另一方面,当应用商店有更新时,iphone 不是给出警告吗?
回答by Pavel Oganesyan
APNS- Apple Push Notification System
APNS- 苹果推送通知系统
Try it and google for ready server solutions.
试试吧,谷歌搜索现成的服务器解决方案。
Update: Okay, lets get it longer -
更新:好的,让我们让它更长 -
APNS is the best way to inform user about something new. It works with every state of the app - even when app closed - and it helps to avoid unnecessary requests to server. But you will need server to send pushes - if you can write it by yourself - it's nice, but the are some services to create backend for your app (no links - no ads, just google it).
APNS 是通知用户新事物的最佳方式。它适用于应用程序的每个状态 - 即使应用程序关闭 - 它有助于避免对服务器的不必要请求。但是您将需要服务器来发送推送 - 如果您可以自己编写它 - 这很好,但是有一些服务可以为您的应用程序创建后端(没有链接 - 没有广告,只需谷歌一下)。
To find out how to start with APNS on the client side and how to create all needed certificates and keys read this one
要了解如何在客户端使用 APNS 以及如何创建所有需要的证书和密钥,请阅读此内容
回答by Geet
There is something known as Silent notifications from iOS 7 and above, you can use that for this
iOS 7 及更高版本有一种称为静默通知的东西,你可以使用它
回答by yebw
Just check the latest version by communicating with your server and compare with the current version of app when the app starts up, if there is a newer version, notify the user.
只需通过与您的服务器通信来检查最新版本,并在应用程序启动时与当前版本的应用程序进行比较,如果有更新的版本,请通知用户。
回答by Sunil Gowda
Apologies in advance for the plug - but I think a service I built extending the concept from my experience building many apps solves this problem. Look at CleverStork- an Update Manager for Apps
提前为插件道歉 - 但我认为我构建的服务扩展了我构建许多应用程序的经验,解决了这个问题。看看CleverStork-应用程序更新管理器