Discussion Forums  >  Uncategorized

Replies: 15    Views: 900

volley
Aspiring developer
Profile
Posts: 37
Reg: Feb 19, 2011
Amsterdam
10,570
05/31/11 10:40 AM (14 years ago)

offline version of app containing urls in config data

I’ve been reading the posts about creating an offline BT 1.5 app. If I understand correctly that involves the following steps: - having all texts, images and other assets in the project itself and no references to the Buzztouch server - removing the cached configuration files - removing the Configuration Data URL from the core settings panel and also the Report to Cloud URL - copying the apps new configuration data to the BT_config.txt in xcode and rebuild What I don’t understand why the core settings configuration data still contains url’s pointing to buzztouch after removing the Configuration Data URL from the core settings panel and also the Report to Cloud URL. They appear in the getchilditems sections of menu’s (like: dataURL:http://www.buzztouch.com/appdata/v1.5.php?command=getChildItems&appGuid=[buzztouchAppId]&apiKey=[buzztouchAPIKey]&screenId=[screenId]) Would these references cause the app to try to go online? Glad to hear your findings. Thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/31/11 11:27 AM (14 years ago)
Yup, you seeme to understand it fine. The reason you're seeing URL's in some of the screens is because some screens (like menus) can be dyncamically created from backend server. In these cases, you'll see a dataURL in the Advanced Setting of that screen. These default to the buzztouch server. Remove these from each screen (be sure to save) and they will magically dissappear form your config data.
 
volley
Aspiring developer
Profile
Posts: 37
Reg: Feb 19, 2011
Amsterdam
10,570
like
05/31/11 12:05 PM (14 years ago)
Thanks David, I overlooked these default screen data url's.
 
Going-Viral
Apple Fan
Profile
Posts: 120
Reg: Jun 13, 2011
Doncaster
1,200
like
06/14/11 11:29 AM (14 years ago)
Apologies for not getting this, when you say remove references for dataURL do you mean erase the following code: dataURL:http://www.buzztouch.com/applications/EAFB7217541E2875D0F58EF4C/customHTML-blahblah.html Or do you mean modify to dataURL: Also, where is the rest of the content? I can see that the text created by the Configuration Data URL it appears to store the main config and menu items but not the main page content, this only seems to be available from the app making a call to an online/hosted page on the buzztouch server. Is it possible to make a truly offline, self contained app that can be used without WiFi? I might be missing something, so apologies for my simple questions. Many thank in advance :-)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/15/11 12:10 AM (14 years ago)
Hi in Doncaster: You're close, you'll get it soon enough. YES, you can make a totally offline app. The idea behind the config.txt file is that it 'points' to the content. This could be pointing to a URL or it could be pointing to a File within the Xcode project. Example: You create some HTML documents, PDF's and other content. You drag these into the BT_Docs folder. Next, you have a file name in the config.txt file telling the software where the file is. This means a PDF screen would have a file name and not a file URL. Hope this helps.
 
Going-Viral
Apple Fan
Profile
Posts: 120
Reg: Jun 13, 2011
Doncaster
1,200
like
06/15/11 12:28 AM (14 years ago)
Many thanks, I think I'm getting the hang of it :-)
 
Going-Viral
Apple Fan
Profile
Posts: 120
Reg: Jun 13, 2011
Doncaster
1,200
like
06/15/11 12:31 PM (14 years ago)
Ok, I've modified dataURL:http://www.buzztouch.com/applications/EAFB7217541E2875D0F58EF4C/customHTML-blahblah.html to dataURL:blahblah.html and imported the blahblah.html to the BT_Docs folder and the app is still trying to obtain the file online despite the WiFi being disabled. I've used XCode to Clean the original project, re-published and re-installed the app on the iPhone, but still no joy. Could you please offer some much need wisdom? Again, many thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/16/11 11:00 PM (14 years ago)
Wisdom...funny. The dataURL should blank. If a value is there the app will look for the file online. Use the file-name option in the control panel, not the dataURL. It's one or the other, not both.
 
Going-Viral
Apple Fan
Profile
Posts: 120
Reg: Jun 13, 2011
Doncaster
1,200
like
06/17/11 03:21 AM (14 years ago)
I can't believe I didn't see the option for HTML Doc, I just needed to remove the Custom HTML page and add a new HTML Doc and hey presto, true offline content. Many thanks, for putting up with my daft questions :-)
 
claudio
buzztouch Evangelist
Profile
Posts: 51
Reg: Jun 10, 2011
Chiang Mai, Tha...
510
like
08/14/11 11:30 PM (14 years ago)
Hello David, I have another question related to this topic. I published one app on the iTunes Store. there are something like 100 context screens, and few external links to watch some youtube video, listen audio track, and see a PDF I uploaded on DropBox. I just saw that when an user first download my app EVERY screen needs to be updated by internet, even if the context are actually stored inside the app (8MB). So If the user doesn't have internet at that moment, he can't properly enjoy the app. I would like to avoid it because it can be really tiring! I would like to set my app OFFLINE except for links going to youtube, streaming audio and the PDF uploaded on Dropbox. How can I do it?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/15/11 11:28 PM (14 years ago)
For the content pages, like the PDF's, add them to the Xcode project before you compile. Use the fileNames in the control panel and not the URL's. This means you'll be embedding content in the app. This approach is common and works well. It does mean that you'll need to re-compile and re-submit an app update because the app in the store now does not have the content included.
 
claudio
buzztouch Evangelist
Profile
Posts: 51
Reg: Jun 10, 2011
Chiang Mai, Tha...
510
like
08/17/11 02:20 AM (14 years ago)
Thanks David. My app is mainly done of Custom HTML/Text page .. at the moment the app needs to refresh every time you want to see each Custom HTML/Text page for the first time.. I would like to avoid it because those are static informations I will never updated them.. maybe I will add other contexts, but I will never review the ones already published. So where I have to go to do so? If I do it, anyway my user will be able to see my youtube video/dropbox shared doc? Then, anyway, I have to re-compile my app again right? the user that already downloaded the app will have any usability problems while the update is waiting to be published? Sorry for so many questions. It's kind of priority to me because some user complained with me about it.. luckily not (yet) with a public review, but writing on my support email. Thanks David (and everyone who can help anyway he is well welcomed :) and anyway my app
 
claudio
buzztouch Evangelist
Profile
Posts: 51
Reg: Jun 10, 2011
Chiang Mai, Tha...
510
like
08/17/11 11:49 AM (14 years ago)
I found this: http://www.buzztouch.com/forum/thread.php?tid=31416AD1102E020 You wrote: a) Look at the Core properties for the app b) Click the link to show you the configuration data (plain text) c) Copy this data into the BT_config.txt file in the Xcode project d) In this file, after copying the data, REMOVE the dataURL property. Removing the dataURL property will force iOS to use the settings in BT_config.txt instead of fetching it from the dataURL. I hope this makes sense. Also, if you don't want your control panel to show any usage statistics, remove the reportToCloudURL also. When at c), I need to completely replace my config.txt file with the configuration data (plain text)? If not, where exactly I should copy it?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
08/18/11 12:05 PM (14 years ago)
Yup, just replace the data in the BT_config.txt file. All this is doing is saving you from having to re-download the entire project. When you download the project this data is set to the latest version from your control panel. Clicking the link in your Core Setttings screen just shows you the data so you can overwrite whats in the Xcode project. The idea is that you want to submit something that works nicely without having to go to the internet for a newer version.
 
LostBalloon
Veteran developer
Profile
Posts: 2
Reg: Nov 12, 2011
Montreal
20
like
11/12/11 10:51 PM (14 years ago)
i suppose dataURL can be used to query custom php files, my question is that for example I need to have users login (a custom one) and i need the app to remember some info that i can then send when creating the requests. I'm pretty new to buzztouch and i still don't have a clear understanding of how i could do this just yet and i think its just about the only piece of info missing about the use of dataURL in this thread. Thanks in advance.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/13/11 01:40 AM (14 years ago)
Hi LostBalloon: I'm guessing you have some PHP experience...cool. There are really two things to understand here. First, if you need the app to remember some info that you need to send with requests, OK. depending on what you want to remember, it may be easier for you to remember this server-side using php/mySQL/text file that on the device. This depends on your skillset. For most php devs they do... a) create a simple login script as explained in the docs. b) Add userId=[userId] to any URL's in the config data they point to custom backend logic. They do this because the app will append the current user's id (the logged in user) to the URL. This allows you to know who is asking for what. If the actual person is not important or you don't want to track the user you could use deviceId instead. deviceId is merged like: deviceId=[deviceId] This will be unique per device but won't tell you who the person is. You'll have to decide if that's useful or not. Hope this helps.
 

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.