diff --git a/.travis.yml b/.travis.yml index edb3f0d..2387501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode9 +osx_image: xcode9.2 branches: only: - develop diff --git a/Podfile b/Podfile index 20987bf..a95879a 100644 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ platform :ios, '10.2' use_frameworks! target 'passKit' do - pod 'ObjectivePGP', :git => 'https://github.com/krzyzanowskim/ObjectivePGP.git', :tag => '0.9.0' + pod 'ObjectivePGP', :git => 'https://github.com/krzyzanowskim/ObjectivePGP.git', :tag => '0.10.0-beta2' target 'pass' do inherit! :search_paths end diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 607740b..1ce0f8c 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -7,7 +7,7 @@ # All lines starting with a # are ignored when running `fastlane` # If you want to automatically update fastlane if a new version is available: -# update_fastlane +update_fastlane # This is the minimum version number required. # Update this, if you use features of a newer version diff --git a/fastlane/travis.sh b/fastlane/travis.sh index 1f3e185..f6e503e 100755 --- a/fastlane/travis.sh +++ b/fastlane/travis.sh @@ -1,6 +1,7 @@ #!/bin/sh gem update fastlane +gem install xcodeproj if [ "$TRAVIS_PULL_REQUEST" == "true" ]; then fastlane test; else diff --git a/pass/Base.lproj/Main.storyboard b/pass/Base.lproj/Main.storyboard index cdbb4b6..c9f6f36 100644 --- a/pass/Base.lproj/Main.storyboard +++ b/pass/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -45,17 +45,17 @@ - diff --git a/pass/Controllers/PasswordsViewController.swift b/pass/Controllers/PasswordsViewController.swift index c4e18c8..34a208d 100644 --- a/pass/Controllers/PasswordsViewController.swift +++ b/pass/Controllers/PasswordsViewController.swift @@ -49,7 +49,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV }() private lazy var searchBarView: UIView? = { guard #available(iOS 11, *) else { - let uiView = UIView(frame: CGRect(x: 0, y: 64, width: self.view.bounds.width, height: 56)) + let uiView = UIView(frame: CGRect(x: 0, y: 64, width: self.view.bounds.width, height: 44)) uiView.addSubview(self.searchController.searchBar) return uiView } @@ -203,7 +203,6 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV override func viewDidLoad() { super.viewDidLoad() - tabBarController!.delegate = self searchController.searchBar.delegate = self tableView.delegate = self tableView.dataSource = self @@ -215,7 +214,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV navigationItem.hidesSearchBarWhenScrolling = false } else { // Fallback on earlier versions - tableView.contentInset = UIEdgeInsetsMake(56, 0, 0, 0) + tableView.contentInset = UIEdgeInsetsMake(44, 0, 0, 0) view.addSubview(searchBarView!) } tableView.refreshControl = syncControl @@ -234,6 +233,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + tabBarController!.delegate = self if let path = tableView.indexPathForSelectedRow { tableView.deselectRow(at: path, animated: false) } @@ -242,7 +242,7 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() guard #available(iOS 11, *) else { - searchBarView?.frame = CGRect(x: 0, y: navigationController!.navigationBar.bounds.size.height + UIApplication.shared.statusBarFrame.height, width: UIScreen.main.bounds.width, height: 56) + searchBarView?.frame = CGRect(x: 0, y: navigationController!.navigationBar.bounds.size.height + UIApplication.shared.statusBarFrame.height, width: UIScreen.main.bounds.width, height: 44) searchController.searchBar.sizeToFit() return } @@ -554,9 +554,9 @@ class PasswordsViewController: UIViewController, UITableViewDataSource, UITableV self.tapTabBarTime = currentTime if duration < 0.35 { let topIndexPath = IndexPath(row: 0, section: 0) - if let _ = tableView.cellForRow(at: topIndexPath) { - tableView.scrollToRow(at: topIndexPath, at: .bottom, animated: true) - } + if tableView.numberOfSections > 0 { + tableView.scrollToRow(at: topIndexPath, at: .bottom, animated: true) + } self.tapTabBarTime = 0 return } diff --git a/pass/Controllers/SettingsTableViewController.swift b/pass/Controllers/SettingsTableViewController.swift index cc24bc1..86d6e9a 100644 --- a/pass/Controllers/SettingsTableViewController.swift +++ b/pass/Controllers/SettingsTableViewController.swift @@ -13,7 +13,7 @@ import PasscodeLock import LocalAuthentication import passKit -class SettingsTableViewController: UITableViewController { +class SettingsTableViewController: UITableViewController, UITabBarControllerDelegate { lazy var touchIDSwitch: UISwitch = { let uiSwitch = UISwitch(frame: CGRect.zero) @@ -29,6 +29,10 @@ class SettingsTableViewController: UITableViewController { let passwordStore = PasswordStore.shared var passcodeLockConfig = PasscodeLockConfiguration.shared + func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { + navigationController?.popViewController(animated: true) + } + @IBAction func savePGPKey(segue: UIStoryboardSegue) { if let controller = segue.source as? PGPKeySettingTableViewController { SharedDefaults[.pgpPrivateKeyURL] = URL(string: controller.pgpPrivateKeyURLTextField.text!) @@ -140,6 +144,11 @@ class SettingsTableViewController: UITableViewController { setPasscodeLockTouchIDCells() } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(true) + tabBarController!.delegate = self + } + private func hasTouchID() -> Bool { let context = LAContext() var error: NSError? diff --git a/pass/Views/LabelTableViewCell.xib b/pass/Views/LabelTableViewCell.xib index 157ca44..1820afe 100644 --- a/pass/Views/LabelTableViewCell.xib +++ b/pass/Views/LabelTableViewCell.xib @@ -1,11 +1,11 @@ - + - + @@ -19,17 +19,17 @@ -