197
Views
13
Comments
Solved
[NFC Plugin] Error Generating the App using MABS 10
nfc-plugin
Mobile icon
Forge asset by Experts
Application Type
Mobile

We are transitioning our customer's application to use MABS 10. 

I downloaded the demo app in my personal environment to test only this plugin. I didn't change anything on the app.

I am getting this error whenever I try to generate using MABS 10 however generating it with MABS 9 works.

"Error: Couldn't compile the Cordova plugin main/java/com/chariotsolutions/nfc/plugin/NfcPlugin.java:461: error: cannot find symbol. Review your plugin configurations and check our documentation for more information if the problem persists. "


I am only showing the Android error from my personal environment but I am also getting a similar error for iOS on the customer's environment. 


Is the most recent version of the plugin not yet compatible with MABS 10?


Thanks.

2025-01-10 01-29-36
Elizabeth Sumalde
Solution

Hi @Gabrielle Ellis and @Joris Sprunken...

Looking further into the Mobile Logs, there are the errors we get...

  • Android

[2024-01-09T10:04:24.743Z] [VERBOSE] [Build] source/platforms/android/app/src/main/java/com/chariotsolutions/nfc/plugin/NfcPlugin.java:461: error: cannot find symbol 

[2024-01-09T10:04:24.743Z] [VERBOSE] [Build]                             nfcAdapter.setNdefPushMessage(p2pMessage, getActivity()); 

  • iOS

[2024-01-12T07:56:48.003Z] [VERBOSE] [Build] source/platforms/ios/Sandbox Mobile BOSS B/Plugins/phonegap-nfc/NfcPlugin.m:128:53: error: 'new' is unavailable 

[2024-01-12T07:56:48.003Z] [VERBOSE] [Build]             self.nfcSession = [[NFCTagReaderSession new] 


Based on our team's investigation, it was found that Android 14 (API34) used by MABS10 no longer provides some methods that are being used by the NFC Plugin.

These are the obsolete methods that are no longer available (see API Differences between 33 and 34):

  • nfcAdapter.setNdefPushMessage
  • nfcAdapter.isNdefPushEnabled
  • nfcAdapter.setOnNdefPushCompleteCallback
  • nfcAdapter.setBeamPushUris


As for a temporary fix, we created a branch on the plugin repository where...

  • (For Android) all the invocations of these methods on the NFCPlugin.java file were commented out.
  • (For iOS) all the code that uses 'new' was updated (red being the old code and green being the new one

The extensibility configuration of the NFC Plugin was changed on lifetime to use the new branch.


This workaround works for us as we are only using the read functionality of the plugin. With our tests, removing the methods mentioned above didn't affect our use of the plugin. We were able to generate the application using MABS 10. 


It would be great to have the final fix on the main plugin - but this is what we have for now. Hope this helps. 

2025-02-24 07-31-27
Howard Law

Hi Elizabeth,

I am new to Outsystems and could you elaborate more on the below part?

As for a temporary fix, we created a branch on the plugin repository where...

  • (For Android) all the invocations of these methods on the NFCPlugin.java file were commented out.
  • (For iOS) all the code that uses 'new' was updated (red being the old code and green being the new one

The extensibility configuration of the NFC Plugin was changed on lifetime to use the new branch.


where could I find the NFCPlugin.java in the forge component?

Thanks in advance!

Howard

2021-03-24 17-29-38
Frederico Sousa
Champion

Hey, can you share your branch of the plugin? :D

2025-01-10 01-29-36
Elizabeth Sumalde

Hi Howard.

Apologies as this is late, but Welcome to OutSystems!

The code changes mentioned on the previous comment is not on OutSystems. The changes is on GitHub. 

If you open the NFC plugin and go to the Extensibility Configuration, you'll see the URL to GitHub. If you go there, you will find the NFCPlugin.java and you can forked your own code and create a branch (create your own).

When you create your own, you can change this URL to point to that. More details on that in this document: https://success.outsystems.com/documentation/11/deploying_apps/override_the_default_mobile_extensibility_configurations/

Hope this helps.

2025-01-10 01-29-36
Elizabeth Sumalde

Hey Frederico.

Unfortunately, I am not able to share it now. The functionality we used from this plugin was very limited and the changes we made may not be compatible with your use case. Exploring a bit more on the changes and hopefully can share something useful soon.

2021-10-17 12-36-16
Amreen Shaikh

Hi Elizabeth Sumalde ,


Its because one of your module have extensibility configuration to phonegap-nfc (usually on github) which not supported by MABS 7, you can either use the latest version and check if its supported by MABS 7 or you need to find another cordova to use 


Regards,

Amreen

2025-01-10 01-29-36
Elizabeth Sumalde

The app was successfully generated using MABS 9.0 so I assume it should also work on lower versions (I haven't tried a lower version as we don't want to generate it using a deprecated/outdated version). My concern is that it's only showing the error when generating using MABS 10.

UserImage.jpg
Gabrielle Ellis

Hi @Elizabeth Sumalde did you find a fix for this? I am experiencing the same issue.

I found that the nfc plugin is using version 4 of Swift whereas MABS 10 uses Swift version Swift 5.9.2, MABS 9 uses 5.7.1, MABS 8.1 uses Swift 4, 4.2, and 5.5.

I tried adding swift support plugin to try change the dependency of this plugin to use swift 5 but no luck

Thanks in advance!

2025-03-31 13-45-58
Joris Sprunken

I am experiencing the same problem. Cannot compile the app with MABS 10 when I include the MFC plugin.

2025-01-10 01-29-36
Elizabeth Sumalde
Solution

Hi @Gabrielle Ellis and @Joris Sprunken...

Looking further into the Mobile Logs, there are the errors we get...

  • Android

[2024-01-09T10:04:24.743Z] [VERBOSE] [Build] source/platforms/android/app/src/main/java/com/chariotsolutions/nfc/plugin/NfcPlugin.java:461: error: cannot find symbol 

[2024-01-09T10:04:24.743Z] [VERBOSE] [Build]                             nfcAdapter.setNdefPushMessage(p2pMessage, getActivity()); 

  • iOS

[2024-01-12T07:56:48.003Z] [VERBOSE] [Build] source/platforms/ios/Sandbox Mobile BOSS B/Plugins/phonegap-nfc/NfcPlugin.m:128:53: error: 'new' is unavailable 

[2024-01-12T07:56:48.003Z] [VERBOSE] [Build]             self.nfcSession = [[NFCTagReaderSession new] 


Based on our team's investigation, it was found that Android 14 (API34) used by MABS10 no longer provides some methods that are being used by the NFC Plugin.

These are the obsolete methods that are no longer available (see API Differences between 33 and 34):

  • nfcAdapter.setNdefPushMessage
  • nfcAdapter.isNdefPushEnabled
  • nfcAdapter.setOnNdefPushCompleteCallback
  • nfcAdapter.setBeamPushUris


As for a temporary fix, we created a branch on the plugin repository where...

  • (For Android) all the invocations of these methods on the NFCPlugin.java file were commented out.
  • (For iOS) all the code that uses 'new' was updated (red being the old code and green being the new one

The extensibility configuration of the NFC Plugin was changed on lifetime to use the new branch.


This workaround works for us as we are only using the read functionality of the plugin. With our tests, removing the methods mentioned above didn't affect our use of the plugin. We were able to generate the application using MABS 10. 


It would be great to have the final fix on the main plugin - but this is what we have for now. Hope this helps. 

2025-02-24 07-31-27
Howard Law

Hi Elizabeth,

I am new to Outsystems and could you elaborate more on the below part?

As for a temporary fix, we created a branch on the plugin repository where...

  • (For Android) all the invocations of these methods on the NFCPlugin.java file were commented out.
  • (For iOS) all the code that uses 'new' was updated (red being the old code and green being the new one

The extensibility configuration of the NFC Plugin was changed on lifetime to use the new branch.


where could I find the NFCPlugin.java in the forge component?

Thanks in advance!

Howard

2021-03-24 17-29-38
Frederico Sousa
Champion

Hey, can you share your branch of the plugin? :D

2025-01-10 01-29-36
Elizabeth Sumalde

Hi Howard.

Apologies as this is late, but Welcome to OutSystems!

The code changes mentioned on the previous comment is not on OutSystems. The changes is on GitHub. 

If you open the NFC plugin and go to the Extensibility Configuration, you'll see the URL to GitHub. If you go there, you will find the NFCPlugin.java and you can forked your own code and create a branch (create your own).

When you create your own, you can change this URL to point to that. More details on that in this document: https://success.outsystems.com/documentation/11/deploying_apps/override_the_default_mobile_extensibility_configurations/

Hope this helps.

2025-01-10 01-29-36
Elizabeth Sumalde

Hey Frederico.

Unfortunately, I am not able to share it now. The functionality we used from this plugin was very limited and the changes we made may not be compatible with your use case. Exploring a bit more on the changes and hopefully can share something useful soon.

2020-09-23 10-25-03
Pedro Oliveira

Hi.

This plugin will be updated?

Thanks.

Pedro Oliveira

2024-07-02 18-18-00
John Kennedy Reis

Do you know if there is any update coming up?

2020-09-23 10-25-03
Pedro Oliveira

Hi,

This plugin will be updated to support MABS 10?

Google is requesting to update Google Play API version target to keep the app in Play Store.

Thanks,

Pedro Oliveira

2025-01-10 01-29-36
Elizabeth Sumalde

Although I have not tried it myself, maybe this could be an alternative. 

NFC Reader Plugin (Black Belt Edition)

It does mention that its MABS 10 compatible. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.