Custom plugin comScore cordova setting up in Ionic

Hi everyone,

I am trying to add a custom plugin, the name of it is comScore is a payed plugin that someone required me to add to his ionic app.

The following instructions are for Cordova:
You will need to install the comScore Cordova plugin via a terminal.

  1. First, extract the provided archive and take note of the path to the extracted contents in your development environment.
  2. Via the terminal, assuming that the current working directory is the top folder of your Cordova project, run the following command using the path to the extracted archive contents:
    $ cordova plugin add path_to_extracted_plugin_archive/comScoreCordova/
    The comScore plugin needs networking access to be allowed through the device sandbox.
  3. Add these tags to the project config.xml file to white-list the URLs that the comScore plugin will use for transmitting data to comScore.
    <access origin="*://*.scorecardresearch.com" subdomains="true" />
    At this point the comScore plugin should be available in your project, which means you will be able to use the Application Tag API in the JavaScript code of your Cordova project.

I have managed to add the plugin and I have it in my plugin folder, the thing is that now I am not able to access it, I am trying to do it like this:
(<any>window).plugins.ns_.setAppContext();

Here we have the plugin.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
    xmlns:rim="http://www.blackberry.com/ns/widgets"
    xmlns:android="http://schemas.android.com/apk/res/android"
    id="com.comscore.cordova"
    version="1.1.4">
    <name>comScore</name>
    <description>comScore Cordova plugin</description>
    <license>Copyright (c) 2015 comScore, Inc.</license>
    <keywords>cordova,comScore</keywords>

    <!-- Important to let measurement leave -->
    <dependency id="cordova-plugin-whitelist"/>

    <js-module src="www/comscore.cordova.js" name="ComScore">
        <clobbers target="ns_" />
    </js-module>

    <js-module src="www/comscore.streaming.js" name="StreamSense">
    </js-module>

    <!-- android -->
    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="ComScore" >
                <param name="android-package" value="com.comscore.cordova.ComScore"/>
            </feature>
        </config-file>

        <config-file target="AndroidManifest.xml" parent="/manifest">
            <uses-permission android:name="android.permission.INTERNET" />
            <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
        </config-file>

        <source-file src="libs/android/comScore.cordova.android.jar" target-dir="libs" framework="true" />
    </platform>
    
    <!-- ios -->
    <platform name="ios">
        <config-file target="config.xml" parent="/*">
            <feature name="ComScore">
                <param name="ios-package" value="SCORComScore"/>
            </feature>
        </config-file>

        <source-file src="src/ios/SCORComScore.m" />
        <header-file src="src/ios/SCORComScore.h" />
        <header-file src="src/ios/SCORHelper.h" />

        <source-file src="libs/ios/comscore-cordova.a" target-dir="libs" framework="true" />

    </platform>

    <!-- windows -->
    <platform name="windows">
        <framework src="libs/win81rt/anycpu/ComScore.cordova.winmd" custom="true" versions="8.1" target-dir="lib/win81rt/" />
        <framework src="libs/win10/anycpu/ComScore.cordova.winmd" custom="true" versions="10" target-dir="lib/win10" />
    </platform>
</plugin>

The error thrown is always: Uncaught TypeError: Cannot read property ‘ns_’ of undefined