Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 18    Views: 126

Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
05/14/12 03:33 PM (13 years ago)

Can I edit and save the config DATA hosted on BT?

I need to add one additional object to an array in my BT_config hosted by Buzztouch. It is not an option in the form for that page. Can I add this to the config data and save it? Or can I only do this if I host my BT_config.txt on my own site? Thank you.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/14/12 04:21 PM (13 years ago)
You can not modify the config data on Buzztouch server directly. You can only modify via the choices presented in the various screen settings. You can take the Online config file to say Dropbox. So, no you don't need to be Self Hosted. Actually by doing so you're self hosting the online Config file. You can also self host other parts of the app. When you select the data URL for a screen you are selecting where that says is being hosted. Fred
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/14/12 04:39 PM (13 years ago)
Thanks Fred. So, if I host the config on my server, I will still need to manually change it every time I make a change to my app on Buzztouch?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/14/12 04:54 PM (13 years ago)
Yes, but once you learn to read the Config file and you know the various options you may no longer need the Control panel. So you just have to evaluate the best method to use. If you're self hosted you might consider modifying the appropriate plugin or duplicating the plugin and modify for the one piece of data. Example two PDF plugins one by Buzztouch and one modified. Fred
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/14/12 04:59 PM (13 years ago)
Very good point about modifying the one plugin to suit my needs. It is a 1.5 app at this time though. Hopefully I can rebuild it in 2.0 this summer. Thanks for your help.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/14/12 05:07 PM (13 years ago)
You could copy the BTv1.5 config file, edit it and use in BTv2.0. Result you "converted" a BTv1.5 app to a BTv2.0 app. Is it worth the trouble? Depends on the app. Fred
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/14/12 05:58 PM (13 years ago)
...and do I change the screen data url for each screen as well as in core data?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/14/12 06:20 PM (13 years ago)
Very interesting question. Perhaps not. Some screen data urls left pointing to Buzztouch's server in the BTv1.5 app. Why not? You'll have to keep track of whatgoes where, but might be easier than changing. First we need to do an inventory of the screens vs. plugins and what's their similaritiesand differences. Fred
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/15/12 07:57 AM (13 years ago)
OK. I moved my BT_config.txt file to my server. I pointed to it in the control panel. I changed the address to it in the BT_config.txt file in xCode. Cleaned and built. App works great until I tap the refresh button on the main menu list screen. I get the "there was a problem parsing some configuration data." error. My BT_config.txt file on my server validates as JSON fine. Here is the output from xCode. Maybe someone can point me to where I should look for trouble? 2012-05-15 07:45:32.724 pets411[12349:17303] pets411_appDelegate: downloadAppData 2012-05-15 07:45:32.724 pets411[12349:17303] pets411_appDelegate: showProgress 2012-05-15 07:45:32.725 pets411[12349:17303] BT_strings: mergeBTVariablesInString (after merge): http://buzz10.x10.mx/Config/ 2012-05-15 07:45:32.725 pets411[12349:17303] BT_downloader: INIT 2012-05-15 07:45:32.725 pets411[12349:17303] BT_downloader: downloadFile: http://buzz10.x10.mx/Config/ 2012-05-15 07:45:32.725 pets411[12349:17303] pets411_appDelegate: downloadFileStarted: starting download... 2012-05-15 07:45:32.879 pets411[12349:17303] BT_fileManager: saveTextFileToCacheWithEncoding: cachedAppConfig.txt encodingFlag: -1 2012-05-15 07:45:32.891 pets411[12349:17303] pets411_appDelegate: downloadFileCompleted 2012-05-15 07:45:32.891 pets411[12349:17303] pets411_appDelegate: hideProgress 2012-05-15 07:45:32.891 pets411[12349:17303] BT_fileManager: saveTextFileToCacheWithEncoding: cachedAppConfig.txt encodingFlag: -1 2012-05-15 07:45:32.892 pets411[12349:17303] BT_application: validateApplicationData 2012-05-15 07:45:32.893 pets411[12349:17303] BT_application: ERROR parsing JSON in validateApplicationData: ( "Error Domain=org.brautaset.JSON.ErrorDomain Code=3 \"Unrecognised leading character\" UserInfo=0x12f4dbf0 {NSLocalizedDescription=Unrecognised leading character}" ) 2012-05-15 07:45:32.893 pets411[12349:17303] BT_application: validateApplicationData: ERROR: There was a problem parsing some configuration data. Please make sure that it is well-formed. 2012-05-15 07:45:32.893 pets411[12349:17303] pets411_appDelegate: error parsing downloaded app config data 2012-05-15 07:45:32.893 pets411[12349:17303] pets411_appDelegate: hideProgress 2012-05-15 07:45:33.425 pets411[12349:17303] BT_screen_menuList: iAd bannerViewDidLoadAd
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/15/12 08:01 AM (13 years ago)
Did you update the Config file in the source code ?
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/15/12 08:13 AM (13 years ago)
Yes.
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/15/12 08:52 AM (13 years ago)
Hi Fred. I found it. Typo. BT_config..txt Thanks for your help.
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/24/12 02:05 PM (13 years ago)
OK Fred. Here we go again. Everything was fine till I started messing around again :-) I am hosting the BT_config.txt file here: http://www.myserver.com/Config/BT_config.txt Is this the exact same line I need to paste in the project file in xCode, and in the BT control panel configuration data url? So basically all three places should have the exact same line for the "dataURL": ? Or does one still have all the trailing.....1.5.php?command=getAppData&appGuid=[buzztouchAppId]&apiKey=[buzztouchAPIKey ? I was thinking that one of the places was slightly different. Thanks again.
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/24/12 02:18 PM (13 years ago)
I am getting the "problem parsing some configuration data...." error again.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/24/12 03:26 PM (13 years ago)
"dataURL":"an internet address" Note: Not required to be Buzztouch. This means it can be whatever. An internet address leading to the app's remote configuration file. Note: By using http://www.myserver.com/Config/BT_config.txt you are hosting the Online Config file other than the Control Panel. This is normally a URL leading to the configuration data controlled by the buzztouch control panel. Note: The Control Panel is the default setting. It could also lead to a configuration file saved on your website Note: could be http://www.myserver.com/Config/BT_config.txt as indicated above. or online document storage folder. Note: How do you say Dropbox. BT_config.txt in the Xcode or Eclipse project is used if this is not provided. Note: If there'a no Config data URL the BT_config.txt will provide the JSON data, and the app will be a Offline app. This URL works closely with the reportToCloudURL. Note: This means of your app is an Online app, the app will use the reportToClouldURL. If the app is a offline app it will not need it use this. Report To Cloud URL "reportToCloudURL":"an internet address" Note: Same as above, It Does Not have To Be A Buzztouch URL. An internet address leading to a remote-script that determines if the app's content or layout needs update. Note: Are you wishing for the app to a Online Config file. As indicated above the Online Config file can be hosted on: Control Panel (default) Bring Your Own Website Online Storage: Say Dropbox If you chose to modify the default reportToCloudURL you must provide your on remote-script. If you don't know how , don't try. Just leave it alone. This (report URL) is optional if a dataURL (Online Config file) is not provided. Note: If you're taking the app offline you don't need it (Report URL). This (report URL) is required if a dataURL (Online Config file) is provided. Note: If you want the app to use the Online Config file for updates then you must have a report URL. BIG NOTE: If you're hosting and using your own Online Config file that's not the same thing as taking the app offline. You're just not using the Control Panel to host the Online Config file. The advantage of using an Online Config file is that you can update the app via changes to the Online Config file. Another method of updating an app is by publishing an new binary (ipa for iOS, .apk for Android, .bar for BlackBerry.) Use can "Take a app Offline" by using a non-Control Panel Online Config file and not making any changes to the file. The app is still an Online app, but it's not connected to the Control Panel for current JSON data. See more about the Report to Cloud URL.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/24/12 03:37 PM (13 years ago)
So basically all three places Three places? 1. Config file packaged in the Binary 2. Config file Data URL in Control Panel 3. ? Fred
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/24/12 04:07 PM (13 years ago)
3. = config file on my server. .....which means I don't need anything in #2. right?
 
Red Dog
buzztouch Evangelist
Profile
Posts: 805
Reg: Jun 16, 2011
Southern Califo...
18,800
like
05/24/12 04:31 PM (13 years ago)
....anyway, this is what it took to get things working again; 1. Binary = http://www.myserver/Config/BT_config.txt 2. Control Panel = http://www.myserver/Config/ 3. Self hosted = http://www.myserver/Config/BT_config.txt I left the report to cloud unchanged so I can make changes to the app using the BT control panel and then just copy the config.txt over to my server for automatic updates on the fly. Have a good weekend.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
05/24/12 05:01 PM (13 years ago)
Congrats. Just for others. Yes, you have to enter Config file URL into #2 above (the control panel Config URL) #3 is not a line you enter anywhere. It's the file itself . Fred
 

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.