From 5337636f4376e9d290df46ef2726510f0af90560 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Mon, 30 Sep 2019 15:32:24 -0700 Subject: [PATCH] Opens Patreon page in-app when AltStore not installed --- Delta/Settings/SettingsViewController.swift | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Delta/Settings/SettingsViewController.swift b/Delta/Settings/SettingsViewController.swift index 9a8db4e..3444290 100644 --- a/Delta/Settings/SettingsViewController.swift +++ b/Delta/Settings/SettingsViewController.swift @@ -345,9 +345,11 @@ extension SettingsViewController UIApplication.shared.open(patreonURL, options: [:]) { (success) in guard !success else { return } - let alertController = UIAlertController(title: NSLocalizedString("AltStore Not Installed", comment: ""), message: NSLocalizedString("You must have AltStore installed to receive Patreon benefits.", comment: ""), preferredStyle: .alert) - alertController.addAction(.ok) - self.present(alertController, animated: true, completion: nil) + let patreonURL = URL(string: "https://www.patreon.com/rileytestut")! + + let safariViewController = SFSafariViewController(url: patreonURL) + safariViewController.preferredControlTintColor = .deltaPurple + self.present(safariViewController, animated: true, completion: nil) } tableView.deselectRow(at: indexPath, animated: true)