Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yungu0010 committed Sep 13, 2022
2 parents 07035a9 + 99e5fae commit cc35a42
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 8 deletions.
4 changes: 2 additions & 2 deletions HealthFoodMe/HealthFoodMe.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2563,7 +2563,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = HealthFoodMe/HealthFoodMe.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 202209071;
DEVELOPMENT_TEAM = FY8N9XTH66;
Expand All @@ -2589,7 +2589,7 @@
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = com.healthFoodMe.release;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "match AppStore com.healthFoodMe.release";
PROVISIONING_PROFILE_SPECIFIER = "match Development com.healthFoodMe.release";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ struct SocialLoginEntity: Codable {

// MARK: - User
struct User: Codable {
let id, name, email, agent: String
let id, name, agent: String
let email: String?

enum CodingKeys: String, CodingKey {
case id = "_id"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ extension MainInfoTVC {
distanceLabel.text = "\(data.restaurant.distance)m"
}
self.expandableData = data.restaurant.toDomain()
print(self.expandableData)

initialReload()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import UIKit

import SnapKit
import MessageUI
import KakaoSDKUser

enum HamburgerType {
case editName
Expand Down Expand Up @@ -431,19 +432,48 @@ extension HamburgerBarVC {
self.makeAlert(alertType: .logoutAlert,
title: I18N.HelfmeAlert.logout,
subtitle: I18N.HelfmeAlert.logoutContent) {
let loginVC = ModuleFactory.resolve().makeLoginVC()
UserManager.shared.clearUserInform()
self.navigationController?.pushViewController(loginVC, animated: true)
if UserManager.shared.isAppleLoginned {

} else {
self.logoutWithKakao()
}
}
}

[needLoginButton, needLoginImageButton].forEach {
$0.press {
self.presentSocialLoginAlert()
self.presentSocialLoginVC()
}
}
}

private func logoutWithKakao() {
UserApi.shared.logout {(error) in
if let error = error {
print(error)
}
else {
print("카카오 로그아웃 완료")
UserManager.shared.clearUserInform()
self.pushSocialLoginVC()
}
}
}

private func presentSocialLoginVC() {
let rootViewController = ModuleFactory.resolve().makeLoginVC()
let navigation = UINavigationController(rootViewController: rootViewController)
navigation.isNavigationBarHidden = true
navigation.modalTransitionStyle = .crossDissolve
navigation.modalPresentationStyle = .fullScreen
self.present(navigation, animated: true)
}

private func pushSocialLoginVC() {
let loginVC = ModuleFactory.resolve().makeLoginVC()
self.navigationController?.pushViewController(loginVC, animated: true)
}

private func presentSocialLoginAlert() {
let alert = ModuleFactory.resolve().makeHelfmeLoginAlertVC()
alert.modalPresentationStyle = .overFullScreen
Expand Down

0 comments on commit cc35a42

Please sign in to comment.