We are working on an HCE application following your documentation. Almost everything is working fine except that we encounter a crash when using CardSession.init() method.
We are calling CardSession.isEligible() before CardSession.init().
This crash is random and affects very few user and we did not find a way yet to reproduce this crash on our side.
Our theory is CardSession.isEligible() is doing thing under the hood and make CardSession.init() cause a crash, but that just our theory.
Here are some stacks :
CoreNFC/NFCCardSession.swift:431: Fatal error: Previous session exists
0 libswiftCore.dylib 0x000000019ed73800 _assertionFailure(_:_:file:line:flags:) + 168 (AssertCommon.swift:171)
1 CoreNFC 0x000000025b99f630 NFCCardSession.startSession() + 296 (NFCCardSession.swift:431)
2 CoreNFC 0x000000025b994771 CardSession.begin() + 1 (CardSession.swift:337)
3 CoreNFC 0x000000025b99427d CardSession.init() + 1 (CardSession.swift:320)
4 Paiement Mobile 0x000000010197f345 HceNativeSDK.startCardSession() + 1