iPhone 应用程序和编程更新

标签 iphone

当用户登录我的 iPhone 应用程序时。我将他们的 userID 和相关信息存储在 [NSUserDefaults standardUserDefaults] 中。这样他们就不需要每次访问我的应用程序时都登录。

当我的应用程序在应用程序商店中上线并且我对代码进行更新时,此信息是否会丢失 - 他们是否需要登录?如果是这样,我在更新时如何保留这些信息?

虽然我无法想象这种情况会发生,但是用户在安装我的应用程序后是否应该选择删除它 - 我怎么知道他们已经删除了它?我正在使用推送通知,并希望将用户标记为不活跃,这样我就不会继续向他们推送通知。

非常感谢 谢丽尔

最佳答案

只有测试才能确认应用程序的更新过程如何工作。该文件的内容如下:

Files Saved During Application Updates

Updating an application replaces the previous application with the new one downloaded by the user. During this process, iTunes installs the updated application in a new application directory. It then moves the user’s data files from the old installation over to the new application directory before deleting the old installation. Files in the following directories are guaranteed to be preserved during the update process:

  • Application_Home>/Documents
  • Application_Home>/Library/Preferences

Although files in other user directories may also be moved over, you should not rely on them being present after an update.

详情请点击 http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/RuntimeEnvironment/RuntimeEnvironment.html

The Feedback Service

If a provider attempts to deliver a push notification to an application, but the application no longer exists on the device, the device reports that fact to Apple Push Notification Service. This situation often happens when the user has uninstalled the application. If a device reports failed-delivery attempts for an application, APNs needs some way to inform the provider so that it can refrain from sending notifications to that device. Doing this reduces unnecessary message overhead and improves overall system performance.

For this purpose Apple Push Notification Service includes a feedback service that APNs continually updates with a per-application list of devices for which there were failed-delivery attempts. The devices are identified by device tokens encoded in binary format. Providers should periodically query the feedback service to get the list of device tokens for their applications, each of which is identified by its topic. Then, after verifying that the application hasn’t recently been re-registered on the identified devices, a provider should stop sending notifications to these devices.

http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW1

关于iPhone 应用程序和编程更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2923788/

相关文章:

iphone - 符合iOS4

iphone - 从 NSString 到 NSDate 的转换不起作用

iphone - CALayer和UIView显示顺序

iphone - 如果我有一个成就的标识符和percentComplete,是否可以将其转换为(GKAchievement *)成就?

ios - 理解图层上的暂停和恢复动画

ios - XCTest:点击 navigationItem 返回按钮

iphone - 后台运行的标准位置服务的 iOS 4 应用程序生命周期行为

iphone - 简单的节拍器iPhone应用程序

iPhone PDF 创建文本反转问题

iphone - iphone 支持多少同时(并发)网络连接?