Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 6    Views: 236

xparte
Aspiring developer
Profile
Posts: 50
Reg: May 08, 2012
location unknow...
2,450
Fourm Star
02/26/14 04:17 PM (8 years ago)

Need app to refresh/pull latest data on first open

Hi, I have an app in the iOS App Store but have come across a bit of an issue. I had some events in my app when submitted. Those events are now expired but because they're part of the submitted build, they show in the app till it refreshes. However, unless I do a save/publish in my BT control panel AFTER their app is installed, their app does not pull the latest data. I tested this out by deleting the app, re-downloading it (shows old data), clicking save & publish (get out of app & back in), then data is correct. Problem with this is that I would be needing to do this after every download for everyone (not sensible). Is there anyway around this? - I am self hosted - I have switched to live mode in config data before uploading (although strange that I only need to click save to cause a refresh for app). - I have not changed the Report to cloud or Config Data URL settings. - I do not have a refresh button (was disabled in code) * What I need is for the app to automatically refresh/pull data on first open. Nothing wrong with the app except the store data is out of date. Thanks for any help!
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
Fourm StarFourm StarFourm Star
like
02/26/14 06:50 PM (8 years ago)
 
xparte
Aspiring developer
Profile
Posts: 50
Reg: May 08, 2012
location unknow...
2,450
Fourm Star
like
02/26/14 07:15 PM (8 years ago)
Hi MrDavid, I'm aware of the offline/on mode and autorefresh (which I've already implemented) but the question I'm asking is in regards to data being pulled on first install like Susan wanted to know. https://www.buzztouch.com/forum/thread.php?tid=6A2ABDA47FB21DCB26F6C0D&fid=A00805FCC9962ECBA15A891&sortColumn=FT.id&sortUpDown=&currentPage=5 However, the end result of that was the use of a splash page so it didn't solve the problem, just offered an alternative solution. Was wondering if other people have had similar issues and what they did. Thanks for your suggestions though!
 
Niraj Shah
buzztouch Evangelist
Profile
Posts: 2942
Reg: Jul 11, 2012
Cerritos
37,920
Fourm StarFourm Star
like
02/26/14 10:34 PM (8 years ago)
Do you want to make it work for all the users who currently have the app? Don't think there is a way to achieve your goal. Or are you willing to publish an update to the app into the App Store? Upon every launch of the app, have it check a counter that is embedded in a text file, which is fetched by a dataURL of the Splash Screen. Compare the counter's value with the cached value (or empty -- first time). Fetch (auto-refresh) the config file if the fetched counter is of a greater value. All this would happen automatically, without User intervention. To avoid the counter file solution, just compare the lastModified values between the local and the remote config files.
 
xparte
Aspiring developer
Profile
Posts: 50
Reg: May 08, 2012
location unknow...
2,450
Fourm Star
like
02/27/14 05:25 AM (8 years ago)
Hi Niraj, Ideally with current users but understand that it might require republishing the app to sort this out. Was hoping there would be a simple way to get around this issue but it looks like it will be necessary to do some code modification. In the interim might be worth me going with the advice given to Susan & give instructions on the splash page to refresh. Will have to mod the code to bring the refresh button back then :) Thanks Niraj!
 
Niraj Shah
buzztouch Evangelist
Profile
Posts: 2942
Reg: Jul 11, 2012
Cerritos
37,920
Fourm StarFourm Star
like
02/27/14 10:02 AM (8 years ago)
You are welcome -- we all need to discuss ideas stir it around in our minds. :-) When you get a working solution, please make a new post to explain it. Thank you
 
xparte
Aspiring developer
Profile
Posts: 50
Reg: May 08, 2012
location unknow...
2,450
Fourm Star
like
03/02/14 06:28 PM (8 years ago)
I will if I ever get it resolved :) Thanks again Niraj!
 

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.