chariotsolutions / phonegap-nfc

PhoneGap NFC Plugin
MIT License
706 stars 555 forks source link

Error System resource unavailable when attempting to write nfc tag on iOS #407

Closed TheLazyHatGuy closed 3 years ago

TheLazyHatGuy commented 4 years ago

I try to use the following code to write to an NFC tag on iOS

this.nfc.write(tagMessage).then(() => {
            this.readingTag = false;
            this.getLocation(tagUUID);
          }).catch((e) => {
            console.log('Then.Catch()');
            this.updateLoading(1);
            this.statusMessage = 'ERR: ' + e;
            this.readingTag = false;
            console.error('Write to tag error', e);
            this.nfcError(e);
            });

But every time I do I get the error [error] - ERROR Error: Uncaught (in promise): System resource unavailable\

TheLazyHatGuy commented 4 years ago

I'm using an iPhone 7 on iOS 13 and ionic-native/NFC plugin 5.25.0 and phonegap-nfc 1.1.1

don commented 4 years ago

This works on my iPhone 7

    var message = [
        ndef.textRecord("Hello phonegap-nfc")
    ];

    nfc.write(
        message,
        success => console.log("Wrote Message"),
        error => console.log(error)
   );
don commented 3 years ago

Can't duplicate