Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 65

Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
02/17/14 10:44 AM (11 years ago)

Checklist Plugin-Save After App Update?

Hi All, Does anyone know if the Checklist plugin deletes the checklists when the app updates from the App Store? Jake
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/17/14 11:08 AM (11 years ago)
I think he uses a database to store the checklist so I'm guessing he will save it to the documents directory thus it not being deleted on a refresh. Just guessing mind, you could always test it. Have you been reading up on persistent data storage
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/17/14 11:27 AM (11 years ago)
Kittsy is spot on - it's saved to a shared database on the device, which is not deleted when the app is updated, either by an App Store update or a Buzztouch update. However, if the app is deleted off of the device and reinstalled, it will be deleted.
 
Jake Chasan
Veteran developer
Profile
Posts: 1685
Reg: May 13, 2011
location unknow...
29,650
like
02/17/14 12:45 PM (11 years ago)
@Kitsy and Chris: Thanks for your response. I just wanted to make sure it was not stored in the caches directory. @Kitsy: Yes, I have been doing a lot of research on persistent data storage for user settings and other things. It all started when I released an app update which was using a custom plugin (based on the notepad plugin) I made which was using BT_fileManager to save a text file. When users updated the app, they noticed that their notes were gone. I have submitted the next version of the app which stores the string to a NSUserDefaults, so it will not be erased. Do you know if there is any way I could get back the notepad file which was lost when the app was upgraded, if I know the file name? Thanks, Jake
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/17/14 12:55 PM (11 years ago)
Unfortunately, the notepad app uses localStorage to save the data, which is akin to browser cache. Once it's gone, it's gone - there's no file saved to the device. Take a look at my rich text editor plugin - it saves the notes to actual files, in the cache directory. It should be safe from app updates. Keep in mind that, normally, any file saved to the cache directory will be deleted on a Buzztouch update (aka refresh). This is by design. Exceptions to this are any files that have names starting with "persist_". I know on my plugin, I took this into account, making sure that any notes saved to the device would include this prefix, keeping the data safe. The method that deletes files in the cache directory is found in the BT_fileManager class, in the +(void)deleteAllLocalData method. This method is called when the app is refreshed.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.