Search code examples
iosnewsstand-kit

Why do I need to add NKIssue's to the NKLibrary instead of managing by my own?


Adding issues to the NKLibrary via addIssueWithName:date: at least allows for downloading issue assets in the background.

But I do not see any other advantage. Why can't the app manage its issues by itself?

What is the benefit of marking an issue as being currently read via NKLibrary currentlyReadingIssue?


Solution

  • The reason why you might want to do this is that Newsstand-Kit also manages the storage of your NKIssues. This means that as free memory on the device gets smaller, Newsstand will automatically start purging your old issues. Quoting from the documentation regarding thecurrentlyReadingIssue:

    When you ascertain what issue the user is currently reading, you should set this property to the corresponding NKIssue instance. Newsstand Kit takes this setting into consideration when it purges back issues because of low levels of available flash storage.

    So to answer your question, you don't need to use newsstand at all. Just like all of the iOS frameworks you are welcome to roll your own implementation to almost anything on iOS. Newsstand is really just a framework that removes most of the boilerplate you will need to implement an "issue" type framework thats most common in newspapers or magazines.