iOS11 core NFC : session Timeout

Hi,


I have developped a short appli reading NDEF records on NFC tag. All is working fine, excepting scanning behaviour on iPhone :

- How to increase scan Timeout of NFC ? It seems to be limited to 1 mn. I need to stop then restart scanning every minute...

- Sometimes , RF field is lost whithout any logical reason. Have you already seen that ?


Thx for any feedback.

You can't increase the timeout, it is set by Apple in the core of the API. Are you getting any errors/debug info in the console when the RF field is lost?

We have seen the symtom where the iPhone suddenly stops scanning for no apparent reason. We have found we sometime have to reload the app fro the debugger and other times we have rebooted the mobile. I was going to post where you would look or set to create some information to help me or Applle identify what is exactly going on. When it works it works really well indeed!

Thx all for your feedback.

I didn't find any method to increase Timeout of NFC core.

API describes maximumRetries and retryInterval for NFCTagCommandConfiguration but I didn't find how to program them.


Regarding error returned by delegate functions, func readerSession(_ session: NFCNDEFReaderSession, didInvalidateWithError error: Error) , I always got two kinds of error :

Code=201 "Session is invalidated due to maximum session timeout"

or

Code=200 "Session is invalidated by user cancellation"

I don't get any other error, even when RField is lost, or when NDEF cannot be read !!!! Hope it will be fixed in next beta !!!


In every case, I need to relauch a session.begin in my appli to re run NFC scan.


I will create a thread in my applicaiton to check session.isReady status , and see if it is updated accordingly.


I have also viewed another strange behavior :

- Run NFC scan near TAG with NDEF => OK

- Move iPhone outside TAG for 3s

- Try again to read NDEF => KO....RFField is lost.


I suspect that iPhone stops RF if it doesn't see any RF communication while a short time.


iOS11 core NFC : session Timeout
 
 
Q