• 0

[Xcode] To bundle, or not to bundle... That is the question


Bundle or not?  

4 members have voted

  1. 1. Should I bundle the PDFs with the app?

    • Yes
      3
    • No
      1


Question

I have an iPhone app which loads several PDF files in a UIWebView. Right now, they are hosted on a web server so that they can be updated as needed (without making the user update the app on their phone). This is good because the PDFs may change periodically.

I was wondering whether I should bundle the PDF files with the app, so that the app doesn't require an internet connection. This would increase the size of the app by several MBs, but it would mean that people with an iPod Touch could use the app even when wifi isn't available.

So... Should I bundle the PDFs? Or should I have them download via the web?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Why not just cache them locally the first time they're downloaded? And then use some sort of supplementary file or naming convention on your server to tell you when you need to re-download it or not.

  • Like 1
Link to comment
Share on other sites

  • 0

Why not just cache them locally the first time they're downloaded? And then use some sort of supplementary file or naming convention on your server to tell you when you need to re-download it or not.

Sounds like a good idea. I'll have to figure out how to do this. Since UIWebView is essentially a web browser control (presumably based off of Safari), I wonder if it automatically caches the files/pages that have been loaded? Something to investigate...
Link to comment
Share on other sites

  • 0

A possible solution I came up with is to somehow download each PDF the first time the program is run, and then check on start-up if the PDFs are up-to-date, and notify the user if some need to be updated. Can this be done? Or is there a better way to handle this problem?

Link to comment
Share on other sites

  • 0

why don;t you just check if connection is available - if yes show latest pdfs if not your embeded ones (notify the client there may be updated version, also notify before downloading)

Link to comment
Share on other sites

  • 0

^ So you're saying to go ahead and embed the files in the app? And to also check if a connection is available, and if so, prompt the user to download the most recent version?

Link to comment
Share on other sites

  • 0

Maybe the following will help.

I would recommend making the application as small as possible and only include the base files (the iOS application).

On first launch check to see if an internet connection is available, notify the user of updates and give them the option of downloading them (which would be the PDFs).

You should then be able to cache these locally, maybe just doing a checksum against the local PDFs with those on the server.

If the checksums are different notify the user that there are new PDFs available for download and the amount of PDFs you will be updating. This can probably be done by having an icon show up by the PDF if it is a list type view then enable the user to update them or do as the App Store does and just have a separate tab for PDF updates.

Link to comment
Share on other sites

This topic is now closed to further replies.