From 30ceb35a44d308eb256726bd27759c27adf8aaa3 Mon Sep 17 00:00:00 2001 From: gme_2 Date: Fri, 22 Feb 2019 16:08:02 +0900 Subject: [PATCH] jailbreak test added --- GMERemittance/AppDelegate.swift | 2 +- .../View/SplashScreenViewController.swift | 9 +++ .../xcschemes/DTTJailbreakDetection.xcscheme | 80 +++++++++++++++++++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 Pods/Pods.xcodeproj/xcshareddata/xcschemes/DTTJailbreakDetection.xcscheme diff --git a/GMERemittance/AppDelegate.swift b/GMERemittance/AppDelegate.swift index 211840b9..3ba731d5 100644 --- a/GMERemittance/AppDelegate.swift +++ b/GMERemittance/AppDelegate.swift @@ -44,7 +44,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD IQKeyboardManager.shared.enable = true FirebaseApp.configure() Fabric.with([Crashlytics.self]) - + Fabric.sharedSDK().debug = true Messaging.messaging().delegate = self registerForNotification(application: application) diff --git a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift index e124ef08..7a29427a 100644 --- a/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift +++ b/GMERemittance/Module/SplashScreen/User Interface/View/SplashScreenViewController.swift @@ -10,6 +10,7 @@ import UIKit import LTMorphingLabel import Localize_Swift +import DTTJailbreakDetection class SplashScreenViewController: UIViewController { @@ -99,6 +100,7 @@ class SplashScreenViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() + checkJailBreak() self.setup() } @@ -117,6 +119,13 @@ class SplashScreenViewController: UIViewController { } // MARK: IBActions + private func checkJailBreak() { + if (DTTJailbreakDetection.isJailbroken()) { + self.alert(message: "Your device is jail broken.", title: "Alert!") { + exit(0) + } + } + } @IBAction func login(_ sender: UIButton) { self.presenter?.login() diff --git a/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DTTJailbreakDetection.xcscheme b/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DTTJailbreakDetection.xcscheme new file mode 100644 index 00000000..c5bb2cb3 --- /dev/null +++ b/Pods/Pods.xcodeproj/xcshareddata/xcschemes/DTTJailbreakDetection.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +