Inherits from NSObject
Declared in ADMRepo.h

Overview

ADMRepo allows the user to synchronously or asynchronously download versioned assets over the air. It uses the repository ID to form a manifest that holds the repository’s makeup and it downloads the file specified by the source URL.

Versioned assets are gzipped tarballs that have a version suffix to their name that corresponds to the current version found in the manifest JSON file. The remote server is responsible for properly configuring the manifest file and delivering the latest manifest file that corresponds to the existing tarballs in the remote asset repository. The tarballs can be archived using tar’s CLI tar -cvf files-1.tar.gz files/.

Automatic Content Loading

The user can create as many instances of ADMRepo as they prefer while specifying unique repository IDs. The user can choose whether or not to wait on the assets to download or let them operate on a background thread.

Tasks

Initializers

Updating Repo Contents

  • – update

    Attempts to update the local repository in the iOS device to match the remote server configuration.

Accessing Repo Contents

Accessing the Delegate

Accessing Repo Attributes

  •   repositoryId

    The name of the repository parent directory for all encompassing bundles.

    property
  •   sourceURL

    The remote source URL used to download the manifest files and tarballs if the cdnURL is not set.

    property
  •   cdnURL

    An optional CDN URL can be set to download the tarballs using this remote server address instead of the sourceURL. This is useful to separate the index.json manifest cache from the tarball caches when using a CDN.

    property
  •   operationQueue

    The operation queue which manages operations enqueued by the HTTP client.

    property

Properties

cdnURL

An optional CDN URL can be set to download the tarballs using this remote server address instead of the sourceURL. This is useful to separate the index.json manifest cache from the tarball caches when using a CDN.

@property (strong, nonatomic) NSURL *cdnURL

Discussion

An optional CDN URL can be set to download the tarballs using this remote server address instead of the sourceURL. This is useful to separate the index.json manifest cache from the tarball caches when using a CDN.

Declared In

ADMRepo.h

delegate

The receiver’s delegate.

@property (weak, nonatomic) id<ADMRepoDelegate> delegate

Discussion

The receiver’s delegate.

@discussion A ADMRepo delegate responds to messages sent by download operations.

Declared In

ADMRepo.h

operationQueue

The operation queue which manages operations enqueued by the HTTP client.

@property (readonly, nonatomic) NSOperationQueue *operationQueue

Discussion

The operation queue which manages operations enqueued by the HTTP client.

Declared In

ADMRepo.h

repositoryId

The name of the repository parent directory for all encompassing bundles.

@property (strong, nonatomic) NSString *repositoryId

Discussion

The name of the repository parent directory for all encompassing bundles.

Declared In

ADMRepo.h

sourceURL

The remote source URL used to download the manifest files and tarballs if the cdnURL is not set.

@property (strong, nonatomic) NSURL *sourceURL

Discussion

The remote source URL used to download the manifest files and tarballs if the cdnURL is not set.

Declared In

ADMRepo.h

Instance Methods

bundleIds

Returns the list of the bundle IDs from the manifest.

- (NSArray *)bundleIds

Return Value

An array of bundle IDs

Discussion

Returns the list of the bundle IDs from the manifest.

Declared In

ADMRepo.h

initWithSourceURL:repoId:

Initializes an ADMRepo object with the specified source URL and repository ID.

- (id)initWithSourceURL:(NSURL *)url repoId:(NSString *)repositoryId

Parameters

url

The remote source URL to download the manifest and asset tarballs. This argument must not be nil.

repositoryId

The name of the remote repository. This argument must not be nil.

Return Value

The newly-initialized ADMClient or nil

Discussion

Initializes an ADMRepo object with the specified source URL and repository ID.

This is the designated initializer.

Declared In

ADMRepo.h

manifestDictionary

Returns the index.json manifest file in dictionary format.

- (NSDictionary *)manifestDictionary

Return Value

The dictionary represetnation of the index.json manifest file

Discussion

Returns the index.json manifest file in dictionary format.

Declared In

ADMRepo.h

update

Attempts to update the local repository in the iOS device to match the remote server configuration.

- (void)update

Discussion

Attempts to update the local repository in the iOS device to match the remote server configuration.

It first checks the remote server manifest and checks for discrepencies among the local repository configuration if it exists. It then downloads only the necessary remote tarballs and extracts the archive in the Documents directory for bundle access.

Declared In

ADMRepo.h