revtel / react-native-nfc-manager

React Native NFC module for Android & iOS
MIT License
1.38k stars 317 forks source link

Can't find a right way to use the makeReadonly() method to make readonly after write on the Newest version? #420

Closed paichato closed 2 years ago

paichato commented 3 years ago

Can't find a right way to use the makeReadonly() method to make readonly after write on the Newest version. At first i request the technology to write the message, the I request again the Technology to use the makeReadOnly() method but it throws an error : [Error].

writeMethod();
makeReadOnly();

async function makeReadOnly() {

        NfcManager.registerTagEvent(tag => console.log(tag))
    .then(() => NfcManager.requestTechnology(NfcTech.Ndef))
    .then(() => NfcManager.makeReadOnly())
    .then(result => {
        console.log('makeReadOnly result ', result);
        setModalVisible2(true);
    })
    .catch((ex)=>{
        console.log('Error'+ex);

    });
    }
    @whitedogg13 🆘 
github-actions[bot] commented 3 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

Jedidiah commented 3 years ago

Getting the same issue, searching the code it doesn't look like the method isn't there anymore. Is there another way of setting it now?

Jedidiah commented 3 years ago

Found it, it's moved to NfcManager.ndefHandler.makeReadOnly()

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.