Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 9    Views: 54

Graham90978
Aspiring developer
Profile
Posts: 23
Reg: Jul 31, 2014
Dublin
230
11/20/15 03:05 PM (9 years ago)

Problem loading the PDF plugin

Hi Guys My app got rejected because it apparently cannot load a pdf that I have hosted on a storage website. The developers said that it simply didn't load the pdf for iOS 9.1. I figured this was down to a http vs https bug, so I made sure the link was https. However, now it has the following error code: iOS error code:-1100 iOS error message: the requested URL was not found on this server Does anyone know whats causing this and how to fix it? It appears to be an iOS 9.1 problem. Can anyone please help me with this, I'm literally at my wits end. I can't seem to replicate the bug on my device either, with both the iPhone simulator and when it is exported into iTunes as an ad-hoc ipa file and put on an actual device
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
11/20/15 08:33 PM (9 years ago)
Could you narrate your issue a little differently? I'd like to try and help, but I'm confused with what actually is going on, other than the error code. and what the error code is saying, is that it cannot find the file. Check to make sure the file actually exists there. Cheers! -- Smug
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/21/15 02:52 AM (9 years ago)
I suspect this could be something to do with IOS 9 security https://www.buzztouch.com/forum/thread.php?tid=C6A4E117AB31DE0E4131D9E Questions that spring to mind that might help deduce the answer are:- What happens if you move the PDF into your buzztouch control panel documents folder? Are you self hosted? Does the https link resolve in a browser on your actual device? What version of IOS are you testing with and can you confirm it was OK for 8.x? Alan
 
Graham90978
Aspiring developer
Profile
Posts: 23
Reg: Jul 31, 2014
Dublin
230
like
11/21/15 04:27 AM (9 years ago)
Thanks for the replies I know its tricky to understand whats going on. Essentially, I have a pdf file that is hosted on a dropbox-stye website (Keep and share) and every day I will upload a new pdf file to the same URL. The PDF plugin will link to this site and display the pdf through the app. I have uploaded the file to the website, and clicking on the link in a browser works, it displays the pdf. I also tried using a proxy site to view the website to make sure it wasn’t a ‘country-specific’ thing, where only members of a particular country could access the pdf. So the file definitely exists there. I put together the app in buzztouch and downloaded it. It works in the iOS simulator for any device and any iOS. That is, the simulator accesses the pdf and displays it. So I figured that it works and does what it is supposed to do. In Xcode, I also archived the app, and exported it as an ipa file that should run on any device. I put this ipa in iTunes and onto my phone (iPhone 5S, iOS 9.1). The pdf loads and works. Ive also tried it this way on an iPad and an iPhone 6s. I also tried on iOS 8 too. They all work and display the pdf as they should. No error messages, alls seemed good. So I uploaded it for testing but the binary got rejected, saying the tester could not get the pdf to load. No other info from the tester, just that it didn’t load. No error codes either. I discovered that the link to the URL was http not https, so I figured thats why it didn’t work (duh! Such a fool) so I fixed that and resubmitted the app. It got rejected again, this time they sent me a screen shot of the loading screen that displays while the pdf is loading through the plugin, and it displays the message “iOS error code:-1100 iOS error message: the requested URL was not found on this server” Still no error codes or description from the tester other than “it didn’t load”. So my problem is that I cannot recreate the bug they are experiencing on any device I try or even the simulator. I have no idea where the problem is or what can be done to fix it. Presumably its a security issue for iOS 9/9.1 but I have no idea where the problem is in my code! Could it be the host website security certificates or something? Im really new to this stuff, but I can’t figure out why it works on everything for me but not for the tester This is frustrating me so much because Im not even 100% certain what the bug is :/
 
Graham90978
Aspiring developer
Profile
Posts: 23
Reg: Jul 31, 2014
Dublin
230
like
11/21/15 05:05 AM (9 years ago)
Has anyone any ideas, I don't know where the problem lies :/
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/21/15 06:20 AM (9 years ago)
It sounds as if there is something about your set-up that allows the connection to work from your set-up, but something about the testers environment that does not. Could it be location? It is really tricky if you cannot reproduce the problem. If you want to try distributing the app to a beta tester or two via Test Flight, that would give you a wider pool of testers. That might give you a perspective on where the problem is. I'm happy to volunteer if it helps. The http/https setting should not in itself be an issue; I think you can work around that by setting up an entry in your app plist to explicitly for IOS 9 to allow an http url to be used, I read this somewhere else in the forum recently. Another approach is to try changing the location of the PDF. If your have the app on the BuzzTouch hosted control panel and the PDF is stored there, I think that would sidestep any 'not found' issues. Although this may not be your preferred option, it might be a start. Cheers, Alan
 
Graham90978
Aspiring developer
Profile
Posts: 23
Reg: Jul 31, 2014
Dublin
230
like
11/21/15 10:06 AM (9 years ago)
I wouldn't mind if you would volunteer to test it? The reason I chose a pdf hosting website was that I would change the pdf file daily, but need the URL to stay the same for the app. Do you know if buzz touch can do this?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/21/15 02:36 PM (9 years ago)
in the CP there is an area for files/media. you can upload a pdf to the documents area and refer to it as a url. All you would need to do is upload a new version of the pdf each day. My theory is that if you reference a url on the buzztouch server, the relevant certificates and security protocols would be in place for a buzztouch app hosted there. Just a theory, but I think it is worth testing and should not take too much effort. I'm happy to test. Send me a direct message, I will be happy to give you an email address to use with Test Flight. Cheers, Alan
 
Graham90978
Aspiring developer
Profile
Posts: 23
Reg: Jul 31, 2014
Dublin
230
like
11/21/15 06:07 PM (9 years ago)
Cool, Ill try the pdf thing first and then message you about being a tester. I have a test pdf in the file manager for the app in my control panel. I have file “test.pdf” in the documents folder. Clicking it gives a long url such as “https://www.buzztouch.com/applications0630…” do you mean this url? If I upload a new pdf, would it be possible to reuse this pdf or would I have to overwrite the pdf by uploading the next one with the same name? Thanks for all the help Alex!
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
11/22/15 02:46 AM (9 years ago)
Yep, that is the URL. When you want to upload a new pdf, the control panel recognises if you already have a file of the same name. Therefore, if you want to keep the same name for the pdf, you have to delete the old pdf first.
 

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.