Cant turn off NFC (PKPassLibrary.RequestAutomaticPassPresentationSuppression)

I have an app where I want to scan an aztec-code into a reader (that also reads NFC) which will trigger apple pay. I need to supress apple pay to use my app.

This is done by applying to apple and get an entitlement which i have applied to my profile. Now all I have to do is to add the following code:

PKPassLibrary.RequestAutomaticPassPresentationSuppression((PKAutomaticPassPresentationSuppressionResult r) => { });

And add the entitlement to the Entitlement.plist.

This works for a "clean" app with nothing in it, but do not work for my app.

Any suggestions as to what can be the problem here?

Answered by TurnOffNFC in 679795022

The problem was that the Entitlement.plist was not included in the project. This was done by adding the path to it under "Custom Entitlements"

Accepted Answer

The problem was that the Entitlement.plist was not included in the project. This was done by adding the path to it under "Custom Entitlements"

Cant turn off NFC (PKPassLibrary.RequestAutomaticPassPresentationSuppression)
 
 
Q