Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70791

@cordova Uncaught TypeError: Object(...) is not a function

$
0
0

@baviskarmitesh wrote:

I have Created my custom plugin. Created its Wrapper using following steps

  1. Cloned the ionic native wrapper from
    https://github.com/ionic-team/ionic-native/
  2. Installed node modules and @ionic-native/core
  3. Created native wrapper using gulp
    gulp plugin:create -n @ionic-native/HelloWorld
  4. Changed index.ts file plugin information and added my functions to it
    @Plugin({
    pluginName: ‘Mathcalculator’,
    plugin: ‘cordova-plugin-Mathcalculator’, // npm package name, example: cordova-plugin-camera
    pluginRef: ‘Mathcalculator’, // the variable reference to call the plugin, example: navigator.geolocation
    repo: ‘https://github.com/baviskarmitesh/MathCalculator.git’, // the github repository URL for the plugin
    install: ‘’, // OPTIONAL install command, in case the plugin requires variables
    installVariables: , // OPTIONAL the plugin requires variables
    platforms: [‘Android’] // Array of platforms supported, example: [‘Android’, ‘iOS’]
    })
    @Injectable()
    export class Mathcalculator extends IonicNativePlugin {

/**

  • This function does something
  • @param arg1 {string} Some param to configure something
  • @param arg2 {number} Another param to configure something
  • @return {Promise} Returns a promise that resolves when something happens
    */
    @Cordova()
    add(arg1: any): Promise {
    return; // We add return; here to avoid any IDE / Compiler errors
    }

}

Copied this directory into my app

It Is giving me Uncaught TypeError: Object(…) is not a function on the line @cordova

Any suggession. Stuck since last few hours

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70791

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>