LuckyKat / cordova-plugin-inappstore

Cordova plugin for displaying the app store within a web app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cordova-plugin-inappstore

Plugin for displaying an embedded App Store within the wep app.

Prerequisites: A Cordova/PhoneGap 3.5+ project for iOS.

Index

  1. Description
  2. Installation
  3. Usage
  4. Example

##Description

The InApp Store plugin enables to instantiate a store right from your web app.

##Installation

To install this plugin, follow the Command-line Interface Guide.

This plugin follows the Cordova 3.0 plugin spec, so it can be installed through the Cordova CLI in your existing Cordova project:

cordova plugin add https://github.com/Creative-Licence-Digital/cordova-plugin-inappstore.git

##Usage

Pass the app store id as parameter of the open method. The open method preloads the InAppStore view. The success callback will be called when preloaded. Call the show method after this.

open: function (appStoreId, success, fail),
show: function ()

##Example

  • params
  • appStoreId - the id of the app you want to target on the AppStore
  • success - success callback function
  • failure - error/fail callback function
window.plugins.inappstore.open('123456789', function () {
    // success
    window.plugins.inappstore.show();
}, function () {
    // fail
    alert("Could not open App Store!");
});

About

Cordova plugin for displaying the app store within a web app

License:MIT License


Languages

Language:Objective-C 92.6%Language:JavaScript 7.4%