Dear,
I am starting to read the documentation about HCE payments and doing the first tests in my device. I have noticed that the only way to request contactless payment permissions is calling:
NFCPresentmentIntentAssertion.acquire()
And if it is the first time will prompt a popup asking the permissions and if not and the user denied the permission will throw the error systemEligibilityFailed.
My doubt is, is there other way to ask the contactless permissions instead of using the acquire? Because I understand that the acquire method is mainly created to prevent the default contactless app from launching. So I assume that it is not a good practice to use some point in the app just for asking the permission, right? Or for the first time we can use it for that purpose?
According to that, is there any way to get the current contactless payment permissions status, just as we can get it from the camera (AVCaptureDevice.authorizationStatus(for: mediaType: AVMediaType))?
The main goal is to give to the user a good experience. First asking the permission in a specific screen that explain why we need this permission and if the user denies it show some information in a screen as we can do it with other services as camera, micro, location...
Thank you
I can't speak to what App Review will think about this or do, but if your use case demands that the permission dialog gets out of the way before the first transaction occurs, then there is no other choice.
It is not ideal because it might confuse your users more, when they see NFC activity out of nowhere. Perhaps more than having to have one extra tap at the time of the transaction - which will make them understand what they are giving a permission for.