# NFC Reader

**URL:** <https://forum.ionicframework.com/t/nfc-reader/125919>\
**Category:** Ionic Native\
**Created:** [March 26, 2018, 9:05am UTC](https://forum.ionicframework.com/t/nfc-reader/125919 "2018-03-26T09:05:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yruama](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@Yruama](https://forum.ionicframework.com/u/Yruama)\
**Post date:** [March 26, 2018, 9:05am UTC](https://forum.ionicframework.com/t/nfc-reader/125919/1 "2018-03-26T09:05:03Z")

</div>

Hello

I try to read NFC tag to open an URL.

I have 2 devices :

- Blackberry 10 with [tagwriter](https://play.google.com/store/apps/details?id=com.nxp.nfc.tagwriter&hl=en) to send tag
- Iphone 7 who receive the tags

I write this code :

```auto
click() {

    this.nfc.beginSession().subscribe(res => {
      this.nfc.addNdefListener(() => {
        console.log('successfully attached ndef listener');
      }, (err) => {
        console.log('error attaching ndef listener', err);
      }).subscribe((event) => {
        console.log('received ndef message. the tag contains: ', event.tag);
        console.log('decoded tag id', this.nfc.bytesToHexString(event.tag.id));
      });
    },
      err => {
      console.log(err);
      });
  }

```

But it does not work. I get this message :

```auto
[general] <NSXPCConnection: 0x1c0109ea0> connection to service named com.apple.nfcd.service.corenfc: Exception caught during decoding of received message, dropping incoming message.
Exception: Exception while decoding argument 0 (#2 of invocation):
Exception: decodeObjectForKey: class "NFTechnologyEvent" not loaded or does not exist
2018-03-26 10:56:45.766957+0200 MyApp[826:212809] didInvalidateWithError Session is invalidated unexpectedly (null)

```

Same if i use android beam and try to send image or website.

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [March 26, 2018, 1:52pm UTC](https://forum.ionicframework.com/t/nfc-reader/125919/2 "2018-03-26T13:52:31Z")

</div>

Can you actually access and use the NFC reader of a iOS device?  
[https://ionicframework.com/docs/native/nfc/](https://ionicframework.com/docs/native/nfc/) says otherwise.

---

<div class="post-metadata">

**Author:** ![Yruama](https://avatars.discourse-cdn.com/v4/letter/y/b19c9b/32.png) [@Yruama](https://forum.ionicframework.com/u/Yruama)\
**Post date:** [March 26, 2018, 9:03pm UTC](https://forum.ionicframework.com/t/nfc-reader/125919/3 "2018-03-26T21:03:54Z")

</div>

Hey

The github repo [https://github.com/chariotsolutions/phonegap-nfc](https://github.com/chariotsolutions/phonegap-nfc) says that iOS can access to the NFC now

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:42pm UTC](https://forum.ionicframework.com/t/nfc-reader/125919/4 "2021-07-19T21:42:53Z")

</div>

Closed on July 19, 2021, 9:42pm UTC


