4.3.0 • Published 20 days ago

@rokt/cordova-plugin-roktsdk v4.3.0

Weekly downloads
-
License
Copyright 2020 Ro...
Repository
github
Last release
20 days ago

Overview

The Rokt Cordova SDK enables you to integrate Rokt into your Cordova mobile apps to drive more value from—and for—your customers. The SDK is built to be lightweight, secure, and simple to integrate and maintain, resulting in minimal lift for your engineering team.

The Rokt Cordova SDK can be used by Rokt partners to display overlay placements, or by Rokt advertisers to record conversions for campaigns.

Resident Experts

  • Emmanuel Tugado - emmanuel.tugado@rokt.com
  • Sahil Suri - sahil.suri@rokt.com
  • Danial Motahari - danial.motahari@rokt.com

Integration Guide

To add this SDK in your application, go to the root of your project via Terminal and add run the command:

$ cordova plugin add @rokt/cordova-plugin-roktsdk

Usage

The Rokt SDK provides two methods:

  1. initialize(String ROKT_TAG_ID, String AppVersion)
  2. execute(String ViewName, Object UserAttributes, Function successCallback, Function errorCallback)

We recommend calling initialize at the start of your application

// 1) Replace the integration test tag ID (222) with your unique Rokt Tag ID
// 2) Replace 1.0.0 with the application version
RoktSDK.initialize(
    "222",
    "1.0.0",
    function(msg) {
        console.log(msg);
    },
    function(err) {
        console.log(err);
    }
);

Followed by execute to show your placement. successCallback returns a message parameter that allows you to track SDK events

RoktSDK.execute(
    "my_view_name",
    {
        "email" : "j.smith@example.com",
        "firstname": "Ginger",
        "lastname": "Smith",
        "mobile": "(555)867-5309",
        "postcode": "90210",
        "country": "US"
    },
    function(msg) {
        console.log(msg);

        // msg can be any of these
        // 1. onLoad - your placement loads
        // 2. onUnload - your placement unloads
        // 3. onShouldHideLoadingIndicator - hook to show a loading indicator
        // 4. onShouldShowLoadingIndicator - hook to hide a loading indicator
    },
    function(err) {
        console.log(err);
    }
);

Project structure

This project consists of sdk which contains www] which is the main entry for the sdk, android, iOS platform specific code for the sdk.

What are the branches?

There is one main branch with release- prefix. This branch is where all development branches are merged into. Publishing the SDK is possible with release- prefix branches only.

Update Rokt Native SDK

To update the iOS rokt sdk, make the following changes.

    update <framework src="Rokt-Widget" type="podspec" spec="~> X.X.X" />

For Android, do the folliwing

   update implementation "com.rokt:roktsdk:X.X.X"

Update Rokt Cordova SDK

To update the cordova SDK before the release, make the following changes.

    update version X.X.X

Local Testing

Local Testing can be done with the sister repo: rokt-sdk-cordova-demo Make sure the two repositories are loaded in the same parent directory. See rokt-sdk-cordova-demo README for further instructions

License

Copyright 2020 Rokt Pte Ltd

Licensed under the Rokt Software Development Kit (SDK) Terms of Use Version 2.0 (the "License");

You may not use this file except in compliance with the License.

4.3.0

20 days ago

4.2.2

2 months ago

4.2.1

2 months ago

4.1.1

2 months ago

4.2.0

2 months ago

4.2.0-alpha.2

2 months ago

4.2.0-alpha.1

2 months ago

4.1.0

3 months ago

4.1.0-beta.9

3 months ago

4.1.0-beta.8

3 months ago

4.1.0-beta.7

3 months ago

4.1.0-beta.6

4 months ago

4.1.0-beta.5

4 months ago

4.0.0-alpha.5

4 months ago

4.0.0-alpha.4

4 months ago

3.17.0

5 months ago

3.15.3-alpha.2

8 months ago

4.0.0-alpha.3

10 months ago

3.15.4

9 months ago

3.15.5

9 months ago

3.13.0

1 year ago

3.15.0

11 months ago

3.14.1

12 months ago

3.14.0

12 months ago

3.14.2

11 months ago

3.11.0

1 year ago

3.10.1

1 year ago

3.12.1

1 year ago

3.12.0

1 year ago

3.12.0-alpha.0

1 year ago

3.10.0

1 year ago

3.10.0-alpha.1

1 year ago

3.9.0-alpha.4

1 year ago

3.9.0-alpha.3

1 year ago

3.9.0-alpha.2

1 year ago

3.9.0-alpha.1

1 year ago

3.9.0

1 year ago