Source Development

What should I know before I get started?

NineAnimator is a typical Cocoa Touch iOS application following the Model-View-Controller (MVC) design pattern. There are many resources online for you to learn the MVC design, but in short, you should know the responsibility of each component and keep the additional code at where it should be.

Model: NineAnimator, at its core, is a collection of parsers and analyzers. The Modules/Sourcesopen in new window directory hosts all of the parsing logic and user-configurable.

  • Anime Source: Under the Modules/Sources folder, you'll find the NineAnimatorNativeSourcesopen in new window. Code under this folder fetches data from different source anime websites, decodes it, and present the information to other components of NineAnimator. For each source website, NineAnimator creates a distinct Source class. Source encapsulates the functionalities and capabilities of the anime website.
  • Media Parser: Media Parsers, located under the NineAnimatorNativeParsersopen in new window folder under Modules/Sources, are classes that accept a URL to a streaming site and return a locally streamable URL. Media Parsers are used to support playbacks with native players (and cast). NineAnimator parsers will conform to the VideoProviderParser protocol.

For development of sources, we are only going to touch the Model. More specifically, the NineAnimatorNativeSourcesopen in new window and NineAnimatorNativeParsersopen in new window directories.

Most operations in NineAnimator are performed asynchronously (optionally on a different thread). This also applies to NineAnimatorNativeSourcesopen in new window This ensures that any time consuming or intensive tasks won't block the main thread. Make sure to read NineAnimator's asynchronous framework and styleguides before contributing.

Where do I start?

Developing a source is pretty easy, you only need basic programming knowledge. Some understanding of git may help but is not required.