-
Notifications
You must be signed in to change notification settings - Fork 114
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
Allow opening device settings from modal after Bluetooth permission is denied #14573
Allow opening device settings from modal after Bluetooth permission is denied #14573
Conversation
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well, good find – I'd forgotten about that one.
One suggestion on the imports.
@@ -1,4 +1,6 @@ | |||
import Foundation | |||
import Yosemite | |||
import Hardware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to typealias what you need from Hardware in Yosemite's Model.swift
. Strictly, the app layer shouldn't know about Hardware or Networking.
@@ -1,5 +1,6 @@ | |||
import UIKit | |||
import Yosemite | |||
import Hardware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
Closes: #14561
Depends on #14561
Description
When Bluetooth permission is denied during card reader connection, show a modal that allows opening device settings.
Solution
It turns out
CardPresentModalBluetoothRequired
already exists, but it's only used inCardReaderSettingsAlerts
which is a provider that is used to displaying some alerts fromCardReaderSettingsConnectedViewController
but not forscanningFailed
issues.The solution is to use
CardPresentModalBluetoothRequired
inBluetoothReaderConnectionAlertsProvider
when.bluetoothDenied
error happens. To be safe, added the same code toCardReaderSettingsAlerts
Steps to reproduce
Testing information
Tested different payment entry points. All result in the expected error now. iPhone 14 Po 17.7.
Screenshots
Permissions.mov
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: