Search code examples
ioscordovanfcphonegap

phonegap-nfc on iOS opens the Ready To Scan under the app


I'm using the phonegap-nfc plugin and I have a button in my app which is simply calling the following function

function iosNFC(){
    nfc.beginSession(
        function(){console.log("Success");},
        function(){console.log("ERROR");}
   );
}

The problem is the iOS "Ready to scan" box doesn't pop up over the app like it does in this vide instead its there under(?) it. The only way I know its worked at all is if I double click the home button to switch apps and then "Ready to scan" takes dialogue box takes focus and works as expected.

I have NFC Tag Reading capability in my Xcode project so now I'm wondering is this an iOS issue or a phonegap problem?


Solution

  • Turned out the issue was with PhoneGap (version 7.0.1 and iOS PhoneGap Version 4.4.0). I rebuilt the app using Cordova and everything worked as expected.

    See the issue and resolution at https://github.com/chariotsolutions/phonegap-nfc/issues/283