Skip to content

Commit

Permalink
🎉 v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
touyu committed Mar 31, 2017
1 parent 55258de commit 3a03c08
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,15 @@ class CheckingLoginStateViewController: UIViewController {
super.viewDidAppear(animated)

if AnnictConsts.accessToken.isEmpty && !AppConfig.isTesting() {
let loginVC = LoginViewController.instantiate(withStoryboard: "Login")
self.present(loginVC, animated: false, completion: nil)
FIRDatabaseClient().getBoolValue(path: "isReview") { isReview in
if isReview {
let reviewLoginVC = ReviewLoginViewController.instantiate(withStoryboard: .login)
self.present(reviewLoginVC, animated: true, completion: nil)
} else {
let loginVC = LoginViewController.instantiate(withStoryboard: .login)
self.present(loginVC, animated: false, completion: nil)
}
}
} else {
let annictTabBarController = AnnictTabBarController.instantiate(withStoryboard: "AnnictMeWorks")
self.present(annictTabBarController, animated: false, completion: nil)
Expand Down
20 changes: 4 additions & 16 deletions Annict-for-iOS/Controllers/Login/ReviewLoginViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import UIKit

import Keys

class ReviewLoginViewController: UIViewController {

@IBOutlet dynamic fileprivate weak var IDTextField: UITextField!
Expand All @@ -21,22 +23,8 @@ class ReviewLoginViewController: UIViewController {
}

@IBAction func tapedLoginButton(_ sender: Any) {
guard let testID = ProcessInfo.processInfo.environment["test_annict_id"] else {
assertionFailure("env['test_annict_id'] is not set.")
return
}

guard let testPass = ProcessInfo.processInfo.environment["test_annict_pass"] else {
assertionFailure("env['test_annict_pass'] is not set.")
return
}

if IDTextField.text == testID && passwordTextField.text == testPass {
guard let testAccessToken = ProcessInfo.processInfo.environment["test_annict_access_token"] else {
assertionFailure("env['test_annict_access_token'] is not set.")
return
}
AnnictConsts.accessToken = testAccessToken
if IDTextField.text == AnnictForIOSKeys().annictIDForReview && passwordTextField.text == AnnictForIOSKeys().annictPassForReview {
AnnictConsts.accessToken = AnnictForIOSKeys().annictAccessTokenForReview
let annictTabBarController = AnnictTabBarController.instantiate(withStoryboard: "AnnictMeWorks")
self.present(annictTabBarController, animated: false, completion: nil)
} else {
Expand Down
4 changes: 2 additions & 2 deletions Annict-for-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<string>1.0.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.7</string>
<string>0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
5 changes: 4 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ plugin 'cocoapods-keys', {
:keys => [
"AnnictClientID",
"AnnictClientSecret",
"AnnictAccessToken"
"AnnictAccessToken",
"AnnictIDForReview",
"AnnictPassForReview",
"AnnictAccessTokenForReview"
]}
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ SPEC CHECKSUMS:
GoogleToolboxForMac: 8e329f1b599f2512c6b10676d45736bcc2cbbeb0
Keys: 9c35bf00f612ee1d48556f4a4b9b4551e224e90f

PODFILE CHECKSUM: e467af81a6b243828cc7e10d75b7a8b63efd7f1d
PODFILE CHECKSUM: 88d5a3c6103123f1227c6fd8b0bff6f4d65d3875

COCOAPODS: 1.2.0
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a03c08

Please sign in to comment.