New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

nativescript-launchkit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-launchkit

Integrate native launchkit iOS widgets into NativeScript

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

Nativescript LaunchKitSDK Wrapper

#Setup LaunchKit Account#

Live Demo

Preview

Setup

Add this in your app.js

if (application.ios) {
    var __extends = this.__extends || function (d, b) {
        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
        function __() { this.constructor = d; }
        __.prototype = b.prototype;
        d.prototype = new __();
    };
    
    var appDelegate = (function (_super) {
        __extends(appDelegate, _super);
        function appDelegate() {
            _super.apply(this, arguments);
        }
        
        appDelegate.prototype.applicationDidFinishLaunchingWithOptions = function (app, launchOptions) {
            launchkit.initalize({
                token: "OjMwhQZ5WgFFNZAQVBOYtWtAcXv1Kw2inxkzPEx_j6sK" 
            });
        };
        
        appDelegate.ObjCProtocols = [UIApplicationDelegate];
        return appDelegate;
    })(UIResponder);
    application.ios.delegate = appDelegate;
}

API

var launchkit = require("nativescript-launchkit");
launchkit.initalize({
    token: "",  //From https://launchkit.io/sdk/install/,
    debug: false //tells all methods that have debug flags to use them
});

isSuperUser: Returns bool

launchkit.isSuperUser();

setUser

launchkit.setUser({
    id: "someid",
    name: "steve",
    email: "steve@launchkitsdk.com"
});

showOnboarding: Returns Promise (args: args)

launchkit.showOnboarding();

Onboarding needs to be called from a view, will fail in app.js due to there being no UIWindow yet

showReleaseNotes: Returns Promise (args: didPresent)

launchkit.showAppReviewCard({
    page: page //args.object from your onNavigatingTo, or onPageLoaded events
});

showAppReviewCard: Returns Promise (args: didPresent, flowResult)

launchkit.showAppReviewCard({
    page: page //args.object from your onNavigatingTo, or onPageLoaded events
});

Note: Unofficial plugin just wrapping the official iOS SDK

Keywords

NativeScript

FAQs

Package last updated on 11 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts