Skip to content

Commit

Permalink
Add user email, name in crashlytics key [#72]
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunghee2 committed Apr 7, 2020
1 parent ac37361 commit d74806d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions MindGarden.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -923,15 +923,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = MindGarden/MindGarden.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 89U4T49H8F;
INFOPLIST_FILE = "$(SRCROOT)/MindGarden/Resources/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = sopt.MindGarden;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand All @@ -946,14 +946,14 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = MindGarden/MindGarden.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 89U4T49H8F;
INFOPLIST_FILE = "$(SRCROOT)/MindGarden/Resources/Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = sopt.MindGarden;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
Expand Down
3 changes: 3 additions & 0 deletions MindGarden/Sources/ViewControllers/Auth/EmailLoginVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import UIKit
import Firebase

class EmailLoginVC: UIViewController {

Expand Down Expand Up @@ -79,6 +80,8 @@ class EmailLoginVC: UIViewController {
UserDefaults.standard.set(data.email, forKey: "email")
UserDefaults.standard.set(data.name, forKey: "name")

Crashlytics.sharedInstance().setUserIdentifier(data.email)

if UserDefaults.standard.bool(forKey: "암호 설정") {
let dvc = UIStoryboard(name: "Lock", bundle: nil).instantiateViewController(withIdentifier: "LockVC") as! LockVC

Expand Down
5 changes: 5 additions & 0 deletions MindGarden/Sources/ViewControllers/Auth/LoginVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import UIKit
import WebKit
import NVActivityIndicatorView
import AuthenticationServices
import Firebase

class LoginVC: UIViewController, UIScrollViewDelegate, NVActivityIndicatorViewable {

Expand Down Expand Up @@ -155,6 +156,8 @@ extension LoginVC: WKNavigationDelegate {

UserDefaults.standard.set(kakao.data![0].name, forKey: "name")

Crashlytics.sharedInstance().setUserName(kakao.data![0].name)

if UserDefaults.standard.bool(forKey: "암호 설정") {
let dvc = UIStoryboard(name: "Lock", bundle: nil).instantiateViewController(withIdentifier: "LockVC") as! LockVC

Expand Down Expand Up @@ -206,6 +209,8 @@ extension LoginVC: ASAuthorizationControllerDelegate {
UserDefaults.standard.set(data.email, forKey: "email")
UserDefaults.standard.set(data.name, forKey: "name")

Crashlytics.sharedInstance().setUserIdentifier(data.email)

if UserDefaults.standard.bool(forKey: "암호 설정") {
let dvc = UIStoryboard(name: "Lock", bundle: nil).instantiateViewController(withIdentifier: "LockVC") as! LockVC

Expand Down

0 comments on commit d74806d

Please sign in to comment.