在规定的天数后删除文件
在我的iPhone应用程序中,我想在文件创建后的特定天数后自动删除文件。文件删除后的天数可以由用户指定。我存储创建的日期和时间文件的。如何执行此操作?感谢所有宝贵的建议。谢谢。
In my iphone application, i want to delete files automatically after a particular number of days from the creation of the file.The number of days after the file are to be deleted can be given by the user.I store the Date and Time of creation of file. How to perform this? All valuable suggestions are appreciated.Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
每次用户运行应用程序时,您都会检查日期并使用以下命令删除文件
Every time when user run the app you check with the date and delete the file by using
您可以看一下[本地]通知服务,只是在后台处理通知,没有用户警报...
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW4
You could take a look at the [local] notification service, just handling the notification under the hood, without a user alert...
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/IPhoneOSClientImp/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103-SW4