From dd832ad6dfbb9ee2f737bfec8a91cbf11ec331eb Mon Sep 17 00:00:00 2001 From: "J. Laymon" <71040782+bogotesr@users.noreply.github.com> Date: Thu, 15 Aug 2024 22:20:53 -0700 Subject: [PATCH] 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 --- AltStore/LaunchViewController.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/AltStore/LaunchViewController.swift b/AltStore/LaunchViewController.swift index fd932a6a..f60a808e 100644 --- a/AltStore/LaunchViewController.swift +++ b/AltStore/LaunchViewController.swift @@ -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