From d287b9eb611ef9c71a521936d4084222e86b81c3 Mon Sep 17 00:00:00 2001 From: German Lopez Date: Tue, 24 Apr 2018 10:23:46 -0300 Subject: [PATCH 1/3] Add automatic logout clear instructions --- ios-base/AppDelegate.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ios-base/AppDelegate.swift b/ios-base/AppDelegate.swift index e4e8eaca..4e8cf5cb 100644 --- a/ios-base/AppDelegate.swift +++ b/ios-base/AppDelegate.swift @@ -46,7 +46,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { UserDataManager.deleteUser() SessionManager.deleteSession() //Clear any local data if needed - //Take user to onboarding if needed + //Take user to onboarding if needed, do NOT redirect the user if is already in the landing + // to avoid losing the current VC stack state. if window?.rootViewController is HomeViewController { window?.rootViewController = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() } From 173b542be1744e9f03f0aeb3d99ca874c12fb1e8 Mon Sep 17 00:00:00 2001 From: German Lopez Date: Tue, 24 Apr 2018 10:37:40 -0300 Subject: [PATCH 2/3] Add codecimate support --- .codeclimate.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 00000000..3a90bf61 --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,5 @@ +#CodeClimate config file + +plugins: + swiftlint: + enabled: true From 6e32dae44dd84bb0c98bcf77d45dfe23d2beb4ea Mon Sep 17 00:00:00 2001 From: German Lopez Date: Tue, 24 Apr 2018 12:11:47 -0300 Subject: [PATCH 3/3] Update README with CodeClimate --- .codeclimate.yml | 5 ----- README.md | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml deleted file mode 100644 index 3a90bf61..00000000 --- a/.codeclimate.yml +++ /dev/null @@ -1,5 +0,0 @@ -#CodeClimate config file - -plugins: - swiftlint: - enabled: true diff --git a/README.md b/README.md index bd878c03..905303de 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ [![Build Status](https://img.shields.io/travis/rootstrap/ios-base/master.svg)](https://travis-ci.org/rootstrap/ios-base) +[![Code Climate](https://img.shields.io/codeclimate/maintainability/rootstrap/ios-base.svg)](https://codeclimate.com/github/rootstrap/ios-base) [![License](https://img.shields.io/github/license/rootstrap/ios-base.svg)](https://github.com/rootstrap/ios-base/blob/master/LICENSE.md) # iOS Base Template