From 5e067a4d3bf971767168e294dbcb3b81acf0fb2c Mon Sep 17 00:00:00 2001 From: jahorton Date: Thu, 30 Jan 2020 09:39:17 +0700 Subject: [PATCH 1/3] feat(ios): (iOS 11+) deeplink to Keyman settings for sys kbd setup --- .../GetStartedViewController.swift | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/ios/keyman/Keyman/Keyman/GetStartedViewController/GetStartedViewController.swift b/ios/keyman/Keyman/Keyman/GetStartedViewController/GetStartedViewController.swift index 623e43d38e..dd2ad9c314 100644 --- a/ios/keyman/Keyman/Keyman/GetStartedViewController/GetStartedViewController.swift +++ b/ios/keyman/Keyman/Keyman/GetStartedViewController/GetStartedViewController.swift @@ -114,7 +114,13 @@ class GetStartedViewController: UIViewController, UITableViewDelegate, UITableVi } case 1: cell.textLabel?.text = "Set up Keyman as system-wide keyboard" - cell.detailTextLabel?.text = "" + if #available(iOS 11.0, *) { + // We can expedite this via near-direct settings link. + // So, let's add the one extra needed detail to our detail text. + cell.detailTextLabel?.text = "Keyboards > Enable \"Keyman\"" + } else { + cell.detailTextLabel?.text = "" + } if !AppDelegate.isKeymanEnabledSystemWide() { cell.accessoryType = .none } else { @@ -145,9 +151,17 @@ class GetStartedViewController: UIViewController, UITableViewDelegate, UITableVi mainViewController.dismissGetStartedView(nil) mainViewController.showInstalledLanguages() case 1: + if #available(iOS 11.0, *), // if "Keyboards" is an option in our app's settings menu + let appSettings = URL(string: UIApplication.openSettingsURLString) { + UIApplication.shared.openURL(appSettings) + } else { + let setUpVC = SetUpViewController() + mainViewController.present(setUpVC, animated: true, completion: nil) + } + + // While it'd be nice to keep it in view, it seems to be automatically dismissed. + // This at least helps keep the app's state properly managed. mainViewController.dismissGetStartedView(nil) - let setUpVC = SetUpViewController() - mainViewController.present(setUpVC, animated: true, completion: nil) case 2: mainViewController.dismissGetStartedView(nil) mainViewController.infoButtonClick(nil) From 6e3808f10d1370b6fb61d2fe1003cdc14d72e1d2 Mon Sep 17 00:00:00 2001 From: jahorton Date: Fri, 31 Jan 2020 12:10:48 +0700 Subject: [PATCH 2/3] chore(ios): history.md --- ios/history.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ios/history.md b/ios/history.md index 44ae2eb6a4..e01b83ad66 100644 --- a/ios/history.md +++ b/ios/history.md @@ -1,5 +1,8 @@ # Keyman for iPhone and iPad Version History +## 2020-01-30 13.0.63 beta +* Feature: Initial keyboard setup process simplified with direct Settings link [iOS 11.0+ only] (#2548) + ## 2020-01-30 13.0.62 beta * Bug fix: System keyboard now respects "Sounds > Keyboard Clicks" setting (#2550) From 3be21281777b41791609aaa2785bed0bd72e5d83 Mon Sep 17 00:00:00 2001 From: jahorton Date: Fri, 31 Jan 2020 12:22:09 +0700 Subject: [PATCH 3/3] chore(ios): history.md tweak (same-day version #) --- ios/history.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ios/history.md b/ios/history.md index e01b83ad66..3e8211446a 100644 --- a/ios/history.md +++ b/ios/history.md @@ -1,9 +1,7 @@ # Keyman for iPhone and iPad Version History -## 2020-01-30 13.0.63 beta -* Feature: Initial keyboard setup process simplified with direct Settings link [iOS 11.0+ only] (#2548) - ## 2020-01-30 13.0.62 beta +* Feature: Initial keyboard setup process simplified with direct Settings link [iOS 11.0+ only] (#2548) * Bug fix: System keyboard now respects "Sounds > Keyboard Clicks" setting (#2550) ## 2020-01-29 13.0.61 beta