Skip to content

Commit

Permalink
Merge branch 'hotfix/v1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunsik-Yoo committed Jun 15, 2020
2 parents f41e8f7 + 2e6d117 commit af9c5da
Show file tree
Hide file tree
Showing 14 changed files with 145 additions and 56 deletions.
6 changes: 6 additions & 0 deletions thereto-ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ target 'thereto-ios' do
pod 'Firebase/Firestore'
pod 'Firebase/Storage'

# Crashlytics
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'

# Facebook auth
pod 'FBSDKLoginKit'

Expand All @@ -29,6 +33,8 @@ target 'thereto-ios' do

pod 'CropViewController'

pod 'SwiftyBeaver'

# Then
pod 'Then'
end
15 changes: 14 additions & 1 deletion thereto-ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ PODS:
- BoringSSL-GRPC/Implementation (0.0.3):
- BoringSSL-GRPC/Interface (= 0.0.3)
- BoringSSL-GRPC/Interface (0.0.3)
- Crashlytics (3.14.0):
- Fabric (~> 1.10.2)
- CropViewController (2.5.2)
- Fabric (1.10.2)
- FBSDKCoreKit (5.15.1):
- FBSDKCoreKit/Basics (= 5.15.1)
- FBSDKCoreKit/Core (= 5.15.1)
Expand Down Expand Up @@ -311,12 +314,15 @@ PODS:
- RxSwift (~> 5)
- RxSwift (5.1.1)
- SnapKit (5.0.1)
- SwiftyBeaver (1.9.1)
- Then (2.6.0)

DEPENDENCIES:
- Alamofire (~> 4.9.1)
- AlamofireNetworkActivityLogger (~> 2.4)
- Crashlytics (~> 3.14.0)
- CropViewController
- Fabric (~> 1.10.2)
- FBSDKLoginKit
- Firebase/Analytics
- Firebase/Auth
Expand All @@ -327,6 +333,7 @@ DEPENDENCIES:
- RxCocoa (~> 5.1.1)
- RxSwift (~> 5.1.1)
- SnapKit (~> 5.0.0)
- SwiftyBeaver
- Then

SPEC REPOS:
Expand All @@ -335,7 +342,9 @@ SPEC REPOS:
- Alamofire
- AlamofireNetworkActivityLogger
- BoringSSL-GRPC
- Crashlytics
- CropViewController
- Fabric
- FBSDKCoreKit
- FBSDKLoginKit
- Firebase
Expand Down Expand Up @@ -365,14 +374,17 @@ SPEC REPOS:
- RxRelay
- RxSwift
- SnapKit
- SwiftyBeaver
- Then

SPEC CHECKSUMS:
abseil: 18063d773f5366ff8736a050fe035a28f635fd27
Alamofire: 85e8a02c69d6020a0d734f6054870d7ecb75cf18
AlamofireNetworkActivityLogger: 6d3398c692d2c5d83b0c58793537860aca1e383d
BoringSSL-GRPC: db8764df3204ccea016e1c8dd15d9a9ad63ff318
Crashlytics: 540b7e5f5da5a042647227a5e3ac51d85eed06df
CropViewController: 1aac40093c5739e60d992b04724a55d12a689a4c
Fabric: 706c8b8098fff96c33c0db69cbf81f9c551d0d74
FBSDKCoreKit: 1d5acf7c9d7a2f92bb1a242dc60cae5b7adb91df
FBSDKLoginKit: f1ea8026a58b52d30c9f2e6a58ca7d813619fb83
Firebase: 497158b816d0a86fc31babbd05546fcd7e6083ff
Expand Down Expand Up @@ -402,8 +414,9 @@ SPEC CHECKSUMS:
RxRelay: d77f7d771495f43c556cbc43eebd1bb54d01e8e9
RxSwift: 81470a2074fa8780320ea5fe4102807cb7118178
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SwiftyBeaver: a1f5691458561414bcfab51874b2b7445451602b
Then: 90cd104fd951cec1980a03f57704ad8f784d4d79

PODFILE CHECKSUM: 29d97b2f4e51198395dee0c34e4668d4cbb0fb07
PODFILE CHECKSUM: 663c20d2032ae7b20783252253f89842c5bf0b88

COCOAPODS: 1.8.4
25 changes: 23 additions & 2 deletions thereto-ios/thereto-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@
6EE8DFCC2392325B00BF2E59 /* Frameworks */,
6EE8DFCD2392325B00BF2E59 /* Resources */,
B3B007B6FEF0B7873A22F127 /* [CP] Embed Pods Frameworks */,
6E10142E2495ED3C002DF14A /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -724,6 +725,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
6E10142E2495ED3C002DF14A /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\n\"${PODS_ROOT}/Fabric/run\"\n";
};
B3B007B6FEF0B7873A22F127 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -984,7 +1002,8 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "thereto-ios/thereto-ios.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = X975A2HM62;
ENABLE_PREVIEWS = NO;
Expand All @@ -994,6 +1013,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down Expand Up @@ -1113,7 +1133,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = "thereto-ios/thereto-ios.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 20;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = X975A2HM62;
ENABLE_PREVIEWS = NO;
Expand All @@ -1123,6 +1143,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>thereto-ios.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>38</integer>
<integer>41</integer>
</dict>
</dict>
</dict>
Expand Down
23 changes: 22 additions & 1 deletion thereto-ios/thereto-ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import UIKit
import Firebase
import FBSDKCoreKit
import AlamofireNetworkActivityLogger
import SwiftyBeaver

typealias Log = SwiftyBeaver

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -17,10 +20,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// Initialize facebook
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: launchOptions)

//
// Initialize AlmofireNetworkActivityLogger
NetworkActivityLogger.shared.startLogging()
NetworkActivityLogger.shared.level = .debug

initilizeSwiftyBeaver()

window = UIWindow(frame: UIScreen.main.bounds)
window?.backgroundColor = UIColor.themeColor
window?.rootViewController = SplashVC.instance()
Expand Down Expand Up @@ -58,5 +63,21 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
window?.rootViewController = MainVC.instance()
window?.makeKeyAndVisible()
}

private func initilizeSwiftyBeaver() {
// add log destinations. at least one is needed!
let console = ConsoleDestination() // log to Xcode Console
let cloud = SBPlatformDestination(appID: "bJPO03",
appSecret: "4f8tnYymJhvze9hvJc50irhwzmnlablw",
encryptionKey: "oltisgoyhfZvnqxQo7xvjgbupcKxdqwy")
cloud.minLevel = .debug

console.format = "$DHH:mm:ss$d $N.$F():$l $L: $M"
// or use this for JSON output: console.format = "$J"

// add the destinations to SwiftyBeaver
Log.addDestination(console)
Log.addDestination(cloud)
}
}

2 changes: 1 addition & 1 deletion thereto-ios/thereto-ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
12 changes: 10 additions & 2 deletions thereto-ios/thereto-ios/features/MainVC.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit
import RxSwift
import CoreLocation


class MainVC: UITabBarController {
Expand Down Expand Up @@ -77,14 +78,21 @@ extension MainVC: UITabBarControllerDelegate {
if let navi = viewController as? UINavigationController,
let rootVC = navi.viewControllers.first {
if rootVC is WriteVC {
self.present(WriteVC.instance(), animated: true)
switch CLLocationManager.authorizationStatus() {
case .authorizedWhenInUse:
self.present(WriteVC.instance(), animated: true)
case .denied, .restricted, .notDetermined:
AlertUtil.show(controller: self, title: "위치 권한 오류", message: "설정 > thereto > 위치 > 앱을 사용하는 동안으로 선택해주세요.\n권한 허용 후, 편지를 작성할 수 있습니다.")
default:
break
}
return false
}
if rootVC is LetterBoxVC {
self.controllers[0].tabBarItem = UITabBarItem.init(title: "수신함", image: UIImage.init(named: "ic_letter_box_off"), selectedImage: UIImage.init(named: "ic_letter_box_on"))
}
if rootVC is FriendListVC {
self.controllers[3].tabBarItem = UITabBarItem.init(title: "수신함", image: UIImage.init(named: "ic_friend_off"), selectedImage: UIImage.init(named: "ic_friend_on"))
self.controllers[3].tabBarItem = UITabBarItem.init(title: "친구관리", image: UIImage.init(named: "ic_friend_off"), selectedImage: UIImage.init(named: "ic_friend_on"))

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ class AddFriendCell: BaseTableViewCell {
$0.isHidden = true
}

override func prepareForReuse() {
super.prepareForReuse()
waitingLabel.isHidden = true
addBtn.isHidden = false
}


override func setup() {
backgroundColor = .clear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ class FriendControlCell: BaseTableViewCell {
$0.isHidden = true
}

override func prepareForReuse() {
super.prepareForReuse()
profileImg.image = UIImage.init(named: "image_profile_default")
waitingLabel.isHidden = true
leftBtn.isHidden = false
rightBtn.isHidden = false
}


override func setup() {
backgroundColor = .clear
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class FriendDetailVC: BaseVC {
// Bind input
friendDetailView.favoriteBtn.rx.tap.bind(to: viewModel.input.tapFavorite)
.disposed(by: disposeBag)
friendDetailView.writeBtn.rx.tap.bind(to: viewModel.input.tapWrite)
.disposed(by: disposeBag)

// Bind output
viewModel.output.enableFavorite.bind { [weak self] (isFavorite) in
Expand All @@ -57,6 +59,8 @@ class FriendDetailVC: BaseVC {
guard let self = self else { return }
AlertUtil.show(controller: self, title: title, message: message)
}.disposed(by: disposeBag)
viewModel.output.goToWrite.bind(onNext: presentWriteVC(friend:))
.disposed(by: disposeBag)
}

override func bindEvent() {
Expand All @@ -77,12 +81,9 @@ class FriendDetailVC: BaseVC {
self.viewModel.input.tapDelete.onNext(())
}
}.disposed(by: disposeBag)

friendDetailView.writeBtn.rx.tap.bind(onNext: presentWriteVC)
.disposed(by: disposeBag)
}

private func presentWriteVC() {
present(WriteVC.instance(), animated: true, completion: nil)
private func presentWriteVC(friend: Friend) {
present(WriteVC.instance(user: User(friend: friend)), animated: true, completion: nil)
}
}
Loading

0 comments on commit af9c5da

Please sign in to comment.