Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 4    Views: 131

Lester
buzztouch Evangelist
Profile
Posts: 17
Reg: Aug 12, 2011
Florida
10,670
01/04/13 03:59 PM (11 years ago)

BT_config, Caching, and iOS Updates

I'm having issues with updates for 2 offline apps that apparently want to use old config data when updated. One app I upgraded from BT 1.5 to 2.0. It opens to a screen with a tab bar and black screen when updated. Deleting and reinstalling the app resolves the issue, and new installs work fine. This is the same issue discussed in these 2 threads: https://www.buzztouch.com/forum/thread.php?tid=99D53CC51AB1F63867916E6 https://www.buzztouch.com/forum/thread.php?tid=AD2F6A13661B3B04508E10C I also looked through the PDF that @David published (http://www.buzztouch.com/resources/cached-data-after-updates.pdf) but I'm concerned that this method would delete users' saved notes from @GoNorthWest's Notepad Plugin also. The PDF also states that it would be integrated into the source code, but I'm not finding it. Additionally, I have an issue with an offline 1.5 app that is also using old config data after an App Store update. Again, deleting and reinstalling fixes the issue, and a new install is fine. We all know that sometimes an app needs to be reinstalled fresh, and that's the first thing I try if an app isn't working right. Some users apparently don't know that though and think the best resolution would be to leave 1-star reviews! I'm certainly not a programmer, but I wonder if this issue has anything to do with the change from storing data in NSDocumentDirectory vs NSCachesDirectory and parsing the old vs new BT_config.txt files? Both of these apps that are having issues were using the NSCachesDirectory on the version in the App Store, then switched to the NSDocumentDirectory on the updates. This is the best that I can figure as to where the problem is. To sum all this up, how can I get offline apps to only use the bundled bt_config.txt file with the caveat that any user-created notes from the notepad plugin be persistent?
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
01/04/13 06:36 PM (11 years ago)
Hi Lester, I went back through the older posts and David's documentation there. It seems you understand the documentation and are just worried about losing the Notepad plugin notes. There will most likely need to be some code change to try and keep the notes from deleting. Will report back soon:) Thanks for your support! Ian
 
Lester
buzztouch Evangelist
Profile
Posts: 17
Reg: Aug 12, 2011
Florida
10,670
like
01/04/13 08:08 PM (11 years ago)
Thanks Ian; right on. I want to be sure that the user-generated Notepad Plugin *.txt files are persistent while deleting/ignoring/shredding the old BT_config file and only using the bundled config data. It doesn't seem to be affecting all users, but it's difficult to ascertain exactly what devices/iOS versions this is affecting because it doesn't cause a "crash." Therefore, I have nothing for crash reports in iTunes Connect or Flurry. I wish I had a debugging console to see what exactly is happening on apps in the wild! Congrats to you & all the new staff. It's exciting to see BT growing and hopefully getting some well-deserved revenue. Do you all ever sleep?!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
01/05/13 05:04 PM (11 years ago)
This is a good discussion and it seems that everyone "undrestands" what's happening here. I'll some comments and hope they help... 1) BT_config.txt: "only using the bundled config data" The best way to force this is to make sure the BT_config.txt file in the project you compile has no value for dataURL or reportToCloudURL "dataURL":"" "reportsToCloudURL":"" tells the app to not check for updates and not to download another BT_config.txt file anywhere. Thanks the easy one.. 2) .txt files for Notepad plugin: These will saved in EITHER the NSDocumentDirectory OR the NSCachesDirectory directory. The location will depend on what BT_fileManager.m class file is compiled in the project. "Both of these apps that are having issues were using the NSCachesDirectory on the version in the App Store, then switched to the NSDocumentDirectory on the updates." This makes perfect sense. It's not good news but does make sense. The notes plugin uses the BT_fileManager.m class to save / load all the notes. It looks for notes in the same location as the BT_fileManager.m class is saving any other type of text data. This means that in the older version of the app the user generated notes were saved in NSCachesDirectory then after the update the notes are saved in NSDocumentDirectory. Again, makes sense but not idea. This wasn't something we considered when this change was applied. We were sorta forced to start using the NSDocumentDirectory when iOS 6 came out. So, there's not really any going back. But...this doesn't mean the "old notes" are gone...I don't think? I'll be they are in the devices NSCachesDirectory but the app isn't looking there anymore. I wonder if it makes any sense to write some custom code (not hard if it makes sense to do so) to look in the Cache directory for some "old stuff" then begin using the Documents directory. Not sure, just spit-ballin' here. Naturally we're willing to help do what we can to get you through this. Worst case, the old notes are gone (bogus). Best case, there were no old notes to worry about. Middle case, we can find the old notes and move them to the newer directory. Confusing I realize but it's the best way I know how to explain it? d.
 
Lester
buzztouch Evangelist
Profile
Posts: 17
Reg: Aug 12, 2011
Florida
10,670
like
01/11/13 05:37 PM (11 years ago)
Thanks @david. Makes perfect sense. I think the easiest thing for me to do is just make a note in the update text that some users may need to reinstall if it doesn't load correctly. I implemented the notes plugin at the same time as going from BT 1.5 to 2.0 (and after the directory change), so I'm sure the notes .txt files are in the documents folder. I wish I had an idea of what was going on with the blank screen issue when upgrading from BT v1.5 to 2.0 versions of the app, but I can't reproduce it! It apparently persists even with subsequent updates for those who ever had the 1.5 version. Unless they delete and reinstall. I was trying to figure out if since the directory was changed, if the bt_config.txt in the cache directory on existing installs (1.5), was conflicting with the bt_config in the documents directory in the updates. Still, it makes most sense for me just to ask folks to reinstall as it obviously isn't a widespread BT issue. As always, greatly appreciate help from the Buzztouch overlord!!
 

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.