PKPassLibrary.requestAutomaticPassPresentationSuppression Behavior

We are implementing a feature that uses PKPassLibrary.requestAutomaticPassPresentationSuppression to prevent the Wallet from appearing when unlocking a lock. We have already completed the approval process for the entitlement to enable Pass Presentation Suppression.

In most cases, our code snippet works as expected, and the result is .success. However, we are also encountering other results, such as .denied, .alreadyPresenting, and .cancelled or .notSupported, which cause the Wallet to appear for users.

Here's the code snippet we're using:

PKPassLibrary.requestAutomaticPassPresentationSuppression { result in
logger.log(
.info,
"PKPassLibrary suppression result: \(result.description)",
LogContext.homeFeature
)
}

I would appreciate clarification on the following points:

  1. What's the meaning of each result type (.denied, .alreadyPresenting, .cancelled, .notSupported) beyond what is mentioned in the documentation? The documentation here does not provide additional details.

  2. What is the recommended handling for these specific result states? Should we be taking different actions or retries based on each case?

Thank you very much for your help. Best, Ramiro.

+1 I'm specifically looking for more information on the denied result.

@RamiroDiaz-Latch did you ever figure anything on this? running into the same problem.

This is missing from the documentation, but it seems that the PKPassLibrary.requestAutomaticPassPresentationSuppression function should not be called when the application state is background.

PKPassLibrary.requestAutomaticPassPresentationSuppression Behavior
 
 
Q