Can't retrieve tag information with background tag on IOS
Hey !
I wrote the following code :
const initNFC = () => {
const onBackgroundTag = async (tag: TagEvent | null) => {
console.log('onBackgroundTag', tag);
};
const initalizeBackgroundTag = async () => {
// changed
await NfcManager.start();
const bgTag = await NfcManager.getBackgroundTag();
onBackgroundTag(bgTag);
// listen to other background tags after the app launched
NfcManager.setEventListener(NfcEvents.DiscoverBackgroundTag, onBackgroundTag);
};
initalizeBackgroundTag();
};
function App() {
initNFC();
return (
<View>
<Text>Hello World</Text>
</View>
);
}
export default App;
I'm trying to retrieve tag informations when reading tag in background but the return value of NfcManager.getBackgroundTag is always null. What am I doing wrong ? Is there something I miss ? Is it possible to do it ?
Environment:
- Device: Iphone 14 Pro Max
- iOS: 17.4.1
- [email protected]
- Universal Links implemented and fully working
I've already tried many solutions proposed in previous issues, and it don't work.
It's Working fine in android ?
Yes, on Android it works perfectly.
Same for me
I can't retrieve the tagId when the application is launched in background on iOS thanks to the little NFC notification that appears when a tag is touched.
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.
This issue was closed because it has been stalled for 5 days with no activity.
I'm also having this issue, I can't get any scan information.
Also, if the issue is tagged for iOS, saying that it works perfectly on Android is probably not going to be relevant information.
Same!!!