Latest 0.1.0
Homepage https://github.com/MediaHound/HNDAppUpdateManager
License Apache
Platforms ios 7.0, requires ARC
Dependencies AFNetworking, Avenue
Authors

[![CI Status](http://img.shields.io/travis/Dustin Bachrach/HNDAppUpdateManager.svg?style=flat)](https://travis-ci.org/Dustin Bachrach/HNDAppUpdateManager)
Version
License
Platform

What is HNDAppUpdateManager

HNDAppUpdateManager lets you easily add app update checking to your iOS apps. It supports App Store or Enterprise distribution.

Installation

HNDAppUpdateManager is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "HNDAppUpdateManager"

version.json

The App Update Manager requests a version JSON file, which you host on your server. The JSON file contains 3 fields:

Field Description Example
latestVersion A full version string including build number. "1.2.0.50"
updateUrl A URL which will initiate update. Can be an enterprise itms-services URL or an app store link "itms-services://?action=download-manifest&url=https://myapp.com/app.plist"
requireUpdateBefore (Optional) A full version string that indicates when an update is required. Any version before this version will be required. "1.1.5.0"

Here is an example JSON file:

{ 
    "latestVersion": "1.2.0.50",
    "updateUrl": "itms-services://?action=download-manifest&url=https://myapp.com/app.plist",
    "requireUpdateBefore": "1.1.5.0"
}

Fastlane integration

If you use Fastlane for s3 Enterprise distrubution, you already get a version.json generated for you automatically.

Checking for updates

You can then easily check for updates from inside your AppDelegate or wherever you choose:

NSURL* versionURL = [NSURL URLWithString:@"http://myapp.com/version.json"];
HNDAppUpdateManager* updateManager = [[HNDAppUpdateManager alloc] initWithVersionURL:versionURL];
updateManager.delegate = self;
[updateManager checkForUpdate];
- (void)appUpdateManager:(HNDAppUpdateManager*)manager
 promptForUpdateForcibly:(BOOL)forced 
             updateBlock:(void(^)())updateBlock {
    if (forced) {
        // Show an alert and then call updateBlock()
    }
    else {
        // Ask the user if they want to update.
        // If they do, call updateBlock()
    }
}

Author

Dustin Bachrach, [email protected]

License

HNDAppUpdateManager is available under the Apache License 2.0. See the LICENSE file for more info.

Latest podspec

{
    "name": "HNDAppUpdateManager",
    "version": "0.1.0",
    "summary": "HNDAppUpdateManager",
    "homepage": "https://github.com/MediaHound/HNDAppUpdateManager",
    "license": "Apache",
    "authors": {
        "Dustin Bachrach": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MediaHound/HNDAppUpdateManager.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Classes/**/*.{h,m}",
    "dependencies": {
        "AFNetworking": [],
        "Avenue": []
    }
}

Pin It on Pinterest

Share This