iOS magazine publishing solution

The customer was in a need of software for iPhone and iPad which would allow distribution and viewing of free and paid interactive magazines. It had to be a shell for automatic downloading of magazines and viewing them. Very much effort was put into design and development of user interface because the shell itself needed to be really attractive for the end users and provide the best user experience. Transitions between screens had to be animated. Scrolling between magazine pages had to be very smooth and with high level of control by end users. Magazine pages support horizontal, vertical and dual view with smooth animated transitions between view modes.

Solution

The implemented application requests the list of available magazines from the server-side implemented in PHP and displays scrollable list of magazine cover thumbnails along with magazine names and prices. Free magazines are available for download immediately while paid magazines should be purchased via standard In-App Purchase mechanism provided by Apple. Once a paid magazine is purchased, it becomes available for download. It is not mandatory to download purchased magazines immediately. Users can do it any time later. Once downloaded the magazine is stored on the device in an encrypted protected form and can be viewed offline. Magazines can be grouped into series with ability to subscribe to them. When a new magazine in a series is issued, users are notified about it via Push Notifications mechanism which is also used to confirm purchase of a magazine.

Magazines can contain the following elements: images, videos, PDF documents, HTML pages, links to internet pages and news feeds. Overlays can be added to images to make magazines even more interactive meaning that clicking certain area of a magazine page can open another image gallery, play video, open article in PDF format or navigate to external web page within the application. External web links are opened not in iOS native browser which means the application won’t close while browsing web. When opening a page containing overlaps, they are shown for several seconds and then smoothly fade off to indicate their presence, but still allow viewing the entire page without obstacles. Long tap on the screen shows overlays again and subsequent long tap hides them. Lower part of the screen contains small scrollable pane with small thumbnails of magazine pages allowing quick navigation to any of the page without the need to scroll to it page-by-page. This pane can be shown and hidden similar to overlays. Rotating the device automatically changes page orientation. Magazine pages are smoothly turned over using swipe gestures.

Development of the solution had a good few technical challenges mostly because of limitations and specifics of the target platform and application specifics. Here are the most noticeable ones:

  • If internet connection breaks during magazine download, the download should resume when internet connection restores.
  • Since the application is made mostly for entertainment purpose, all element fades in/out should be animated and smooth, which requires fine-tuning.
  • Switching between application screens and orientation changes should also be animated and smooth.
  • Magazine data should be encrypted in the database because it is not free as using jailbroken devices gives access to all data in iOS.
  • Images used as magazine pages should have high resolution and use lossless compression format (PNG).
  • As result, images located “near each other” in magazines should be pre-loaded into memory in advance to allow smooth transitions between them and smooth device rotation. This is because of the need to decrypt and decode images of big size as these operations are CPU intensive while iOS devices have relatively weak CPUs compared to desktops.
  • Pre-loading images to memory generates another technical complication – memory in iOS is very limited and exceeding it would crash the application so smart memory monitoring was added to limit or even disable image pre-loading when free memory is about to be exhausted.

From technical perspective each magazine is an encrypted ZIP archive with magazine contents (images, videos, HTMLs, PDFs) and XML file describing how these elements should be organized in the magazine. Information about available magazines, their names, costs and thumbnails is also passed in a form of XML. Communication with the back-end is organized in a form of JSON-encoded requests and responses over SSL. Magazines and XML describing magazines are all stored in a password-protected storage accessible via HTTPS. On devices magazines are saved to SQLite database encrypted using SQLcipher library.

Tools & Technologies

  • Objective-C, Xcode, iOS SDK, Push Notifications, In-App Purchase, XML, JSON, SQLite, SQLcipher.

Benefits

Cost-effective outsource team of IT professionals managed to overcome all technical challenges of the project and implemented high quality product which is now sold as SAAS solution at http://monx.mobi/nl/ and serves as a solution for creation of custom magazines and magazine presentation shells.