Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: Method 'channel:' not defined in Plugin 'NfcPlugin' #363

Closed
davidemorotti opened this issue Apr 16, 2019 · 8 comments
Closed

ERROR: Method 'channel:' not defined in Plugin 'NfcPlugin' #363

davidemorotti opened this issue Apr 16, 2019 · 8 comments
Assignees

Comments

@davidemorotti
Copy link

davidemorotti commented Apr 16, 2019

Hi,

I'm trying to develop an app with an NFC scanning functionality, here is my code:

    if(this.nfc.enabled()) {
      console.log('NFC enabled');
      this.nfc.beginSession((data) => {
        console.log(data)
      }, () => {
        console.log('error');
      })
    } else {
      console.log('NFC not enabled');
    }

When I try to run the app on my iOS device, this is the error I get:
ERROR: Method 'channel:' not defined in Plugin 'NfcPlugin'

Where is this "channel" method getting called?

I'm using Xcode 10.2, phonegap-nfc 1.0.3 and @ionic-native/nfc 5.4.0

Thanks for the help!

Davide

@dawesc
Copy link

dawesc commented Apr 30, 2019

did you find a solution, i'm having the same error.

@davidemorotti
Copy link
Author

davidemorotti commented Apr 30, 2019 via email

@dawesc
Copy link

dawesc commented Apr 30, 2019

ok thanks for responding so quickly will keep my fingers crossed and use QR codes for now instead :D

@bushev
Copy link

bushev commented Jul 5, 2019

The same issue: 9.0.0 ([email protected])

bushev added a commit to bushev/device-com-nfc.cordova that referenced this issue Jul 5, 2019
@bushev
Copy link

bushev commented Jul 5, 2019

I've fixed this error. Not sure, what the channel method should do exactly, probably it is needed for the plugin initialization.

See bushev@ea08e52

@fixdaddy
Copy link

Thanks bushev!

I have the same error with the latest IOS (10.15) and Xcode (11). I didn't see this correction (#363) in the 1.0.4 release notes. However, I see you committed this change on July 5. Shouldn't it be included in the 1.0.4 release?

rastafan added a commit to rastafan/phonegap-nfc that referenced this issue Feb 21, 2020
… 'NfcPlugin')

Fix for chariotsolutions#363 (Method 'channel:' not defined in Plugin 'NfcPlugin') as suggested by bushev in [bushev/device-com-nfc.cordova@ea08e52](bushev@ea08e52)
@don don self-assigned this Apr 8, 2020
@don
Copy link
Member

don commented Apr 16, 2020

Fixed in #399

@don don closed this as completed Apr 16, 2020
@coachdesign
Copy link

Fixed in #399

During the test on the device, it gives me the same error.
I updated to the latest version available 1.2.0

PhoneGap NFC - Cordova Plugin
(c)2017 Don Coleman
ERROR: Method 'channel:' not defined in Plugin 'NfcPlugin'
FAILED pluginJSON = ["NfcPlugin866892554","NfcPlugin","channel",[]]

My ionic info

Ionic:

   Ionic CLI          : 6.10.1
   Ionic Framework    : ionic-angular 3.9.10
   @ionic/app-scripts : 3.2.3

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 9.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-webview 4.0.1, (and 18 other plugins)

Utility:

   cordova-res                          : not installed
   native-run (update available: 1.0.0) : 0.2.3

System:

   ios-deploy : 1.9.4
   ios-sim    : 8.0.2
   NodeJS     : v10.21.0
   npm        : 6.14.4
   OS         : macOS Catalina
   Xcode      : Xcode 11.5 Build version 11E608c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants