DrMacca
Aspiring developer
Profile
Posts: 17
Reg: Apr 22, 2012
Sheffield Steel...
5,870
11/12/12 09:48 AM (13 years ago)

Data for this screen has not been downloaded......

Dear BT Friends, I know this one crops up from time to time. I'm pretty sure I've done all the recommended steps - followed the instructions for making sue the file is in the correct folder (BT_Docs), done a Clean and a Build, but still I'm not having any success in getting the Word file to load, and a, repeatedly getting the "Data for this screen has not been downloaded" error message in the simulator Any ideas much appreciated. Xcode output as below.... all the best Graham 2012-11-12 16:42:03.307 idig1[16091:17303] BT_screen_wordDoc: initLoad 2012-11-12 16:42:03.307 idig1[16091:17303] BT_fileManager: File does not exist in Xcode bundle: basicSurbeySkills2Levelling_1.doc 2012-11-12 16:42:03.307 idig1[16091:17303] BT_fileManager: File does not exist in cached directory: basicSurbeySkills2Levelling_1.doc 2012-11-12 16:42:03.309 idig1[16091:17303] BT_screen_wordDoc: shouldAutorotateToInterfaceOrientation 2012-11-12 16:42:07.340 idig1[16091:17303] BT_screen_wordDoc: alertView:clickedButtonAtIndex: 0
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/12/12 10:17 AM (13 years ago)
There was a problem with the Custom HTML / Text plugin after the update. This issue (typo on our end) could also cause this for Word Doc, Excel Doc, PDF Doc, PPT Doc and other screens that use a dataURL. It's fixed. If you create new screens (after this fix we implemented) you should not have this problem. For existing screens (that are not loading their data)...do this... 1) Visit the screen in in question in your control panel. 2) Press "save" in one of the advanced properties. 3) Refresh you app's data in the simulator or device. Should fix it. It was an issue of your JSON data not using the correct URL to the file that is created for each Custom HTML / Text screen you create.
 
DrMacca
Aspiring developer
Profile
Posts: 17
Reg: Apr 22, 2012
Sheffield Steel...
5,870
like
11/12/12 11:03 AM (13 years ago)
Dear David, thanks very much for this. It is however a file that will be local and not supplied by a URL - but I shall try it as you said. Is there a quick way to guarantee that the local config JSON data (i.e. the one that's in the BT_Config folder in the project folder on my dev machine) always reflects what is in the Config data on the Buzztouch console? Sometimes it seems to update automatically and sometimes not. Obviously downloading the entire zip file of the project code from Buzztouch.com wil re-initialise everything but if this can be avoided it would be good. Thanks very much for this. all the best Graham
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/12/12 11:25 AM (13 years ago)
Hi again. Two things.. --The "fix" on our end for the Custom HTML / Text plugin has nothing to do with local files. Files included in the project. It's only related to the dataURL you see in the JSON data when you press save. The dataURL was "broken" and pointing to the wrong file on our machines. This means if you're having trouble loading files that are included in your project, this fix won't change anything. There isn't anything wrong with that logic. If a file won't load in your Xcode project then it's a matter of the file not being included in Xcode or the fileName in the JSON doesn't match the name of the file. --config.txt: Good question. There is NOT a connection between your Xcode environment and your buzztouch control panel. You're right in that when you download your projects source code a copy of the most current config.txt file is included in the download. But, as soon as you make a change in your control panel, the config.txt file in your project is NOT the same as the config.txt file in your control panel. This is the reason for the "show configuration data" option in your control panel - so you can see / copy these changes to your Xcode project if you want. The idea is that the device downloads the latest version onto the device, not the Xcode project. This happens when you "refresh." When you refresh, the device caches the latest version on the devices storage system, not in Xcode. This is a common confusion point. In ALL cases, it's important that the config.txt file in your Xcode project match the config.txt file in your control panel when you compile for release so the app in the App Store has the latest info. This would not matter if we new the end-user was sure to have an internet connection when they first launched your app. Sometimes they don't, which is why the config.txt file needs to be current. Hope this helps.
 
DrMacca
Aspiring developer
Profile
Posts: 17
Reg: Apr 22, 2012
Sheffield Steel...
5,870
like
11/13/12 04:45 AM (13 years ago)
Hi again David, thanks very much for this. Are the references to local filenames case sensitive, or subject to a maximum name length? the filename in my project is basicSurbeySkills2Levelling_1.doc as in the following {"itemId":"0BE6DC9B587D3C9792754A7", "itemType":"BT_screen_wordDoc", "itemNickname":"Flowchart", "navBarTitleText":"Flowchart", "localFileName":"basicSurbeySkills2Levelling_1.doc", "forceRefresh":"0"}, and the one in my Xcode project directory is basicSurbeySkills2Levelling_1.doc which I know because I just copied the name out using Finder, and this same file is listed under my BT_Docs under my project in Xcode, and when I click on it in Xcode, it previews the doc file. Am I missing something? Apologies in advance if I'm doing something silly here Thanks for all your help - really appreciated all the best Graham
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/14/12 12:20 AM (13 years ago)
Nope, you're not missing anything and no need to apologize - all just part of the process :-) It looks like you've done everything you're supposed to do. It does sound like you've added the document to the Xcode project.... Do this: Run the app in the simulator of a device. Be sure the Console (bottom of Xcode window) is open so you can see all the "debug" output statements we've included in the code. These exist to help in cases like this - when something doesn't behave the way it should. Get to the menu or button screen with the button that loads the Word Doc screen. Use the "clear" button on the Console so nothing is in it. This will make it easier to see what's happening "when you click the button to load the Word Doc screen." Click the button...you'll see a ton of output in the Console to help you understand how your app is working. Look for the lines where the code is telling you where it's trying to find the Word Doc in your project. It should point you in the right direction.
 
DrMacca
Aspiring developer
Profile
Posts: 17
Reg: Apr 22, 2012
Sheffield Steel...
5,870
like
11/14/12 12:48 AM (13 years ago)
Dear David, sorry I should have dome this to start with. I'll check the exact wording when I get to work but it was the BT_Filemanager: File does not exist in Xcode bundle error. In fact I've just realised - the output consol is listed at the top of this thread, but here it is again anyway: 2012-11-12 16:42:03.307 idig1[16091:17303] BT_screen_wordDoc: initLoad 2012-11-12 16:42:03.307 idig1[16091:17303] BT_fileManager: File does not exist in Xcode bundle: basicSurbeySkills2Levelling_1.doc 2012-11-12 16:42:03.307 idig1[16091:17303] BT_fileManager: File does not exist in cached directory: basicSurbeySkills2Levelling_1.doc all the best Graham
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/14/12 02:06 AM (13 years ago)
OK, got it. This confirms that Xcode does not recognize this file as "part of the project." You must have added it properly or it would not have displayed in the preview mode when you single click it in Xcode. Maybe it's the way it was added to the project? 1) Delete it from the project. In Xcode, use the delete option from the context menu (while the document name is selected) and "Remove Reference" only, do not delete the actual file. 2) From Finder, click and hold...then drag the file over the BT_Docs folder inside the Xcode project. Drop it when you see the little green + character. 3) When the options (File Add) dialogue box opens, be sure to check the "Copy to bundle resources" checkbox. Save (done, OK, whatever it reads). 4) Remove the app from your device or your simulator. Re-compile, test. If it does not work I'm not sure what direction to point. There are countless thousands of these Word Doc screens in the wild and I've not ran into this before. It's for sure an issue of Xcode not recognizing the file as part of the project. Good luck!
 
DrMacca
Aspiring developer
Profile
Posts: 17
Reg: Apr 22, 2012
Sheffield Steel...
5,870
like
11/15/12 10:01 AM (13 years ago)
Hi again David Fantastic! Success - yes that did it - I'm actually on 4.3.3 (Xcode that is) so it's called "Add to target" when copying the file over - but now it works! There's probably an option somewhere in Xcode to look at files in the folder window in Xcode to see if they're linked to a target too - will have a look - could be a quicker way of debugging such issues in future Thanks so much for your help all the best Graham
 

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.