Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 24    Views: 65

Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
02/13/13 04:38 PM (12 years ago)

Can not get Word Doc plugin to work

Hi I am trying to use the word doc plugin but every time I include it and try load it in the simulator it gives me the error saying: Data can not be downloaded please make sure you connected to the internet. Now I am connected to the internet, my word doc is in my BT Doc file in xcode but I still get this error. Does anyone know how to fix this or has anyone had success with the word doc plugin? Regards Lloyd
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
02/13/13 04:53 PM (12 years ago)
Hello, Did you include the actual document into the bt docs folder in xcode or eclipse?
 
0z2000tv
Aspiring developer
Profile
Posts: 315
Reg: Sep 10, 2011
Nashville
11,950
like
02/13/13 04:56 PM (12 years ago)
Did you build and run after you added the file to xcode? Mike
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/13/13 04:56 PM (12 years ago)
If it's not being pulled from the internet, it needs to be added to your project. You can't just 'drop' in into the BT_Docs folder, you have to 'add' it to your project. GoNorthWest wrote a great tutorial on this (and many, many things) and it can be found in the "How To" section of this website. Look for the document titled "Adding Files to an Xcode or Eclipse Project" about mid-way down the page. Also take a look at some of the other stuff he's authored. A quick peek will save hours of angst. Cheers! -- Smug
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 05:14 PM (12 years ago)
Hi guys Thanks so much for your responses. @Smug I went and checked out that How to Post. I have done all that. I have included the word document in my app. I have also placed the file in the BT doc file but did get that data can not be downloaded error. Quick question the iMac I am on now is new and doesnt have Word on it yet. I have created the word files on my laptop and used a USB to transfer it over to my iMac and place the files in xcode. That wouldnt be effecting it would it? Kind regards Lloyd
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
02/13/13 05:20 PM (12 years ago)
edit
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/13/13 05:21 PM (12 years ago)
Nah. If you don't have word, it just wont open word to view it. It has no effect on any 'access' to the document... If you've added it to your app, and you've added it to your screen, and it's not working, I'd check syntax. Make sure file names are correct, things of that nature... If you loaded it into the 'documents' portion of your control panel, then it should reside in BT_Docs in your project... Another possibility: Is both a 'local file' AND a dataURL being specified? That doesnt work so well either... Let us know what you've found out.. let's get this done! Cheers! -- Smug
 
Calypso Kid
Aspiring developer
Profile
Posts: 780
Reg: Mar 09, 2012
Upstate New Yor...
18,200
like
02/13/13 05:24 PM (12 years ago)
I had issues with docx files in my ios app. I had to change them all to doc files. which filr type are you using?
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 05:34 PM (12 years ago)
I have changed my files to .doc and I have only included a local file not a data url as well. I can see the file in my BT doc file. It says test.doc. It's in my word doc plugin. My menu item is there and its linked to the word doc file. It is crazy it just wont load it thats why I thought maybe because word isn't installed on my iMac but now that theory is out I am not sure why it is not working. I have also checked the syntax. Kind regards Lloyd
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/13/13 06:27 PM (12 years ago)
Try deleting the app from the simulator, then do a clean and run again. It really sound to me like one of two things. Either you did not recompile the app after you added the doc to the BT_docs folder, or you copied the file to BT_docs outside of Xcode.
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 06:32 PM (12 years ago)
@MGoBlue ok i will delete the app and try again. When you say recompile, you mean click build before you run the simulator again after adding the file to BT docs folder? What do you mean when you say copied the file to BT docs outside of xcode? Regards Lloyd
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 06:48 PM (12 years ago)
@MGoBlue ok i will delete the app and try again. When you say recompile, you mean click build before you run the simulator again after adding the file to BT docs folder? What do you mean when you say copied the file to BT docs outside of xcode? Regards Lloyd
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 07:01 PM (12 years ago)
@MGoBlue I deleted the app from the simulator and recompiled it. I got the same issue. I really have no clue what could be causing it to not download the file Regards Lloyd
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/13/13 08:34 PM (12 years ago)
I put a quick tip up on my website about adding files to xcode. This may answer that question. http://jc-evans.com/blog/2013/02/13/quick-tip-adding-files-xcode-project/ Not sure what else could be the issue. I'd be happy to look at it, if you would like. You can zip your source code and email me jeff [at] jc-evans.com
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/13/13 09:05 PM (12 years ago)
Also, take a look at what's showing up in the debug console at the time that the opening of the document fails. @David has included tons of debugging messages, and the answer could be there. I might be as simple as the filename you are using (like, don't have any spaces or special characters in it), or something else as equally simple! Mark
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/13/13 09:06 PM (12 years ago)
Yep, Mark makes a great point. You can learn a lot from the debug console.
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 09:45 PM (12 years ago)
@MGoBlue @GoNorthWest thanks guys I have been looking through the debug console and came up with the following: 2013-02-14 14:33:26.578 cruiseguide[15224:c07] BT_fileManager: File does not exist in Xcode bundle: wordtest.doc 2013-02-14 14:33:26.578 cruiseguide[15224:c07] BT_fileManager: File does not exist in cached directory: wordtest.doc I also followed your tip on your website @MGoBlue to make sure that the wordtest.doc file is in the correct BT_Docs file. Does that code from the debug console indicate what it could be? Kind regards Lloyd
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/13/13 10:00 PM (12 years ago)
Hi Lloyd, Basically, Xcode is saying it can't find the file, wordtest.doc, either in the app package nor in the device's cache. So, there are a few things you should check: * Since the app thinks the file is named wordtest.doc (that's what the JSON says), make sure the file in your BT_Docs folder is actually named that. * Ensure that the file actually exists in the BT_Docs folder on your hard drive. * Ensure that the file actually exists in Xcode as well If you think all is well, both @MGoBlue and I are happy to check out your source code. Just zip up the folders, including the file in BT_Docs, and send it on around. You can reach me at MrkFleming at gmail dot com Mark
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/13/13 10:07 PM (12 years ago)
Hey Lloyd, Take a look at this screen shot. https://dl.dropbox.com/u/76141353/Screen%20Shot%202013-02-13%20at%209.05.25%20PM.png Did you get a message like this when you copied your file into xcode?
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 10:18 PM (12 years ago)
Hi @MGoBlue Yes I got a message like that. A couple of screen shots are below: Here is the error message I am constantly getting: https://www.dropbox.com/lightbox/home/Photos%3AImages Here is an image of my file in the BT Docs File: https://www.dropbox.com/lightbox/home/Photos%3AImages Regards Lloyd
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/13/13 10:21 PM (12 years ago)
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
02/14/13 12:44 AM (12 years ago)
Update : Lloyd and I worked on this tonight via TeamViewer, after I ran his code through my Xcode and it worked. Turns out he was doing everything correctly, but Xcode didn't include the file in the list of things to copy over to the device when the app ran. Not sure why that happened, as it's never happened to me, and I moved the file to Xcode the exact same way I did it on my system where it worked! But, he know knows how to check for this condition, and is all set to go! Mark
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/14/13 12:46 AM (12 years ago)
Good on ya, Mark! Always rocking! :) Cheers! -- Smug
 
Highveld
Aspiring developer
Profile
Posts: 25
Reg: Feb 03, 2013
Brisbane
3,500
like
02/14/13 12:52 AM (12 years ago)
Thanks again Mark and to everyone who responded to my problem. Really appreciate it Kind regards Lloyd
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/14/13 06:23 AM (12 years ago)
Excellent Mark.
 

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.