Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tap to Pay] Reader connection - location permission result not awaited #337

Open
TomaszLizer opened this issue Nov 28, 2024 · 0 comments
Open

Comments

@TomaszLizer
Copy link

Summary

When connecting to the reader location services access is required. During connection flow location access request popup is presented. Nevertheless after popup is presented flow continues without awaiting for the request result. This causes several issue with payment flow:

  • Since location request ought to be performed in response to user action we cannot reliably connect to the reader in background (as requested by Apple)
  • We are connecting to the reader in payment flow - in this case SDK does not wait for location permissions and continues returning connection success. Subsequent payment made with connected reader will fail due to missing location.

Since location is required for the reader to work and location permissions are handled by SDK it should await for permission to be granted before continuing and throw error in case permissions were rejected by the user.

Currently SDK returns value from connectReader without respecting result or lack of for location permission dialog.

Code to reproduce

let config = try TapToPayConnectionConfigurationBuilder(delegate: reporter, locationId: locationId)
    .setTosAcceptancePermitted(canAcceptTos)
    .build()
let connectedReader = try await terminal.connectReader(
    discoveredReader,
    connectionConfig: config
)

iOS version

iOS 18.0.1

Installation method

Swift Package

SDK version

4.1.0

Other information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant