Better pairing file info (#676)

makes the pop up give you a button to press for help rather than giving a plaintext url to a page that doesn't exist
This commit is contained in:
J. Laymon
2024-08-15 22:20:53 -07:00
committed by GitHub
parent 8cf7bc9998
commit dd832ad6df

View File

@@ -159,7 +159,7 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
} else {
// Show an alert explaining the pairing file
// Create new Alert
let dialogMessage = UIAlertController(title: "Pairing File", message: "Select the pairing file for your device. For more information, go to https://wiki.sidestore.io/guides/getting-started/#pairing-file", preferredStyle: .alert)
let dialogMessage = UIAlertController(title: "Pairing File", message: "Select the pairing file or select \"Help\" for help.", preferredStyle: .alert)
// Create OK button with action handler
let ok = UIAlertAction(title: "OK", style: .default, handler: { (action) -> Void in
@@ -174,7 +174,18 @@ final class LaunchViewController: RSTLaunchViewController, UIDocumentPickerDeleg
UserDefaults.standard.isPairingReset = false
})
//Add OK button to a dialog message
//Add "help" button to take user to wiki
let wikiOption = UIAlertAction(title: "Help", style: .default) { (action) in
let wikiURL: String = "https://docs.sidestore.io/docs/getting-started/pairing-file"
if let url = URL(string: wikiURL) {
UIApplication.shared.open(url)
}
sleep(2)
exit(0)
}
//Add buttons to dialog message
dialogMessage.addAction(wikiOption)
dialogMessage.addAction(ok)
// Present Alert to