npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

io.mave.plugins.mave

v0.7.7

Published

A plugin for the Mave Growth SDK

Downloads

71

Readme

cordova-mave-plugin

Cordova/PhoneGap plugin for the Mave iOS SDK

Installation

This plugin is available through the Cordova Plugin Registry. To Install the plugin, execute the following command in your app's project directory:

cordova plugin add io.mave.plugins.mave

Using the plugin

Take a look at the docs for details on how the SDK works. Below you'll find the javascript functions that correspond to the SDK methods in the docs.

Setting up the SDK on launch

When your app is launched, you should initialize the library like this:

var applicationId = '<YOUR_APPLICATION_ID>';
mave.setupSharedInstanceWithApplicationID(applicationId);

Identifying your user

There are two ways to identify a user. You can identify a logged in user:

var userData = {
  userID: '123', // Only userID and firstName are required
  firstName: 'John',
  lastName: 'Doe',
  email: '[email protected]',
  phone: '888-555-1234'
};
mave.identifyUser(userData,
                  function () {console.log('identifyUser success!')}, // success callback (optional)
                  function (e) {console.log('identifyUser error: ' + e)}); //error callback (optional)

Or you can identify an anonymous user:

mave.identifyAnonymousUser(
  function () {console.log('identifyAnonymousUser success!')}, // success callback (optional)
  function (e) {console.log('identifyAnonymousUser error: ' + e)}); //error callback (optional)

Displaying the invite page

Once the user is identified, you can display the invite page modal like this:

mave.presentInvitePageModally();

You can pass in a callback to presentInvitePageModally to get number of invites sent after the modal is dismissed, like this:

mave.presentInvitePageModally(function(data) {
  console.log('Successfully sent ' + data.numberOfInvitesSent + ' invites!');
});

Tracking signups

When you get a new signup, first identify the user then call

mave.trackSignup(
  successCallback, // optional
  errorCallback // optional
);

Getting the referring data

When you get a new app launch, you can get get the data on the user who sent the referral, and who the current user is. Just pass in a callback that accepts a referringData object. If no referring data is found, an empty object is passed to the callback.

mave.getReferringData(function (referringData) {
  console.log('Referring User ID: ' + referringData.referringUserID);
  console.log('Referring User first name: ' + referringData.referringUserFirstName);
  console.log('Referring User last name: ' + referringData.referringUserLastName);
  console.log('Referring User email: ' + referringData.referringUserEmail);
  console.log('Referring User phone: ' + referringData.referringUserPhone);
  console.log('Current User phone: ' + referringData.currentUserPhone);
  var customData = referringData.customData;
});

Links & Attribution

See http://mave.io/docs/customization/#links--attribution for more details on customizing the invite link destination. You can set the two custom invite link destination variables (inviteLinkDestinationURL and wrapInviteLink) in two ways.

  1. Pass them into identifyUser as part of the userData object:
var userData = {
  userID: '123',
  firstName: 'John',
  inviteLinkDestinationURL: 'www.example.com',
  wrapInviteLink: false // false will turn wrapping off and send the raw inviteLinkDestinationURL in the SMS invite.
};
mave.identifyUser(userData);
  1. Any time after identifying the user, call setInviteLinkDestinationURL:
mave.setInviteLinkDestinationURL('www.example.com', false); // The second argument is `wrapInviteLink` and will default to true.

Configuration

See http://mave.io/docs/customization/ for more details on what can be customized. To customize the invite page through this plugin, all you need to do is call setDisplayOptions on an object containing the configuration variables you would like to overwrite. This should be called before the invite page is presented. All options are optional and do not need to be specified if you want to use the default value. Full example:

    var displayOptions = {
      navigationBarTitleCopy: 'Invite Your Friends',
      navigationBarTitleTextColor: '#000000', // If a color is specified, it must be in this hex value form
      navigationBarBackgroundColor: '#DDDDDD',
      navigationBarCancelButtonTitle: 'Cancel',
      navigationBarCancelButtonTintColor: '#999999',

      inviteExplanationTextColor: '#FFFFFF',
      inviteExplanationCellBackgroundColor: '#009999',
      inviteExplanationShareButtonsColor: '#990000',
      inviteExplanationShareButtonsBackgroundColor: '#009999',

      searchBarPlaceholderTextColor: '#DDDDDD',
      searchBarSearchTextColor: '#000000',
      searchBarBackgroundColor: '#FFFFFF',
      searchBarTopBorderColor: '#FFFFFF',

      contactNameTextColor: '#000000',
      contactDetailsTextColor: '#DDDDDD',
      contactSeparatorColor: '#000000',
      contactCellBackgroundColor: '#FFFFFF',
      contactCheckmarkColor: '#990000',
      contactSectionHeaderTextColor: '#000000',
      contactSectionHeaderBackgroundColor: '#FFFFFF',
      contactSectionIndexColor: '#000000',
      contactSectionIndexBackgroundColor: '#FFFFFF',

      contactInlineSendButtonTextColor: '#990000',
      contactInlineSendButtonDisabledTextColor: '#DDDDDD',

      messageFieldTextColor: '#000000',
      messageFieldBackgroundColor: '#FFFFFF',

      sendButtonCopy: 'Send',
      sendButtonTextColor: '#990000',

      bottomViewBorderColor: '#000000',
      bottomViewBackgroundColor: '#FFFFFF',

      sharePageBackgroundColor: '#009999',
      sharePageIconColor: '#990000',
      sharePageIconTextColor: '#990000',
      sharePageExplanationTextColor: '#FFFFFF'
    };

    mave.setDisplayOptions(displayOptions);

Author

© Mave Technologies 2015

[email protected]

License

This SDK is released under a proprietary license, to use it in your released application you need to be using the Mave platform (sign up for our beta at app.mave.io/beta/signup). See the LICENSE file.