IOS Error_NFC Cup Game for AI2



I am trying the "NFC Cup Game for AI2" from "Tutorials in MIT App Inventor" in an iPhone SE2.

I downloaded the source code to my computer, opened with App Inventor and ran it in the iPhone SE2 via App Inventor.

Unfortunately, a Runtime Error immediately pops-up as shown in the image below.

As expected the NFC function does not work.

Hoping to hear some suggestions how to walk around this issue.



Thank you very much for the response.

Since the project was originally from MIT Tutorials,
I thought this hyperlink "NFC Cup Game for AI2" would suffice (with regards to the blocks).
I do apologize.

Please see the images below for the blocks.


The nearfield sensor isn't available in iOS yet.


Hi Mr. Peter,

Oh I see...


@Know_About_IT you also could say that more politely...
for example like this

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Thank you for considering this next time...


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.


In fact donatz, I understood that the NFC sensor was not accessible by 3rd party Apps but luckily I was wrong, here is Apple's link:

This should mean NFC can be added to AI for iOS in the future. It is of course already available on Android.....


Yes and no. The challenge in this particular case is that the tutorial in question uses both NFC reading and NFC writing. The APIs Apple provides in iOS only support reading tags, not writing. So while we will eventually be able to support reading NFC tags in apps, it seems as though at least in the near future we won't be able to support writing them. This tutorial won't be able to work on iOS unless Apple eventually provides the necessary APIs.

What is this tutorial about then?

1 Like

Hmm. Yes after further reviewing the API materials for the NFCNDEFTag specifically it does look like it support writes on iOS 13+.