簡體   English   中英

在iPhone上存儲數據的最佳方法是什么?

[英]What's the best way to store data on iPhone?

我已經使用SQLite數據庫制作了iOS應用...

為此,我閱讀了Apple的指南,發現“用戶可以將文件存儲在/ Documents目錄中”

在我的應用程序中,我正在使用單模式登錄。 為此,我將所有用戶數據(基本上是Sqlite db)存儲到Documents目錄中。 該數據庫也位於同一目錄中,該目錄包含有關從Web下載的詳細信息。

My question is,
1. Should I have to change the storing file location instead of to the Documents directory?
2. Where should my database file be placed?
3. don't want to delete database file after user deleting Apps.(if user installed again i want to show that same db)

如果我在用戶從設備刪除應用程序后將其放置在Documents目錄中,則會刪除所有文件。

請在這個問題上指導我。 提前致謝。

  1. &2 .:使用documents目錄很好。
  2. 刪除應用后,您將無法保留數據。 更好的方法是擁有用戶帳戶,在此帳戶中存儲一個人的數據庫的副本。 如果用戶重新安裝,則只需登錄並下載其帳戶信息。 (請參閱Parse.com,以獲得一些很棒的方法)。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM