سؤال

I have done a fair amount of searching, and have decided that I must be an idiot.

I am currently building out a Newsstand app which will pull PDFs from a server, however, having subscribed to a Newsstand app, I know for a fact that these magazines are for more complex than a PDF. My question is, how the hell are these custom magazines (with videos and pannable pictures) actually built, and what would I have to do to be able to pull them from a server?

I don't even know what file type these custom magazines are, and from everything that I've read, it seems to be assumed that I would just know.

Please help me out, I am utterly confused.

هل كانت مفيدة؟

المحلول

The newsstand apis aren't concerned about the format of your magazine or newspaper. Newsstand simply manages the 'NKAssetDownloads' and subscriptions. Apple recommend that any assets you have should be bundled up into one single piece of downloadable content, although the newsstand api does allow you to download multiple assets if you wish (really complicates things though, so I recommend you don't do that!) http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/NKAssetDownload_Class/NKAssetDownload/NKAssetDownload.html#//apple_ref/occ/cl/NKAssetDownload

Instead what you should do is package all of your magazine pages, videos, images etc into one zip file, which you download as an NKAssetDownload. Once this completes you can unzip it (you can allow newsstand do decide where to stick it all) and then do whatever you like with it in your app. If you have images you can display them in image views, html pages can be displayed in webviews etc. It depends what format your magazine is in.

How the actual magazine is made before it reaches your app is a different matter. For the app I work on the newspaper company provides us with a bunch of pdf pages which we then display in the app with some custom drawing and effects. They also provide us with some plain text pages and coordinate information so we can do other funky stuff.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top