0
votes

Prerequisites

Check all boxes if you have done the following: - [x] Checked that your issue isn't already filed: https://github.com/tripflex/wifiwizard2/issues - [x] Make sure you fill out the Issue Type below

Issue type

Select all that apply - [x] Bug - [ ] Enhancement - [ ] Task - [x] Question - [ ] Other

Description

I'm using ionic framework. When I want to install the wifiwizard2 plugin I get no errors but i'm not able to use the plugin. The wifiwizard is added to my config and package.json file but I can't find the import in my module.ts file. Thanks in advance.

Steps to Reproduce

  1. run sudo cordova plugin add https://github.com/tripflex/wifiwizard2

  2. run sudo npm i cordova-plugin-wifiwizard2 or sudo ionic cordova plugin add cordova-plugin-wifiwizard2

  3. [and so on...]

Expected behavior: Use the plugin

Actual behavior: cannot find import

Reproduces how often: 100%

Versions

Ionic:

ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.1.1 @angular-devkit/build-angular : 0.13.6 @angular-devkit/schematics : 7.2.4 @angular/cli : 7.3.6 @ionic/angular-toolkit : 1.4.0

Cordova:

cordova (Cordova CLI) : 8.1.2 ([email protected]) Cordova Platforms : android 7.1.4 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/nathancriel/Library/Android/sdk) NodeJS : v10.15.1 (/usr/local/bin/node) npm : 6.7.0 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61

Additional Information

config.xml https://github.com/tripflex/wifiwizard2.git" /

package.json dependencies "cordova-plugin-wifiwizard2": "git+https://github.com/tripflex/wifiwizard2.git",

1

1 Answers

0
votes

WifiWizard is available as a global and does not need to be imported. Try this :

declare var WifiWizard2: any;

EDIT I try to use the plugin on my app and it work.

What i do :

cordova plugin add cordova-plugin-wifiwizard2
npm i cordova-plugin-wifiwizard2

On Home.ts :

declare var WifiWizard2: any;

After the platform is ready :

WifiWizard2.getConnectedSSID()

And the method is recognize on build.