Sfoglia il codice sorgente

memisahkan security shield dari library NexilisLite

alqindiirsyam 9 mesi fa
parent
commit
b72112cf90
26 ha cambiato i file con 3236 aggiunte e 234 eliminazioni
  1. 36 0
      appbuilder-ios/NexilisLite/NexilisLite.xcodeproj/project.pbxproj
  2. 49 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/APIS.swift
  3. 30 197
      appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift
  4. 20 35
      appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift
  5. 3 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ConfigureFloatingButton.swift
  6. 10 2
      appbuilder-ios/NexilisLite/Podfile.lock
  7. 430 0
      appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.pbxproj
  8. 7 0
      appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  9. BIN
      appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate
  10. 14 0
      appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/xcuserdata/akhmadalqindiirsyam.xcuserdatad/xcschemes/xcschememanagement.plist
  11. 10 0
      appbuilder-ios/NexilisUC/NexilisUC.xcworkspace/contents.xcworkspacedata
  12. BIN
      appbuilder-ios/NexilisUC/NexilisUC.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate
  13. 13 0
      appbuilder-ios/NexilisUC/NexilisUC/NexilisUC.docc/NexilisUC.md
  14. 18 0
      appbuilder-ios/NexilisUC/NexilisUC/NexilisUC.h
  15. 11 0
      appbuilder-ios/NexilisUC/Podfile
  16. 11 0
      appbuilder-ios/StreamShield/Podfile
  17. 29 0
      appbuilder-ios/StreamShield/StreamShield.podspec
  18. 429 0
      appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.pbxproj
  19. 7 0
      appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  20. BIN
      appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate
  21. 14 0
      appbuilder-ios/StreamShield/StreamShield.xcodeproj/xcuserdata/akhmadalqindiirsyam.xcuserdatad/xcschemes/xcschememanagement.plist
  22. 10 0
      appbuilder-ios/StreamShield/StreamShield.xcworkspace/contents.xcworkspacedata
  23. BIN
      appbuilder-ios/StreamShield/StreamShield.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate
  24. 2054 0
      appbuilder-ios/StreamShield/StreamShield/Source/SecurityShield.swift
  25. 13 0
      appbuilder-ios/StreamShield/StreamShield/StreamShield.docc/StreamShield.md
  26. 18 0
      appbuilder-ios/StreamShield/StreamShield/StreamShield.h

+ 36 - 0
appbuilder-ios/NexilisLite/NexilisLite.xcodeproj/project.pbxproj

@@ -922,6 +922,7 @@
 				CD1E6E652A0B7C3600BF871F /* Frameworks */,
 				CD1E6E662A0B7C3600BF871F /* Resources */,
 				CD469E162A0CA6C9009E4C87 /* Embed Frameworks */,
+				8AAD5983270D60FA6E83E243 /* [CP] Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -942,6 +943,7 @@
 				CD1E6E6F2A0B7C3600BF871F /* Frameworks */,
 				CD1E6E702A0B7C3600BF871F /* Resources */,
 				4F5225633948FBBD91B685DF /* [CP] Embed Pods Frameworks */,
+				9F981D87EBB57648E606B829 /* [CP] Copy Pods Resources */,
 			);
 			buildRules = (
 			);
@@ -1203,6 +1205,40 @@
 			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;
 		};
+		8AAD5983270D60FA6E83E243 /* [CP] Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-NexilisLite/Pods-NexilisLite-resources-${CONFIGURATION}-input-files.xcfilelist",
+			);
+			name = "[CP] Copy Pods Resources";
+			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-NexilisLite/Pods-NexilisLite-resources-${CONFIGURATION}-output-files.xcfilelist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NexilisLite/Pods-NexilisLite-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+		9F981D87EBB57648E606B829 /* [CP] Copy Pods Resources */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-NexilisLite-NexilisLiteTests/Pods-NexilisLite-NexilisLiteTests-resources-${CONFIGURATION}-input-files.xcfilelist",
+			);
+			name = "[CP] Copy Pods Resources";
+			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-NexilisLite-NexilisLiteTests/Pods-NexilisLite-NexilisLiteTests-resources-${CONFIGURATION}-output-files.xcfilelist",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NexilisLite-NexilisLiteTests/Pods-NexilisLite-NexilisLiteTests-resources.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */

+ 49 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/APIS.swift

@@ -735,6 +735,55 @@ public class APIS: NSObject {
         }
     }
     
+    public static func changeUsername(uname: String) {
+        let isChangeProfile = Utils.getSetProfile()
+        if !isChangeProfile {
+            APIS.showChangeProfile()
+            return
+        }
+        let finalUname = uname.replacingOccurrences(of: "[\\n\\r\\t~%()\"]", with: "", options: .regularExpression)
+        if finalUname == User.getData(pin: User.getMyPin())?.fullName {
+            UIApplication.shared.visibleViewController?.view.makeToast("102:Duplicate username".localized(), duration: 2)
+            return
+        }
+        if finalUname.count == 0 {
+            UIApplication.shared.visibleViewController?.view.makeToast("103:Username is empty".localized(), duration: 2)
+            return
+        }
+        if finalUname.count < 3 {
+            UIApplication.shared.visibleViewController?.view.makeToast("104:Username length is too short".localized(), duration: 2)
+            return
+        }
+        let a = finalUname.split(separator: " ", maxSplits: 1)
+        let first = String(a[0])
+        let last = a.count == 2 ? String(a[1]) : ""
+        DispatchQueue.global().async {
+            if let resp = Nexilis.writeAndWait(message: CoreMessage_TMessageBank.getChangePersonInfoName(firstname: first, lastname: last)) {
+                if resp.isOk() {
+                    Database.shared.database?.inTransaction({ fmdb, rollback in
+                        _ = Database.shared.updateRecord(fmdb: fmdb, table: "BUDDY", cvalues: ["first_name": first , "last_name": last], _where: "f_pin = '\(User.getMyPin())'")
+                    })
+                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "updateFifthTab"), object: nil, userInfo: nil)
+                    DispatchQueue.main.async {
+                        Nexilis.hideLoader {
+                            let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
+                            imageView.tintColor = .white
+                            let banner = FloatingNotificationBanner(title: "Successfully changed name".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
+                            banner.show()
+                        }
+                    }
+                } else if resp.getBody(key: CoreMessage_TMessageKey.ERRCOD, default_value: "99") == "1a" {
+                    DispatchQueue.main.async {
+                        let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                        imageView.tintColor = .white
+                        let banner = FloatingNotificationBanner(title: "Username has been registered, please use another name".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
+                        banner.show()
+                    }
+                }
+            }
+        }
+    }
+    
     public static func openMail() {
         Nexilis.openmailAction()
     }

+ 30 - 197
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -333,133 +333,6 @@ public class Nexilis: NSObject {
         }
     }
     
-    private static func isDebuggerAttached() -> Bool {
-        var name = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
-        var info = kinfo_proc()
-        var infoSize = MemoryLayout<kinfo_proc>.stride
-
-        let success = name.withUnsafeMutableBytes { (namePointer: UnsafeMutableRawBufferPointer) -> Bool in
-            guard let baseAddress = namePointer.baseAddress else {
-                return false
-            }
-            return sysctl(UnsafeMutablePointer<Int32>(baseAddress.assumingMemoryBound(to: Int32.self)), 4, &info, &infoSize, nil, 0) == 0
-        }
-
-        return success && (info.kp_proc.p_flag & P_TRACED) != 0
-    }
-    
-    private static func checkForBreakpoints() -> Bool {
-        #if arch(arm64) || arch(i386) || arch(x86_64)
-        var result: Int = 0
-        var bpt = 0xCC // x86/x64 breakpoint instruction
-
-        result = Int(bitPattern: UnsafeMutableRawPointer(mutating: &bpt))
-
-        return result == bpt
-        #else
-        return false
-        #endif
-    }
-    
-    private static func checkForDebuggerEnvironment() -> Bool {
-        let debuggerEnvVars = ["DYLD_INSERT_LIBRARIES", "DYLD_LIBRARY_PATH", "DYLD_FRAMEWORK_PATH"]
-        for varName in debuggerEnvVars {
-            if let value = getenv(varName), String(cString: value).isEmpty == false {
-                return true
-            }
-        }
-        return false
-    }
-    
-    private static func checkingDebuggerDetected() -> Bool {
-        if Utils.getCheckDebugger(){
-            UIApplication.shared.visibleViewController?.view.makeToast("123:Debugging detected".localized(), duration: 2)
-            return isDebuggerAttached() || checkForBreakpoints() || checkForDebuggerEnvironment()
-        }
-        return false
-    }
-    
-    private static func checkingEmulator() -> Bool {
-        if Utils.getCheckEmulator() {
-            #if arch(i386) || arch(x86_64)
-                UIApplication.shared.visibleViewController?.view.makeToast("121:Emulator detected".localized(), duration: 2)
-                return true
-            #else
-            #endif
-        }
-        return false
-    }
-    
-    private static func checkingRooted() -> Bool {
-        if Utils.getCheckRooted() {
-            #if arch(i386) || arch(x86_64)
-            return false
-            #else
-            let fileManager = FileManager.default
-            if fileManager.fileExists(atPath: "/Applications/Cydia.app") ||
-                fileManager.fileExists(atPath: "/Library/MobileSubstrate/MobileSubstrate.dylib") ||
-                fileManager.fileExists(atPath: "/bin/bash") ||
-                fileManager.fileExists(atPath: "/usr/sbin/sshd") ||
-                fileManager.fileExists(atPath: "/etc/apt") ||
-                fileManager.fileExists(atPath: "/private/var/lib/apt/") ||
-                fileManager.fileExists(atPath: "/Applications/FakeApp.app") {
-                UIApplication.shared.visibleViewController?.view.makeToast("126:Device is jailbroken".localized(), duration: 2)
-                return true
-            }
-            #endif
-        }
-        return false
-    }
-    
-    private static var screen: UIView!
-    @objc static func preventScreenRecording() {
-        let isCaptured = UIScreen.main.isCaptured
-        //print("isCaptured: \(isCaptured)")
-        if isCaptured {
-            blurScreen()
-        }
-        else {
-            removeBlurScreen()
-        }
-    }
-
-    private static func blurScreen(style: UIBlurEffect.Style = UIBlurEffect.Style.regular) {
-        screen = UIScreen.main.snapshotView(afterScreenUpdates: false)
-        let blurEffect = UIBlurEffect(style: style)
-        let blurBackground = UIVisualEffectView(effect: blurEffect)
-        screen.addSubview(blurBackground)
-        blurBackground.frame = (screen.frame)
-        if let window = UIApplication.shared.windows.first {
-            window.addSubview(screen)
-        } else {
-            //print("window nil")
-        }
-    }
-
-    private static func removeBlurScreen() {
-        screen?.removeFromSuperview()
-    }
-    
-    private static func makeSecure(window: UIWindow) {
-        let field = UITextField()
-
-        let view = UIView(frame: CGRect(x: 0, y: 0, width: field.frame.self.width, height: field.frame.self.height))
-
-        let image = UIImageView(image: UIImage.imageWithColor(color: .black, size: CGSize(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)))
-        image.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
-
-        field.isSecureTextEntry = true
-
-        window.addSubview(field)
-        view.addSubview(image)
-
-        window.layer.superlayer?.addSublayer(field.layer)
-        field.layer.sublayers?.last!.addSublayer(window.layer)
-
-        field.leftView = view
-        field.leftViewMode = .always
-    }
-    
     public static func addFB(viewController: UIViewController, fromMAB: Bool) {
         if let keyWindow = UIApplication.shared.windows.first(where: { $0.isKeyWindow }) {
             keyWindow.addSubview(floatingButton)
@@ -589,9 +462,6 @@ public class Nexilis: NSObject {
                                 if jsonData["logout"]! != nil {
                                     jsonFA["logout"] = jsonData["logout"]!
                                 }
-                                if jsonData["multiple_login"]! != nil {
-                                    jsonFA["multiple_login"] = jsonData["multiple_login"]!
-                                }
                                 if jsonData["online_seminar"]! != nil {
                                     jsonFA["online_seminar"] = jsonData["online_seminar"]!
                                 }
@@ -613,9 +483,6 @@ public class Nexilis: NSObject {
                                 if jsonData["change_profile_photo"]! != nil {
                                     jsonFA["change_profile_photo"] = jsonData["change_profile_photo"]!
                                 }
-                                if jsonData["behaviour_analysis"]! != nil {
-                                    jsonFA["behaviour_analysis"] = jsonData["behaviour_analysis"]!
-                                }
                                 if jsonData["instant_messaging"]! != nil {
                                     jsonFA["instant_messaging"] = jsonData["instant_messaging"]!
                                 }
@@ -632,35 +499,6 @@ public class Nexilis: NSObject {
                                     Utils.setMaxRetryTimeUpload(value: "\(umt ?? 0)")
                                     jsonFA["upload_max_time"] = jsonData["upload_max_time"]!
                                 }
-                                if jsonData["check_rooted_device"]! != nil {
-                                    let checkRooted = jsonData["check_rooted_device"] as? String
-                                    Utils.setCheckRooted(b: checkRooted == "1")
-                                    jsonFA["check_rooted_device"] = jsonData["check_rooted_device"]!
-                                }
-                                if jsonData["check_emulator"]! != nil {
-                                    let checkEmu = jsonData["check_emulator"] as? String
-                                    Utils.setCheckEmulator(b: checkEmu == "1")
-                                    jsonFA["check_emulator"] = jsonData["check_emulator"]!
-                                }
-                                if jsonData["check_malware"]! != nil {
-                                    jsonFA["check_malware"] = jsonData["check_malware"]!
-                                }
-                                if jsonData["check_usb_debugging"]! != nil {
-                                    let checkDebug = jsonData["check_usb_debugging"] as? String
-                                    Utils.setCheckDebugger(b: checkDebug == "1")
-                                    jsonFA["check_usb_debugging"] = jsonData["check_usb_debugging"]!
-                                }
-                                if jsonData["check_screen_capture"]! != nil {
-                                    let checkScreenCapt = jsonData["check_screen_capture"] as? String
-                                    Utils.setCheckScreenCapture(b: checkScreenCapt == "1")
-                                    jsonFA["check_screen_capture"] = jsonData["check_screen_capture"]!
-                                }
-                                if jsonData["check_cloned_app"]! != nil {
-                                    jsonFA["check_cloned_app"] = jsonData["check_cloned_app"]!
-                                }
-                                if jsonData["check_call_forwarding"]! != nil {
-                                    jsonFA["check_call_forwarding"] = jsonData["check_call_forwarding"]!
-                                }
                                 if jsonData["show_security_shield_dialog"]! != nil {
                                     jsonFA["show_security_shield_dialog"] = jsonData["show_security_shield_dialog"]!
                                 }
@@ -676,29 +514,43 @@ public class Nexilis: NSObject {
                                 if jsonData["secure_folder"]! != nil {
                                     jsonFA["secure_folder"] = jsonData["secure_folder"]!
                                 }
-                                if jsonData["check_sim_swap"]! != nil {
-                                    jsonFA["check_sim_swap"] = jsonData["check_sim_swap"]!
+                                if jsonData["ls_broadcast_type"]! != nil {
+                                    jsonFA["ls_broadcast_type"] = jsonData["ls_broadcast_type"]!
                                 }
-                                if jsonData["check_screen_casting"]! != nil {
-                                    jsonFA["check_screen_casting"] = jsonData["check_screen_casting"]!
+                                if jsonData["force_exit"]! != nil {
+                                    jsonFA["force_exit"] = jsonData["force_exit"]!
                                 }
-                                if jsonData["check_keylogger"]! != nil {
-                                    jsonFA["check_keylogger"] = jsonData["check_keylogger"]!
+                                if jsonData["periodic_worker"]! != nil {
+                                    jsonFA["periodic_worker"] = jsonData["periodic_worker"]!
                                 }
-                                if jsonData["check_sideloaded_app"]! != nil {
-                                    jsonFA["check_sideloaded_app"] = jsonData["check_sideloaded_app"]!
+                                if jsonData["cc_instant_messaging"]! != nil {
+                                    jsonFA["cc_instant_messaging"] = jsonData["cc_instant_messaging"]!
                                 }
-                                if jsonData["check_outdated_os"]! != nil {
-                                    jsonFA["check_outdated_os"] = jsonData["check_outdated_os"]!
+                                if jsonData["cc_audio_call"]! != nil {
+                                    jsonFA["cc_audio_call"] = jsonData["cc_audio_call"]!
                                 }
-                                if jsonData["minimum_android_version"]! != nil {
-                                    jsonFA["minimum_android_version"] = jsonData["minimum_android_version"]!
+                                if jsonData["cc_video_call"]! != nil {
+                                    jsonFA["cc_video_call"] = jsonData["cc_video_call"]!
                                 }
-                                if jsonData["application_backup_detection"]! != nil {
-                                    jsonFA["application_backup_detection"] = jsonData["application_backup_detection"]!
+                                if jsonData["cc_smartbot"]! != nil {
+                                    jsonFA["cc_smartbot"] = jsonData["cc_smartbot"]!
                                 }
-                                if jsonData["ls_broadcast_type"]! != nil {
-                                    jsonFA["ls_broadcast_type"] = jsonData["ls_broadcast_type"]!
+                                if jsonData["cc_email"]! != nil {
+                                    jsonFA["cc_email"] = jsonData["cc_email"]!
+                                }
+                                if jsonData["cc_sms"]! != nil {
+                                    jsonFA["cc_sms"] = jsonData["cc_sms"]!
+                                }
+                                if jsonData["cc_gsm_call"]! != nil {
+                                    jsonFA["cc_gsm_call"] = jsonData["cc_gsm_call"]!
+                                }
+                                if jsonData["cc_whatsapp"]! != nil {
+                                    jsonFA["cc_whatsapp"] = jsonData["cc_whatsapp"]!
+                                }
+                                if jsonData["default_fb"]! != nil {
+                                    if !Utils.getAfterConfigFB() {
+                                        Utils.setConfigModeFB(value: jsonData["default_fb"] as! String)
+                                    }
                                 }
                             }
                             if let convertJsonFA = try? JSONSerialization.data(withJSONObject: jsonFA, options: .prettyPrinted) {
@@ -710,25 +562,6 @@ public class Nexilis: NSObject {
                         }
                     }
                 }
-                if Utils.getCheckScreenCapture() {
-                    NotificationCenter.default.addObserver(self, selector: #selector(preventScreenRecording), name: UIScreen.capturedDidChangeNotification, object: nil)
-                    DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
-                        if let window = UIApplication.shared.windows.first {
-                            makeSecure(window: window)
-                        }
-                    })
-                }
-                if checkingEmulator() {
-                    DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
-                        exit(0)
-                    })
-                }
-                
-                if checkingRooted() {
-                    DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
-                        exit(0)
-                    })
-                }
             }
         })
     }

+ 20 - 35
appbuilder-ios/NexilisLite/NexilisLite/Source/Utils.swift

@@ -162,6 +162,14 @@ public final class Utils {
         UserDefaults.standard.string(forKey: "fb_config_mode") ?? "1"
     }
     
+    static func setAfterConfigFB(value: Bool) {
+        UserDefaults.standard.set(value, forKey: "after_fb_config_mode")
+    }
+    
+    static func getAfterConfigFB() -> Bool {
+        UserDefaults.standard.bool(forKey: "after_fb_config_mode")
+    }
+    
     static func setCookiesMobile(value: String) {
         UserDefaults.standard.set(value, forKey: "cookies_mobile")
     }
@@ -776,41 +784,18 @@ public final class Utils {
         }
     }
     
-    public static var bCheckEmulator = false
-    public static var bCheckRooted = false
-    public static var bPreventScreenCapture = false
-    public static var bCheckDebug = false
-    
-    public static func setCheckDebugger(b: Bool) {
-        UserDefaults.standard.set(b, forKey: "pb_check_debugging")
-    }
-
-    public static func getCheckDebugger() -> Bool {
-        UserDefaults.standard.object(forKey: "pb_check_debugging") as? Bool ?? bCheckDebug
-    }
-    
-    public static func setCheckEmulator(b: Bool) {
-        UserDefaults.standard.set(b, forKey: "pb_check_emulator")
-    }
-
-    public static func getCheckEmulator() -> Bool {
-        UserDefaults.standard.object(forKey: "pb_check_emulator") as? Bool ?? bCheckEmulator
-    }
-    
-    public static func setCheckRooted(b: Bool) {
-        UserDefaults.standard.set(b, forKey: "pb_check_rooted")
-    }
-
-    public static func getCheckRooted() -> Bool {
-        UserDefaults.standard.object(forKey: "pb_check_rooted") as? Bool ?? bCheckRooted
-    }
-    public static func setCheckScreenCapture(b: Bool) {
-        UserDefaults.standard.set(b, forKey: "pb_prevent_screen_capture")
-    }
-
-    public static func getCheckScreenCapture() -> Bool {
-        UserDefaults.standard.object(forKey: "pb_prevent_screen_capture") as? Bool ?? bPreventScreenCapture
-    }
+    public static let ERR83 = "83:App Name is null".localized()
+    public static let ERR97 = "97:Account is empty".localized()
+    public static let ERR91 = "91:Service not implemented".localized()
+    public static let ERR96 = "96:Activity is null".localized()
+    public static let ERR23 = "23:Unsupported Android Version".localized()
+    public static let ERR101 = "101:Unable to access server. Check your connection and try again later".localized()
+    public static let ERR00 = "00:Success".localized()
+    public static let ERR85 = "85:You must Sign In or Sign Up to use this feature".localized()
+    public static let ERR106 = "106:Illegal State. Be sure call API connect and #callback state onSuccess called".localized()
+    public static let ERR92 = "92:Username is empty".localized()
+    public static let ERR90 = "90:Invalid Api, you already set userName in API connect".localized()
+    public static let ERR84 = "84:Feature Disabled".localized()
     
     public static func setConnectionID(value: String) {
         UserDefaults.standard.set(value, forKey: "connection_id")

+ 3 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ConfigureFloatingButton.swift

@@ -112,6 +112,9 @@ public class ConfigureFloatingButton: UIViewController {
     
     @objc func setFB() {
         Utils.setConfigModeFB(value: chosenMode)
+        if !Utils.getAfterConfigFB() {
+            Utils.setAfterConfigFB(value: true)
+        }
         DispatchQueue.main.async {
             Nexilis.floatingButton.removeFromSuperview()
             Nexilis.floatingButton = FloatingButton()

+ 10 - 2
appbuilder-ios/NexilisLite/Podfile.lock

@@ -13,6 +13,8 @@ PODS:
     - SDWebImage/Core (= 5.15.8)
   - SDWebImage/Core (5.15.8)
   - SnapKit (5.0.1)
+  - StreamShield (1.0.0):
+    - nuSDKService (~> 3.0.1)
   - SwiftLinkPreview (3.4.0)
   - Toast-Swift (5.0.1)
   - ZIPFoundation (0.9.16)
@@ -24,6 +26,7 @@ DEPENDENCIES:
   - nuSDKService (~> 3.0.1)
   - Popover
   - SDWebImage (~> 5.15.7)
+  - StreamShield (from `../StreamShield`)
   - SwiftLinkPreview (~> 3.4.0)
   - Toast-Swift (~> 5.0.1)
   - ZIPFoundation (~> 0.9.16)
@@ -42,6 +45,10 @@ SPEC REPOS:
     - Toast-Swift
     - ZIPFoundation
 
+EXTERNAL SOURCES:
+  StreamShield:
+    :path: "../StreamShield"
+
 SPEC CHECKSUMS:
   Alamofire: 3ca42e259043ee0dc5c0cdd76c4bc568b8e42af7
   FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
@@ -51,10 +58,11 @@ SPEC CHECKSUMS:
   Popover: 10e1d9528f81d9504df984b7b3f491292bc1822d
   SDWebImage: cb032eba469c54e0000e78bcb0a13cdde0a52798
   SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
+  StreamShield: d8a51630dacbbe265e07a63eedbeab2d10a854a1
   SwiftLinkPreview: c1bc5b2cb3cd42f2865137c1a61f5d788dcf5c9c
   Toast-Swift: 9b6a70f28b3bf0b96c40d46c0c4b9d6639846711
   ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced
 
-PODFILE CHECKSUM: 8e37cf934cf8e7abd1274d0c577e088ae650cadb
+PODFILE CHECKSUM: 27adc0c25cc42fc4cfea1cfb775c7843699b6a43
 
-COCOAPODS: 1.15.2
+COCOAPODS: 1.16.1

+ 430 - 0
appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.pbxproj

@@ -0,0 +1,430 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 77;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		848F295867F89EF07E445298 /* Pods_NexilisUC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BA44B02CE2023D1FF3B74C2B /* Pods_NexilisUC.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		3F3595946F4D409B95F3A606 /* Pods-NexilisUC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NexilisUC.debug.xcconfig"; path = "Target Support Files/Pods-NexilisUC/Pods-NexilisUC.debug.xcconfig"; sourceTree = "<group>"; };
+		ADED97B3FBDC598A69C69EFA /* Pods-NexilisUC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NexilisUC.release.xcconfig"; path = "Target Support Files/Pods-NexilisUC/Pods-NexilisUC.release.xcconfig"; sourceTree = "<group>"; };
+		BA44B02CE2023D1FF3B74C2B /* Pods_NexilisUC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NexilisUC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		CDB6D8182CD47C4100615C4D /* NexilisUC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NexilisUC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
+		CDB6D81F2CD47C4100615C4D /* Exceptions for "NexilisUC" folder in "NexilisUC" target */ = {
+			isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
+			publicHeaders = (
+				NexilisUC.h,
+			);
+			target = CDB6D8172CD47C4100615C4D /* NexilisUC */;
+		};
+/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+		CDB6D81A2CD47C4100615C4D /* NexilisUC */ = {
+			isa = PBXFileSystemSynchronizedRootGroup;
+			exceptions = (
+				CDB6D81F2CD47C4100615C4D /* Exceptions for "NexilisUC" folder in "NexilisUC" target */,
+			);
+			path = NexilisUC;
+			sourceTree = "<group>";
+		};
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		CDB6D8152CD47C4100615C4D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				848F295867F89EF07E445298 /* Pods_NexilisUC.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		51BD05B33018AC36093D2F17 /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				3F3595946F4D409B95F3A606 /* Pods-NexilisUC.debug.xcconfig */,
+				ADED97B3FBDC598A69C69EFA /* Pods-NexilisUC.release.xcconfig */,
+			);
+			name = Pods;
+			path = Pods;
+			sourceTree = "<group>";
+		};
+		B38414CAA9B29F5FDD57D644 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				BA44B02CE2023D1FF3B74C2B /* Pods_NexilisUC.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		CDB6D80E2CD47C4100615C4D = {
+			isa = PBXGroup;
+			children = (
+				CDB6D81A2CD47C4100615C4D /* NexilisUC */,
+				CDB6D8192CD47C4100615C4D /* Products */,
+				51BD05B33018AC36093D2F17 /* Pods */,
+				B38414CAA9B29F5FDD57D644 /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		CDB6D8192CD47C4100615C4D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				CDB6D8182CD47C4100615C4D /* NexilisUC.framework */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		CDB6D8132CD47C4100615C4D /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		CDB6D8172CD47C4100615C4D /* NexilisUC */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = CDB6D8202CD47C4100615C4D /* Build configuration list for PBXNativeTarget "NexilisUC" */;
+			buildPhases = (
+				E0949C5635D64C4E6825E1C0 /* [CP] Check Pods Manifest.lock */,
+				CDB6D8132CD47C4100615C4D /* Headers */,
+				CDB6D8142CD47C4100615C4D /* Sources */,
+				CDB6D8152CD47C4100615C4D /* Frameworks */,
+				CDB6D8162CD47C4100615C4D /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			fileSystemSynchronizedGroups = (
+				CDB6D81A2CD47C4100615C4D /* NexilisUC */,
+			);
+			name = NexilisUC;
+			productName = NexilisUC;
+			productReference = CDB6D8182CD47C4100615C4D /* NexilisUC.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		CDB6D80F2CD47C4100615C4D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				BuildIndependentTargetsInParallel = 1;
+				LastUpgradeCheck = 1610;
+				TargetAttributes = {
+					CDB6D8172CD47C4100615C4D = {
+						CreatedOnToolsVersion = 16.1;
+					};
+				};
+			};
+			buildConfigurationList = CDB6D8122CD47C4100615C4D /* Build configuration list for PBXProject "NexilisUC" */;
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = CDB6D80E2CD47C4100615C4D;
+			minimizedProjectReferenceProxies = 1;
+			preferredProjectObjectVersion = 77;
+			productRefGroup = CDB6D8192CD47C4100615C4D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				CDB6D8172CD47C4100615C4D /* NexilisUC */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		CDB6D8162CD47C4100615C4D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		E0949C5635D64C4E6825E1C0 /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-NexilisUC-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			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;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		CDB6D8142CD47C4100615C4D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		CDB6D8212CD47C4100615C4D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3F3595946F4D409B95F3A606 /* Pods-NexilisUC.debug.xcconfig */;
+			buildSettings = {
+				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = FR2C2CZUYZ;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = YES;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.NexilisUC;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_INSTALL_OBJC_HEADER = NO;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
+			};
+			name = Debug;
+		};
+		CDB6D8222CD47C4100615C4D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = ADED97B3FBDC598A69C69EFA /* Pods-NexilisUC.release.xcconfig */;
+			buildSettings = {
+				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = FR2C2CZUYZ;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = YES;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.NexilisUC;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_INSTALL_OBJC_HEADER = NO;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
+			};
+			name = Release;
+		};
+		CDB6D8232CD47C4100615C4D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu17;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 18.1;
+				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Debug;
+		};
+		CDB6D8242CD47C4100615C4D /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu17;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 18.1;
+				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				VALIDATE_PRODUCT = YES;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		CDB6D8122CD47C4100615C4D /* Build configuration list for PBXProject "NexilisUC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				CDB6D8232CD47C4100615C4D /* Debug */,
+				CDB6D8242CD47C4100615C4D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		CDB6D8202CD47C4100615C4D /* Build configuration list for PBXNativeTarget "NexilisUC" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				CDB6D8212CD47C4100615C4D /* Debug */,
+				CDB6D8222CD47C4100615C4D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = CDB6D80F2CD47C4100615C4D /* Project object */;
+}

+ 7 - 0
appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

BIN
appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/project.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 14 - 0
appbuilder-ios/NexilisUC/NexilisUC.xcodeproj/xcuserdata/akhmadalqindiirsyam.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>NexilisUC.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>2</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 10 - 0
appbuilder-ios/NexilisUC/NexilisUC.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:NexilisUC.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

BIN
appbuilder-ios/NexilisUC/NexilisUC.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 13 - 0
appbuilder-ios/NexilisUC/NexilisUC/NexilisUC.docc/NexilisUC.md

@@ -0,0 +1,13 @@
+# ``NexilisUC``
+
+<!--@START_MENU_TOKEN@-->Summary<!--@END_MENU_TOKEN@-->
+
+## Overview
+
+<!--@START_MENU_TOKEN@-->Text<!--@END_MENU_TOKEN@-->
+
+## Topics
+
+### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->
+
+- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->

+ 18 - 0
appbuilder-ios/NexilisUC/NexilisUC/NexilisUC.h

@@ -0,0 +1,18 @@
+//
+//  NexilisUC.h
+//  NexilisUC
+//
+//  Created by Qindi on 01/11/24.
+//
+
+#import <Foundation/Foundation.h>
+
+//! Project version number for NexilisUC.
+FOUNDATION_EXPORT double NexilisUCVersionNumber;
+
+//! Project version string for NexilisUC.
+FOUNDATION_EXPORT const unsigned char NexilisUCVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <NexilisUC/PublicHeader.h>
+
+

+ 11 - 0
appbuilder-ios/NexilisUC/Podfile

@@ -0,0 +1,11 @@
+# Uncomment the next line to define a global platform for your project
+# platform :ios, '9.0'
+
+target 'NexilisUC' do
+  # Comment the next line if you don't want to use dynamic frameworks
+  use_frameworks!
+
+  # Pods for NexilisUC
+  pod 'nuSDKService', '~> 3.0.1'
+
+end

+ 11 - 0
appbuilder-ios/StreamShield/Podfile

@@ -0,0 +1,11 @@
+# Uncomment the next line to define a global platform for your project
+# platform :ios, '9.0'
+
+target 'StreamShield' do
+  # Comment the next line if you don't want to use dynamic frameworks
+  use_frameworks!
+
+  # Pods for StreamShield
+  pod 'nuSDKService', '~> 3.0.1'
+
+end

+ 29 - 0
appbuilder-ios/StreamShield/StreamShield.podspec

@@ -0,0 +1,29 @@
+#
+#  Be sure to run `pod spec lint PalioLite.podspec' to ensure this is a
+#  valid spec and to remove all comments including this before submitting the spec.
+#
+#  To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html
+#  To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
+#
+
+Pod::Spec.new do |spec|
+  spec.name         = "StreamShield"
+  spec.version      = "1.0.0"
+  spec.summary      = "StreamShield Framework"
+  spec.description  = <<-DESC
+  StreamShield Framework, embed Security features into your mobile apps within minutes...
+                   DESC
+
+  spec.homepage     = "https://nexilis.io/"
+  spec.license      = "MIT"
+  spec.author       = { "Yayan D Wicaksono" => "ya2n.wicaksono@gmail.com" }
+  spec.ios.deployment_target = "14.0"
+  spec.source       = { :path => '.' }
+  spec.source_files = 'StreamShield/Source/**/*'
+  spec.resource_bundles = { 'StreamShield' => ['StreamShield/Resource/**/*']}
+  spec.swift_version = '5.5.1'
+  spec.dependency 'nuSDKService', '~> 3.0.1'
+  spec.ios.vendored_frameworks = "StreamShield.framework"
+  spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64', 'ENABLE_BITCODE' => 'NO' }
+  spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64', 'ENABLE_BITCODE' => 'NO' }
+end

+ 429 - 0
appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.pbxproj

@@ -0,0 +1,429 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 77;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		E5299C46943A01BDD66A98D2 /* Pods_StreamShield.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B15FD771801E3D1ED9B344E5 /* Pods_StreamShield.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+		3F590AD4DEEC6AD526F612B2 /* Pods-StreamShield.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StreamShield.release.xcconfig"; path = "Target Support Files/Pods-StreamShield/Pods-StreamShield.release.xcconfig"; sourceTree = "<group>"; };
+		9601438A561370957F2F3D83 /* Pods-StreamShield.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-StreamShield.debug.xcconfig"; path = "Target Support Files/Pods-StreamShield/Pods-StreamShield.debug.xcconfig"; sourceTree = "<group>"; };
+		B15FD771801E3D1ED9B344E5 /* Pods_StreamShield.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_StreamShield.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		CDB6D7EC2CD3553900615C4D /* StreamShield.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = StreamShield.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
+		CDB6D7F32CD3553900615C4D /* Exceptions for "StreamShield" folder in "StreamShield" target */ = {
+			isa = PBXFileSystemSynchronizedBuildFileExceptionSet;
+			publicHeaders = (
+				StreamShield.h,
+			);
+			target = CDB6D7EB2CD3553900615C4D /* StreamShield */;
+		};
+/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */
+
+/* Begin PBXFileSystemSynchronizedRootGroup section */
+		CDB6D7EE2CD3553900615C4D /* StreamShield */ = {
+			isa = PBXFileSystemSynchronizedRootGroup;
+			exceptions = (
+				CDB6D7F32CD3553900615C4D /* Exceptions for "StreamShield" folder in "StreamShield" target */,
+			);
+			path = StreamShield;
+			sourceTree = "<group>";
+		};
+/* End PBXFileSystemSynchronizedRootGroup section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		CDB6D7E92CD3553900615C4D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				E5299C46943A01BDD66A98D2 /* Pods_StreamShield.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		4DE9A009F0C99904D2388707 /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				9601438A561370957F2F3D83 /* Pods-StreamShield.debug.xcconfig */,
+				3F590AD4DEEC6AD526F612B2 /* Pods-StreamShield.release.xcconfig */,
+			);
+			path = Pods;
+			sourceTree = "<group>";
+		};
+		CDB6D7E22CD3553900615C4D = {
+			isa = PBXGroup;
+			children = (
+				CDB6D7EE2CD3553900615C4D /* StreamShield */,
+				CDB6D7ED2CD3553900615C4D /* Products */,
+				4DE9A009F0C99904D2388707 /* Pods */,
+				D950F4A0DF82B73D5E24D6BD /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		CDB6D7ED2CD3553900615C4D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				CDB6D7EC2CD3553900615C4D /* StreamShield.framework */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		D950F4A0DF82B73D5E24D6BD /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				B15FD771801E3D1ED9B344E5 /* Pods_StreamShield.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+		CDB6D7E72CD3553900615C4D /* Headers */ = {
+			isa = PBXHeadersBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+		CDB6D7EB2CD3553900615C4D /* StreamShield */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = CDB6D7F42CD3553900615C4D /* Build configuration list for PBXNativeTarget "StreamShield" */;
+			buildPhases = (
+				520EEEDB8A8B98B209F0F430 /* [CP] Check Pods Manifest.lock */,
+				CDB6D7E72CD3553900615C4D /* Headers */,
+				CDB6D7E82CD3553900615C4D /* Sources */,
+				CDB6D7E92CD3553900615C4D /* Frameworks */,
+				CDB6D7EA2CD3553900615C4D /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			fileSystemSynchronizedGroups = (
+				CDB6D7EE2CD3553900615C4D /* StreamShield */,
+			);
+			name = StreamShield;
+			productName = StreamShield;
+			productReference = CDB6D7EC2CD3553900615C4D /* StreamShield.framework */;
+			productType = "com.apple.product-type.framework";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		CDB6D7E32CD3553900615C4D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				BuildIndependentTargetsInParallel = 1;
+				LastUpgradeCheck = 1610;
+				TargetAttributes = {
+					CDB6D7EB2CD3553900615C4D = {
+						CreatedOnToolsVersion = 16.1;
+					};
+				};
+			};
+			buildConfigurationList = CDB6D7E62CD3553900615C4D /* Build configuration list for PBXProject "StreamShield" */;
+			developmentRegion = en;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = CDB6D7E22CD3553900615C4D;
+			minimizedProjectReferenceProxies = 1;
+			preferredProjectObjectVersion = 77;
+			productRefGroup = CDB6D7ED2CD3553900615C4D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				CDB6D7EB2CD3553900615C4D /* StreamShield */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		CDB6D7EA2CD3553900615C4D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		520EEEDB8A8B98B209F0F430 /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputFileListPaths = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputFileListPaths = (
+			);
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-StreamShield-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			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;
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		CDB6D7E82CD3553900615C4D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+		CDB6D7F52CD3553900615C4D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9601438A561370957F2F3D83 /* Pods-StreamShield.debug.xcconfig */;
+			buildSettings = {
+				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = FR2C2CZUYZ;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = YES;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.StreamShield;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_INSTALL_OBJC_HEADER = NO;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
+			};
+			name = Debug;
+		};
+		CDB6D7F62CD3553900615C4D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 3F590AD4DEEC6AD526F612B2 /* Pods-StreamShield.release.xcconfig */;
+			buildSettings = {
+				BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
+				CODE_SIGN_STYLE = Automatic;
+				CURRENT_PROJECT_VERSION = 1;
+				DEFINES_MODULE = YES;
+				DEVELOPMENT_TEAM = FR2C2CZUYZ;
+				DYLIB_COMPATIBILITY_VERSION = 1;
+				DYLIB_CURRENT_VERSION = 1;
+				DYLIB_INSTALL_NAME_BASE = "@rpath";
+				ENABLE_MODULE_VERIFIER = YES;
+				GENERATE_INFOPLIST_FILE = YES;
+				INFOPLIST_KEY_NSHumanReadableCopyright = "";
+				INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
+				IPHONEOS_DEPLOYMENT_TARGET = 14.0;
+				LD_RUNPATH_SEARCH_PATHS = (
+					"$(inherited)",
+					"@executable_path/Frameworks",
+					"@loader_path/Frameworks",
+				);
+				MARKETING_VERSION = 1.0;
+				MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++";
+				MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20";
+				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.StreamShield;
+				PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
+				SKIP_INSTALL = YES;
+				SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
+				SUPPORTS_MACCATALYST = NO;
+				SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO;
+				SWIFT_EMIT_LOC_STRINGS = YES;
+				SWIFT_INSTALL_OBJC_HEADER = NO;
+				SWIFT_VERSION = 5.0;
+				TARGETED_DEVICE_FAMILY = 1;
+			};
+			name = Release;
+		};
+		CDB6D7F72CD3553900615C4D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu17;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 18.1;
+				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+				MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+				MTL_FAST_MATH = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
+				SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Debug;
+		};
+		CDB6D7F82CD3553900615C4D /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_ENABLE_OBJC_WEAK = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_USER_SCRIPT_SANDBOXING = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu17;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 18.1;
+				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				MTL_FAST_MATH = YES;
+				SDKROOT = iphoneos;
+				SWIFT_COMPILATION_MODE = wholemodule;
+				VALIDATE_PRODUCT = YES;
+				VERSIONING_SYSTEM = "apple-generic";
+				VERSION_INFO_PREFIX = "";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		CDB6D7E62CD3553900615C4D /* Build configuration list for PBXProject "StreamShield" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				CDB6D7F72CD3553900615C4D /* Debug */,
+				CDB6D7F82CD3553900615C4D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		CDB6D7F42CD3553900615C4D /* Build configuration list for PBXNativeTarget "StreamShield" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				CDB6D7F52CD3553900615C4D /* Debug */,
+				CDB6D7F62CD3553900615C4D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = CDB6D7E32CD3553900615C4D /* Project object */;
+}

+ 7 - 0
appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "self:">
+   </FileRef>
+</Workspace>

BIN
appbuilder-ios/StreamShield/StreamShield.xcodeproj/project.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 14 - 0
appbuilder-ios/StreamShield/StreamShield.xcodeproj/xcuserdata/akhmadalqindiirsyam.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>SchemeUserState</key>
+	<dict>
+		<key>StreamShield.xcscheme_^#shared#^_</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>2</integer>
+		</dict>
+	</dict>
+</dict>
+</plist>

+ 10 - 0
appbuilder-ios/StreamShield/StreamShield.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:StreamShield.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

BIN
appbuilder-ios/StreamShield/StreamShield.xcworkspace/xcuserdata/akhmadalqindiirsyam.xcuserdatad/UserInterfaceState.xcuserstate


+ 2054 - 0
appbuilder-ios/StreamShield/StreamShield/Source/SecurityShield.swift

@@ -0,0 +1,2054 @@
+//
+//  SecurityShield.swift
+//  StreamShield
+//
+//  Created by Qindi on 31/10/24.
+//
+
+import Foundation
+import UIKit
+import nuSDKService
+import AVFoundation
+import AVKit
+import CoreTelephony
+
+public class SecurityShield: NSObject {
+    
+    static var dispatch: DispatchGroup?
+    
+    public static func check(appName: String, apiKey: String, activity: UIViewController) {
+        Preference.setAppId(value: appName)
+        Preference.setAccount(value: apiKey)
+        pull()
+    }
+    
+    private static func pull() {
+        let me = UserDefaults.standard.string(forKey: "me")!
+        let tmessage = TMessageSS()
+        tmessage.mCode = "SS01"
+        tmessage.mStatus = CoreMessage_TMessageUtil.getTID()
+        tmessage.mPIN = me
+        tmessage.mBodies["Api"] = Preference.getAccount()
+        tmessage.mBodies["AAN"] = Preference.getAppId()
+        tmessage.mBodies["type"] = "0"
+        DispatchQueue.global().async{
+            if let response = Service.writeSync(message: tmessage) {
+                if response.isOk() {
+                    let dataResp = response.getBody(key: "A112")
+                    print("dataResp = \(dataResp)")
+                    Process.check(dataSS: dataResp)
+                } else {
+                    Process.check(dataSS: "")
+                }
+            } else {
+                Process.check(dataSS: "")
+            }
+        }
+    }
+    
+    private static func showToast(message : String, font: UIFont = UIFont.systemFont(ofSize: 12, weight: .medium), controller: UIViewController) {
+        
+        let toastContainer = UIView(frame: CGRect())
+        toastContainer.backgroundColor = controller.traitCollection.userInterfaceStyle == .dark ? .white.withAlphaComponent(0.6) : UIColor.mainColorSS.withAlphaComponent(0.6)
+        toastContainer.alpha = 0.0
+        toastContainer.layer.cornerRadius = 25;
+        toastContainer.clipsToBounds  =  true
+        
+        let toastLabel = UILabel(frame: CGRect())
+        toastLabel.textColor = controller.traitCollection.userInterfaceStyle == .dark ? .blackDarkModeSS : UIColor.white
+        toastLabel.textAlignment = .center;
+        toastLabel.font = font
+        toastLabel.text = message
+        toastLabel.clipsToBounds  =  true
+        toastLabel.numberOfLines = 0
+        
+        toastContainer.addSubview(toastLabel)
+        controller.view.addSubview(toastContainer)
+        controller.view.bringSubviewToFront(toastContainer)
+        
+        toastLabel.translatesAutoresizingMaskIntoConstraints = false
+        toastContainer.translatesAutoresizingMaskIntoConstraints = false
+        
+        let a1 = NSLayoutConstraint(item: toastLabel, attribute: .leading, relatedBy: .equal, toItem: toastContainer, attribute: .leading, multiplier: 1, constant: 15)
+        let a2 = NSLayoutConstraint(item: toastLabel, attribute: .trailing, relatedBy: .equal, toItem: toastContainer, attribute: .trailing, multiplier: 1, constant: -15)
+        let a3 = NSLayoutConstraint(item: toastLabel, attribute: .bottom, relatedBy: .equal, toItem: toastContainer, attribute: .bottom, multiplier: 1, constant: -15)
+        let a4 = NSLayoutConstraint(item: toastLabel, attribute: .top, relatedBy: .equal, toItem: toastContainer, attribute: .top, multiplier: 1, constant: 15)
+        toastContainer.addConstraints([a1, a2, a3, a4])
+        
+        let c1 = NSLayoutConstraint(item: toastContainer, attribute: .leading, relatedBy: .equal, toItem: controller.view, attribute: .leading, multiplier: 1, constant: 65)
+        let c2 = NSLayoutConstraint(item: toastContainer, attribute: .trailing, relatedBy: .equal, toItem: controller.view, attribute: .trailing, multiplier: 1, constant: -65)
+        let c3 = NSLayoutConstraint(item: toastContainer, attribute: .bottom, relatedBy: .equal, toItem: controller.view, attribute: .bottom, multiplier: 1, constant: -75)
+        controller.view.addConstraints([c1, c2, c3])
+        
+        UIView.animate(withDuration: 0.5, delay: 0.0, options: .curveEaseIn, animations: {
+            toastContainer.alpha = 1.0
+        }, completion: { _ in
+            UIView.animate(withDuration: 0.5, delay: 1.5, options: .curveEaseOut, animations: {
+                toastContainer.alpha = 0.0
+            }, completion: {_ in
+                toastContainer.removeFromSuperview()
+            })
+        })
+    }
+}
+
+private class Process: NSObject {
+    static func check(dataSS : String) {
+        print("dataSS = \(dataSS)")
+        if !dataSS.isEmpty {
+            if let jsonArray = try? JSONSerialization.jsonObject(with: dataSS.data(using: String.Encoding.utf8)!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] {
+                do {
+                    for jsonData in jsonArray {
+                        if jsonData["check_keylogger"]! != nil {
+                            Preference.setPreventKeylogger(value: jsonData["check_keylogger"]! as! String == "1")
+                            Preference.setPreventKeyloggerAction(value: jsonData["action"]! as! String)
+                            Preference.setKeyloggerAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setKeyloggerAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_screen_capture"]! != nil {
+                            Preference.setPreventScreenCapture(value: jsonData["check_screen_capture"]! as! String == "1")
+                            Preference.setPreventScreenCaptureAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckScreenCaptureAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setScreenCaptureAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_emulator"]! != nil {
+                            Preference.setCheckEmulator(value: jsonData["check_emulator"]! as! String == "1")
+                            Preference.setCheckEmulatorAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckEmulatorAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckEmulatorAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_rooted_device"]! != nil {
+                            Preference.setCheckRooted(value: jsonData["check_rooted_device"]! as! String == "1")
+                            Preference.setCheckRootedAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckRootedAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckRootedAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_outdated_os"]! != nil {
+                            Preference.setCheckOutdatedOs(value: jsonData["check_outdated_os"]! as! String == "1")
+                            Preference.setCheckOutdatedOsAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckOutdatedOsAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckOutdatedOsAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["minimum_ios_version"]! != nil {
+                            Preference.setMinimumOsVersion(value: jsonData["minimum_ios_version"]! as! String)
+                        }
+                        if jsonData["check_sum"]! != nil {
+                            Preference.setCheckTempering(value: jsonData["check_sum"]! as! String == "1")
+                            Preference.setCheckTemperingAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckTemperingAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckTemperingAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_usb_debugging"]! != nil {
+                            Preference.setCheckDebugging(value: jsonData["check_usb_debugging"]! as! String == "1")
+                            Preference.setCheckDebuggingAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckDebuggingAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckDebuggingAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_screen_casting"]! != nil {
+                            Preference.setCheckScreenCasting(value: jsonData["check_screen_casting"]! as! String == "1")
+                            Preference.setCheckScreenCastingAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckScreenCastingAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckScreenCastingAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_screen_overlay"]! != nil {
+                            Preference.setCheckScreenOverlay(value: jsonData["check_screen_overlay"]! as! String == "1")
+                            Preference.setCheckScreenOverlayAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckScreenOverlayAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckScreenOverlayAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_call_forwarding"]! != nil {
+                            Preference.setCheckCallForward(value: jsonData["check_call_forwarding"]! as! String == "1")
+                            Preference.setCheckCallForwardAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckCallForwardAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckCallForwardAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["multiple_login"]! != nil {
+                            Preference.setCheckMultipleLogin(value: jsonData["multiple_login"]! as! String == "1")
+                            Preference.setCheckMultipleLoginAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckMultipleLoginAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckMultipleLoginAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_sim_swap"]! != nil {
+                            Preference.setCheckSimSwap(value: jsonData["check_sim_swap"]! as! String == "1")
+                            Preference.setCheckSimSwapAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckSimSwapAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckSimSwapAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["check_geovelocity"]! != nil {
+                            Preference.setCheckGeoVelocity(value: jsonData["check_geovelocity"]! as! String == "1")
+                            Preference.setCheckGeoVelocityAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckGeoVelocityAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckGeoVelocityAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        if jsonData["behavioral_analysis"]! != nil {
+                            Preference.setCheckBehaviourAnalysis(value: jsonData["behavioral_analysis"]! as! String == "1")
+                            Preference.setCheckBehaviourAnalysisAction(value: jsonData["action"]! as! String)
+                            Preference.setCheckBehaviourAnalysisAlertTitle(value: jsonData["alert_title"]! as! String)
+                            Preference.setCheckBehaviourAnalysisAlertMessage(value: jsonData["alert_message"]! as! String)
+                        }
+                        
+                    }
+                    if Preference.getPreventKeylogger() || Preference.getPreventScreenCapture() {
+                        DispatchQueue.main.async(execute: {
+                            let alert = SSLibAlertController(title: Preference.getPreventKeylogger() ? Preference.getKeyloggerAlertTitle() : Preference.getCheckScreenCaptureAlertTitle(), message: Preference.getPreventKeylogger() ? Preference.getKeyloggerAlertMessage() : Preference.getScreenCaptureAlertMessage(), preferredStyle: .alert)
+                            if Preference.getPreventKeyloggerAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE || Preference.getPreventScreenCaptureAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                                alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: {_ in 
+                                    NotificationCenter.default.addObserver(self, selector: #selector(preventScreenRecording), name: UIScreen.capturedDidChangeNotification, object: nil)
+                                    DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
+                                        if let window = UIApplication.shared.windows.first {
+                                            makeSecure(window: window)
+                                        }
+                                    })
+                                }))
+                                if UIApplication.shared.visibleViewController?.navigationController != nil {
+                                    UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                                } else {
+                                    UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                                }
+                            } else {
+                                alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                                    exit(-101)
+                                }))
+                                if UIApplication.shared.visibleViewController?.navigationController != nil {
+                                    UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                                } else {
+                                    UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                                }
+                            }
+                        })
+                    } else {
+                        if screen != nil {
+                            screen?.removeFromSuperview()
+                        }
+                    }
+                    subCheck(1)
+                } catch {
+                    
+                }
+            }
+        } else {
+            subCheck(1)
+        }
+    }
+    
+    private static var screen: UIView!
+    @objc static func preventScreenRecording() {
+        let isCaptured = UIScreen.main.isCaptured
+        //print("isCaptured: \(isCaptured)")
+        if isCaptured {
+            blurScreen()
+        }
+        else {
+            removeBlurScreen()
+        }
+    }
+
+    private static func blurScreen(style: UIBlurEffect.Style = UIBlurEffect.Style.regular) {
+        screen = UIScreen.main.snapshotView(afterScreenUpdates: false)
+        let blurEffect = UIBlurEffect(style: style)
+        let blurBackground = UIVisualEffectView(effect: blurEffect)
+        screen.addSubview(blurBackground)
+        blurBackground.frame = (screen.frame)
+        if let window = UIApplication.shared.windows.first {
+            window.addSubview(screen)
+        } else {
+            //print("window nil")
+        }
+    }
+
+    private static func removeBlurScreen() {
+        screen?.removeFromSuperview()
+    }
+    
+    private static func makeSecure(window: UIWindow) {
+        let field = UITextField()
+
+        let view = UIView(frame: CGRect(x: 0, y: 0, width: field.frame.self.width, height: field.frame.self.height))
+
+        let image = UIImageView(image: UIImage.imageWithColorSS(color: .black, size: CGSize(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)))
+        image.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
+
+        field.isSecureTextEntry = true
+
+        window.addSubview(field)
+        view.addSubview(image)
+
+        window.layer.superlayer?.addSublayer(field.layer)
+        field.layer.sublayers?.last!.addSublayer(window.layer)
+
+        field.leftView = view
+        field.leftViewMode = .always
+    }
+    
+    static func subCheck(_ typeSecurity : Int) {
+        if typeSecurity == 1 {
+            if checkEmulator() {
+                return
+            }
+            subCheck(2)
+        } else if typeSecurity == 2 {
+            if checkRootedDevice() {
+                return
+            }
+            subCheck(3)
+        } else if typeSecurity == 3 {
+            if checkOutdatedOS() {
+                return
+            }
+            subCheck(4)
+        } else if typeSecurity == 4 {
+            if checkTempering() {
+                return
+            }
+            subCheck(5)
+        } else if typeSecurity == 5 {
+            if checkDebugging() {
+                return
+            }
+            subCheck(6)
+        } else if typeSecurity == 6 {
+            NotificationCenter.default.addObserver(self, selector: #selector(screenDidConnect), name: UIScreen.didConnectNotification, object: nil)
+            NotificationCenter.default.addObserver(self, selector: #selector(screenDidDisconnect), name: UIScreen.didDisconnectNotification, object: nil)
+            if checkScreenCasting() {
+                return
+            }
+            subCheck(7)
+        } else if typeSecurity == 7 {
+            if checkScreenOverlay() {
+                return
+            }
+            subCheck(8)
+        } else if typeSecurity == 8 {
+            if checkCallForward() {
+                return
+            }
+            subCheck(9)
+        } else if typeSecurity == 9 {
+            if checkMultipleLogin() {
+                return
+            }
+            subCheck(10)
+        } else if typeSecurity == 10 {
+            if checkSimSwap() {
+                return
+            }
+            subCheck(11)
+        } else if typeSecurity == 11 {
+            if checkGeovelocity() {
+                return
+            }
+            subCheck(12)
+        } else if typeSecurity == 11 {
+            if checkBehaviourAnalysis() {
+                return
+            }
+            subCheck(12)
+        }
+    }
+    
+    static func checkEmulator() -> Bool {
+        if Preference.getCheckEmulator() && isEmulator() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckEmulatorAlertTitle(), message: Preference.getCheckEmulatorAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckEmulatorAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-101)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkRootedDevice() -> Bool {
+        if Preference.getCheckRooted() && isRooted() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckRootedAlertTitle(), message: Preference.getCheckRootedAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckRootedAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkOutdatedOS() -> Bool {
+        if Preference.getCheckOutdatedOs() {
+            let requiredVersion = Preference.getMinimumOsVersion()
+            let systemVersion = UIDevice.current.systemVersion
+            let versionComponents = systemVersion.split(separator: ".").prefix(2)
+            let versionString = versionComponents.joined(separator: ".")
+            if let currentVersion = Double(versionString),
+               let requiredVersionDouble = Double(requiredVersion) {
+                if currentVersion < requiredVersionDouble {
+                    DispatchQueue.main.async(execute: {
+                        let alert = SSLibAlertController(title: Preference.getCheckRootedAlertTitle(), message: Preference.getCheckRootedAlertMessage(), preferredStyle: .alert)
+                        if Preference.getCheckOutdatedOsAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                            alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                            if UIApplication.shared.visibleViewController?.navigationController != nil {
+                                UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                            } else {
+                                UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                            }
+                        } else {
+                            alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                                exit(-103)
+                            }))
+                            if UIApplication.shared.visibleViewController?.navigationController != nil {
+                                UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                            } else {
+                                UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                            }
+                        }
+                    })
+                    return true
+                }
+            } else {
+                print("Failed to compare versions")
+            }
+        }
+        return false
+    }
+    
+    static func checkTempering() -> Bool {
+        if Preference.getCheckTempering() && isTempering() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckTemperingAlertTitle(), message: Preference.getCheckTemperingAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckTemperingAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkDebugging() -> Bool {
+        if Preference.getCheckDebugging() && isDebugging() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckDebuggingAlertTitle(), message: Preference.getCheckDebuggingAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckDebuggingAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkScreenCasting() -> Bool {
+        if Preference.getCheckScreenCasting() && isScreenCasting() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckScreenCastingAlertTitle(), message: Preference.getCheckScreenCastingAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckScreenCastingAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkScreenOverlay() -> Bool {
+        if Preference.getCheckScreenOverlay() && isScreenOverlay() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckScreenOverlayAlertTitle(), message: Preference.getCheckScreenOverlayAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckScreenOverlayAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkCallForward() -> Bool {
+        if Preference.getCheckCallForward() && isCallForwarded() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckCallForwardAlertTitle(), message: Preference.getCheckCallForwardAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckCallForwardAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkMultipleLogin() -> Bool {
+        if Preference.getCheckMultipleLogin() && isMultipleLogin() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckMultipleLoginAlertTitle(), message: Preference.getCheckMultipleLoginAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckMultipleLoginAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkSimSwap() -> Bool {
+        if Preference.getCheckSimSwap() && isSimSwap() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckSimSwapAlertTitle(), message: Preference.getCheckSimSwapAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckSimSwapAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkGeovelocity() -> Bool {
+        if Preference.getCheckGeoVelocity() && isGeovelocityDetected() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckGeoVelocityAlertTitle(), message: Preference.getCheckGeoVelocityAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckGeoVelocityAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    static func checkBehaviourAnalysis() -> Bool {
+        if Preference.getCheckBehaviourAnalysis() && isSuspiciousBehavior() {
+            DispatchQueue.main.async(execute: {
+                let alert = SSLibAlertController(title: Preference.getCheckBehaviourAnalysisAlertTitle(), message: Preference.getCheckBehaviourAnalysisAlertMessage(), preferredStyle: .alert)
+                if Preference.getCheckBehaviourAnalysisAction() == PreferencesKey.SECURITY_SHIELD_ALERT_CONTINUE {
+                    alert.addAction(UIAlertAction(title: "OK", style: UIAlertAction.Style.default, handler: nil))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                } else {
+                    alert.addAction(UIAlertAction(title: "Exit", style: UIAlertAction.Style.default, handler: {_ in
+                        exit(-141)
+                    }))
+                    if UIApplication.shared.visibleViewController?.navigationController != nil {
+                        UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
+                    } else {
+                        UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
+                    }
+                }
+            })
+            return true
+        }
+        return false
+    }
+    
+    
+    private static func isEmulator() -> Bool {
+        let deviceName = UIDevice.current.name
+        if deviceName.contains("Simulator") {
+            return true
+        }
+        let deviceModel = UIDevice.current.model
+        if deviceModel.hasPrefix("Simulator") {
+            return true
+        }
+        let systemName = UIDevice.current.systemName
+        if systemName == "Simulator" {
+            return true
+        }
+        #if targetEnvironment(simulator)
+        return true
+        #else
+        #endif
+        return false
+    }
+    
+    private static func isRooted() -> Bool {
+        #if arch(i386) || arch(x86_64)
+        return false
+        #else
+        let fileManager = FileManager.default
+        if fileManager.fileExists(atPath: "/Applications/Cydia.app") ||
+            fileManager.fileExists(atPath: "/Library/MobileSubstrate/MobileSubstrate.dylib") ||
+            fileManager.fileExists(atPath: "/bin/bash") ||
+            fileManager.fileExists(atPath: "/usr/sbin/sshd") ||
+            fileManager.fileExists(atPath: "/etc/apt") ||
+            fileManager.fileExists(atPath: "/private/var/lib/apt/") ||
+            fileManager.fileExists(atPath: "/Applications/FakeApp.app") {
+            return true
+        }
+        #endif
+        let filePath = "/private/var/mobile/Library/Preferences/com.apple.springboard.plist"
+        if FileManager.default.fileExists(atPath: filePath) {
+            return true
+        }
+        
+        return false
+    }
+    
+    private static func isTempering() -> Bool {
+        return false
+    }
+    
+    private static func isDebugging() -> Bool {
+        var name: [Int32] = [CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()]
+        var info = kinfo_proc()
+        var size = MemoryLayout<kinfo_proc>.size
+
+        let result = sysctl(&name, UInt32(name.count), &info, &size, nil, 0)
+        
+        if result == 0 {
+            return (info.kp_proc.p_flag & P_TRACED) != 0
+        } else {
+            return false
+        }
+    }
+    
+    private static func isScreenCasting() -> Bool {
+        return checkForExternalScreen()
+    }
+    
+    @objc static func screenDidConnect(notification: Notification) {
+        _ = checkScreenCasting()
+    }
+    
+    // Called when a screen is disconnected
+    @objc static func screenDidDisconnect(notification: Notification) {
+        _ = checkScreenCasting()
+    }
+    
+    private static func checkForExternalScreen() -> Bool {
+        let screens = UIScreen.screens
+        if screens.count > 1 {
+            return true
+        } else {
+            return false
+        }
+    }
+    
+    private static func isScreenOverlay() -> Bool {
+        return false
+    }
+    
+    private static func isCallForwarded() -> Bool {
+        return false
+    }
+    
+    private static func isMultipleLogin() -> Bool {
+        return false
+    }
+    
+    private static func isSimSwap() -> Bool {
+        guard let savedSimInfo = UserDefaults.standard.dictionary(forKey: "SavedSIMInfo") as? [String: [String: String]] else {
+            let simInfo = getSIMInfo()
+            UserDefaults.standard.set(simInfo, forKey: "SavedSIMInfo")
+            return false
+        }
+        let currentSimInfo = getSIMInfo()
+        return savedSimInfo != currentSimInfo
+    }
+    
+    private static func getSIMInfo() -> [String: [String: String]] {
+        let networkInfo = CTTelephonyNetworkInfo()
+        var simData: [String: [String: String]] = [:]
+        
+        if let carriers = networkInfo.serviceSubscriberCellularProviders {
+            for (key, carrier) in carriers {
+                let carrierName = carrier.carrierName ?? "Unknown"
+                let mobileCountryCode = carrier.mobileCountryCode ?? "Unknown"
+                let mobileNetworkCode = carrier.mobileNetworkCode ?? "Unknown"
+                let isoCountryCode = carrier.isoCountryCode ?? "Unknown"
+                
+                simData[key] = [
+                    "carrierName": carrierName,
+                    "mobileCountryCode": mobileCountryCode,
+                    "mobileNetworkCode": mobileNetworkCode,
+                    "isoCountryCode": isoCountryCode
+                ]
+            }
+        }
+        return simData
+    }
+    
+    private static func isGeovelocityDetected() -> Bool {
+        return false
+    }
+    
+    private static func isSuspiciousBehavior() -> Bool {
+        return false
+    }
+}
+
+private class Service {
+    static func writeSync(message: TMessageSS, timeout: Int = 15 * 1000) -> TMessageSS? {
+        do {
+            print(">> SENDING MESSAGE >> ", message.toLogString())
+            if let data = try API.sGetResponse(sRequest: message.pack(), lTimeout: timeout, bKeepTOResp: true) {
+                let response = TMessageSS(data: data)
+                print("<< RESPONSE MESSAGE << ", response.toLogString())
+                return response
+            }
+        } catch {
+            print(error)
+        }
+        return nil
+    }
+}
+
+private class Preference {
+    static func getAppId() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_USER_APP_ID) ?? ""
+    }
+    
+    static func setAppId(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_USER_APP_ID)
+    }
+    
+    static func getAccount() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_USER_ACCOUNT) ?? ""
+    }
+    
+    static func setAccount(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_USER_ACCOUNT)
+    }
+    
+    static func getDomainOpr() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_DOMAIN_OPR) ?? "https://nexilis.io/"
+    }
+    
+    static func getIpOpr() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_IP_PORT_OPR) ?? "34.101.172.194:42823"
+    }
+    
+    /**
+     * Keylogger
+     */
+    static func setPreventKeylogger(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_KEYLOGGER)
+    }
+    
+    static func getPreventKeylogger() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_KEYLOGGER)
+    }
+    static func setPreventKeyloggerAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ACTION)
+    }
+    
+    static func getPreventKeyloggerAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ACTION) ?? "0"
+    }
+    static func setKeyloggerAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ALERT_TITLE)
+    }
+    
+    static func getKeyloggerAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ALERT_TITLE) ?? PreferencesKey.ss_screenshare_title
+    }
+    static func setKeyloggerAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ALERT_MESSAGE)
+    }
+    
+    static func getKeyloggerAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_KEYLOGGER_ALERT_MESSAGE) ?? PreferencesKey.ss_screenshare_warning
+    }
+    /**
+     * Screen Capture
+     */
+    static func setPreventScreenCapture(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE)
+    }
+    
+    static func getPreventScreenCapture() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE)
+    }
+    static func setPreventScreenCaptureAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ACTION)
+    }
+    
+    static func getPreventScreenCaptureAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ACTION) ?? "0"
+    }
+    static func setCheckScreenCaptureAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ALERT_TITLE)
+    }
+    
+    static func getCheckScreenCaptureAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ALERT_TITLE) ?? PreferencesKey.ss_screenshare_title
+    }
+    static func setScreenCaptureAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ALERT_MESSAGE)
+    }
+    
+    static func getScreenCaptureAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CAPTURE_ALERT_MESSAGE) ?? PreferencesKey.ss_screenshare_warning
+    }
+    /**
+     * Emulator
+     */
+    static func setCheckEmulator(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_EMULATOR)
+    }
+    
+    static func getCheckEmulator() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_EMULATOR)
+    }
+    static func setCheckEmulatorAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_EMULATOR_ACTION)
+    }
+    
+    static func getCheckEmulatorAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_EMULATOR_ACTION) ?? "0"
+    }
+    static func setCheckEmulatorAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_EMULATOR_ALERT_TITLE)
+    }
+    
+    static func getCheckEmulatorAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_EMULATOR_ALERT_TITLE) ?? PreferencesKey.ss_emulator_title
+    }
+    static func setCheckEmulatorAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_EMULATOR_ALERT_MESSAGE)
+    }
+    
+    static func getCheckEmulatorAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_EMULATOR_ALERT_MESSAGE) ?? PreferencesKey.ss_emulator_continue
+    }
+    
+    /**
+     * Root/Jailbreak Detection
+     */
+    static func setCheckRooted(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_ROOTED)
+    }
+    
+    static func getCheckRooted() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_ROOTED)
+    }
+    static func setCheckRootedAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_ROOTED_ACTION)
+    }
+    
+    static func getCheckRootedAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_ROOTED_ACTION) ?? "0"
+    }
+    static func setCheckRootedAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_ROOTED_ALERT_TITLE)
+    }
+    
+    static func getCheckRootedAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_ROOTED_ALERT_TITLE) ?? PreferencesKey.ss_rooted_title
+    }
+    static func setCheckRootedAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_ROOTED_ALERT_MESSAGE)
+    }
+    
+    static func getCheckRootedAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_ROOTED_ALERT_MESSAGE) ?? PreferencesKey.ss_rooted_warning
+    }
+    
+    /**
+     * Outdated OS Detection
+     */
+    static func setCheckOutdatedOs(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_OUTDATED_OS)
+    }
+    
+    static func getCheckOutdatedOs() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_OUTDATED_OS)
+    }
+    static func setCheckOutdatedOsAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_ROOTED_ACTION)
+    }
+    
+    static func getCheckOutdatedOsAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_ROOTED_ACTION) ?? "0"
+    }
+    static func setCheckOutdatedOsAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_OUTDATED_OS_ALERT_TITLE)
+    }
+    
+    static func getCheckOutdatedOsAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_OUTDATED_OS_ALERT_TITLE) ?? PreferencesKey.ss_os_not_supported_title
+    }
+    static func setCheckOutdatedOsAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_OUTDATED_OS_ALERT_MESSAGE)
+    }
+    
+    static func getCheckOutdatedOsAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_OUTDATED_OS_ALERT_MESSAGE) ?? PreferencesKey.ss_os_not_supported_continue
+    }
+    static func setMinimumOsVersion(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_MINIMUM_OS_VERSION)
+    }
+    
+    static func getMinimumOsVersion() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_MINIMUM_OS_VERSION) ?? "14"
+    }
+    
+    /**
+     * Tempering Detection
+     */
+    static func setCheckTempering(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_TEMPERING)
+    }
+    
+    static func getCheckTempering() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_TEMPERING)
+    }
+    static func setCheckTemperingAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_TEMPERING_ACTION)
+    }
+    
+    static func getCheckTemperingAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_TEMPERING_ACTION) ?? "0"
+    }
+    static func setCheckTemperingAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_TEMPERING_ALERT_TITLE)
+    }
+    
+    static func getCheckTemperingAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_TEMPERING_ALERT_TITLE) ?? PreferencesKey.ss_tempering_title
+    }
+    static func setCheckTemperingAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_TEMPERING_ALERT_MESSAGE)
+    }
+    
+    static func getCheckTemperingAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_TEMPERING_ALERT_MESSAGE) ?? PreferencesKey.ss_tempering_warning
+    }
+    
+    /**
+     * Debugging Detection
+     */
+    static func setCheckDebugging(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_DEBUGGING)
+    }
+    
+    static func getCheckDebugging() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_DEBUGGING)
+    }
+    static func setCheckDebuggingAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_DEBUGGING_ACTION)
+    }
+    
+    static func getCheckDebuggingAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_DEBUGGING_ACTION) ?? "0"
+    }
+    static func setCheckDebuggingAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_DEBUGGING_ALERT_TITLE)
+    }
+    
+    static func getCheckDebuggingAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_DEBUGGING_ALERT_TITLE) ?? PreferencesKey.ss_debugging_title
+    }
+    static func setCheckDebuggingAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_DEBUGGING_ALERT_MESSAGE)
+    }
+    
+    static func getCheckDebuggingAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_DEBUGGING_ALERT_MESSAGE) ?? PreferencesKey.ss_debugging_warning
+    }
+    
+    /**
+     * Screen Casting
+     */
+    static func setCheckScreenCasting(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING)
+    }
+    
+    static func getCheckScreenCasting() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING)
+    }
+    static func setCheckScreenCastingAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ACTION)
+    }
+    
+    static func getCheckScreenCastingAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ACTION) ?? "0"
+    }
+    static func setCheckScreenCastingAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ALERT_TITLE)
+    }
+    
+    static func getCheckScreenCastingAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ALERT_TITLE) ?? PreferencesKey.ss_debugging_title
+    }
+    static func setCheckScreenCastingAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ALERT_MESSAGE)
+    }
+    
+    static func getCheckScreenCastingAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_CASTING_ALERT_MESSAGE) ?? PreferencesKey.ss_debugging_warning
+    }
+    
+    /**
+     * Screen Overlay
+     */
+    static func setCheckScreenOverlay(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY)
+    }
+    
+    static func getCheckScreenOverlay() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY)
+    }
+    static func setCheckScreenOverlayAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ACTION)
+    }
+    
+    static func getCheckScreenOverlayAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ACTION) ?? "0"
+    }
+    static func setCheckScreenOverlayAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ALERT_TITLE)
+    }
+    
+    static func getCheckScreenOverlayAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ALERT_TITLE) ?? PreferencesKey.ss_screenoverlay_title
+    }
+    static func setCheckScreenOverlayAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ALERT_MESSAGE)
+    }
+    
+    static func getCheckScreenOverlayAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SCREEN_OVERLAY_ALERT_MESSAGE) ?? PreferencesKey.ss_screenoverlay_continue
+    }
+    
+    /**
+     * Call Redirection Detection
+     */
+    static func setCheckCallForward(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_CALL_FORWARD)
+    }
+    
+    static func getCheckCallForward() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_CALL_FORWARD)
+    }
+    static func setCheckCallForwardAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ACTION)
+    }
+    
+    static func getCheckCallForwardAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ACTION) ?? "0"
+    }
+    static func setCheckCallForwardAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ALERT_TITLE)
+    }
+    
+    static func getCheckCallForwardAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ALERT_TITLE) ?? PreferencesKey.ss_callforward_title
+    }
+    static func setCheckCallForwardAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ALERT_MESSAGE)
+    }
+    
+    static func getCheckCallForwardAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_CALL_FORWARD_ALERT_MESSAGE) ?? PreferencesKey.ss_callforward_continue
+    }
+    
+    /**
+     * Multiple Login Detection
+     */
+    static func setCheckMultipleLogin(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN)
+    }
+    
+    static func getCheckMultipleLogin() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN)
+    }
+    static func setCheckMultipleLoginAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ACTION)
+    }
+    
+    static func getCheckMultipleLoginAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ACTION) ?? "0"
+    }
+    static func setCheckMultipleLoginAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ALERT_TITLE)
+    }
+    
+    static func getCheckMultipleLoginAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ALERT_TITLE) ?? PreferencesKey.ss_multiple_login_title
+    }
+    static func setCheckMultipleLoginAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ALERT_MESSAGE)
+    }
+    
+    static func getCheckMultipleLoginAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_MULTIPLE_LOGIN_ALERT_MESSAGE) ?? PreferencesKey.ss_multiple_login_warning
+    }
+    
+    /**
+     * SIM Swap Detection
+     */
+    static func setCheckSimSwap(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SIM_SWAP)
+    }
+    
+    static func getCheckSimSwap() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_SIM_SWAP)
+    }
+    static func setCheckSimSwapAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ACTION)
+    }
+    
+    static func getCheckSimSwapAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ACTION) ?? "0"
+    }
+    static func setCheckSimSwapAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ALERT_TITLE)
+    }
+    
+    static func getCheckSimSwapAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ALERT_TITLE) ?? PreferencesKey.ss_simswap_title
+    }
+    static func setCheckSimSwapAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ALERT_MESSAGE)
+    }
+    
+    static func getCheckSimSwapAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_SIM_SWAP_ALERT_MESSAGE) ?? PreferencesKey.ss_simswap_warning
+    }
+    
+    /**
+     * Geo-Velocity Checks
+     */
+    static func setCheckGeoVelocity(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY)
+    }
+    
+    static func getCheckGeoVelocity() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY)
+    }
+    static func setCheckGeoVelocityAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ACTION)
+    }
+    
+    static func getCheckGeoVelocityAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ACTION) ?? "0"
+    }
+    static func setCheckGeoVelocityAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ALERT_TITLE)
+    }
+    
+    static func getCheckGeoVelocityAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ALERT_TITLE) ?? PreferencesKey.ss_geo_velocity_title
+    }
+    static func setCheckGeoVelocityAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ALERT_MESSAGE)
+    }
+    
+    static func getCheckGeoVelocityAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_GEO_VELOCITY_ALERT_MESSAGE) ?? PreferencesKey.ss_geo_velocity_warning
+    }
+    
+    /**
+     * Behavioral Anomaly Detection
+     */
+    static func setCheckBehaviourAnalysis(value: Bool){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS)
+    }
+    
+    static func getCheckBehaviourAnalysis() -> Bool {
+        return UserDefaults.standard.bool(forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS)
+    }
+    static func setCheckBehaviourAnalysisAction(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ACTION)
+    }
+    
+    static func getCheckBehaviourAnalysisAction() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ACTION) ?? "0"
+    }
+    static func setCheckBehaviourAnalysisAlertTitle(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_TITLE)
+    }
+    
+    static func getCheckBehaviourAnalysisAlertTitle() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_TITLE) ?? PreferencesKey.ss_behaviour_anomaly_title
+    }
+    static func setCheckBehaviourAnalysisAlertMessage(value: String){
+        UserDefaults.standard.set(value, forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_MESSAGE)
+    }
+    
+    static func getCheckBehaviourAnalysisAlertMessage() -> String {
+        return UserDefaults.standard.string(forKey: PreferencesKey.SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_MESSAGE) ?? PreferencesKey.ss_behaviour_anomaly_warning
+    }
+}
+
+private class PreferencesKey {
+    static let SECURITY_SHIELD_ALERT_EXIT = "0"
+    static let SECURITY_SHIELD_ALERT_CONTINUE = "1"
+    
+    static let ERR121 = "121:Emulator detected"
+    static let ERR122 = "122:Malware detected"
+    static let ERR123 = "123:USB/WiFi debugging detected"
+    static let ERR124 = "124:Cloned app detected"
+    static let ERR125 = "125:Call forwarding detected"
+    static let ERR126 = "126:Screen sharing detected"
+    static let ERR127 = "127:OS Version not supported"
+    static let ERR128 = "128:Application backup detected"
+    static let ERR129 = "129:Failed security reasons"
+    static let ERR130 = "130:Tampering detected"
+    static let ERR131 = "131:SIM Swap detected"
+    static let ERR132 = "132:Behavioral Anomaly detected"
+    
+    static let SS_USER_APP_ID = "ss_user_app_id"
+    static let SS_USER_ACCOUNT = "ss_user_account"
+    static let SS_DOMAIN_OPR = "domain_opr"
+    static let SS_IP_PORT_OPR = "ip_opr"
+    
+    static let SS_CHECK_KEYLOGGER = "ss_check_keylogger"
+    static let SS_CHECK_KEYLOGGER_ACTION = "ss_check_keylogger_action"
+    static let SS_CHECK_KEYLOGGER_ALERT_TITLE = "ss_check_keylogger_alert_title"
+    static let SS_CHECK_KEYLOGGER_ALERT_MESSAGE = "ss_check_keylogger_alert_message"
+
+    static let SS_CHECK_SCREEN_CAPTURE = "ss_check_screen_capture"
+    static let SS_CHECK_SCREEN_CAPTURE_ACTION = "ss_check_screen_capture_action"
+    static let SS_CHECK_SCREEN_CAPTURE_ALERT_TITLE = "ss_check_screen_capture_alert_title"
+    static let SS_CHECK_SCREEN_CAPTURE_ALERT_MESSAGE = "ss_check_screen_capture_alert_message"
+    static let ss_screenshare_title = "Screen Sharing Detected!"
+    static let ss_screenshare_warning = "We are sorry for the inconvenience. For security reasons this app is not allowed to cast/share screen display. The application will automatically stop.<br><br>To try again, please stop the screen casting/sharing."
+        
+    
+    static let SS_CHECK_EMULATOR = "ss_check_emulator"
+    static let SS_CHECK_EMULATOR_ACTION = "ss_check_emulator_action"
+    static let SS_CHECK_EMULATOR_ALERT_TITLE = "ss_check_emulator_alert_title"
+    static let SS_CHECK_EMULATOR_ALERT_MESSAGE = "ss_check_emulator_alert_message"
+    static let ss_emulator_title = "Emulator Detected!"
+    static let ss_emulator_continue = "We are sorry for the inconvenience. For security reasons this app is not allowed to run on an emulator."
+    
+    static let SS_CHECK_ROOTED = "ss_check_rooted"
+    static let SS_CHECK_ROOTED_ACTION = "ss_check_rooted_action"
+    static let SS_CHECK_ROOTED_ALERT_TITLE = "ss_check_rooted_alert_title"
+    static let SS_CHECK_ROOTED_ALERT_MESSAGE = "ss_check_rooted_alert_message"
+    static let ss_rooted_title = "Root or Jailbreak Detected!"
+    static let ss_rooted_warning = "The operating system on your device has been modified unauthorizedly(the root). The modification might compromise secure access to organizational resources such as email and documents.<br><br> %app_name% will not work on your device. Please reset/unroot your device or contact %app_name% customer center for further information. We apologize for the inconvenient."
+    
+    static let SS_CHECK_OUTDATED_OS = "ss_check_outdated_os"
+    static let SS_CHECK_OUTDATED_OS_ACTION = "ss_check_outdated_os_action"
+    static let SS_CHECK_OUTDATED_OS_ALERT_TITLE = "ss_check_outdated_os_alert_title"
+    static let SS_CHECK_OUTDATED_OS_ALERT_MESSAGE = "ss_check_outdated_os_alert_message"
+    static let SS_CHECK_MINIMUM_OS_VERSION = "ss_minimum_os_version"
+    static let ss_os_not_supported_title = "Android Version Not Secure!"
+    static let ss_os_not_supported_continue = "We are sorry for the inconvenience. This device's Android version has been deemed as no longer secure."
+    
+    static let SS_CHECK_TEMPERING = "ss_check_tempering"
+    static let SS_CHECK_TEMPERING_ACTION = "ss_check_tempering_action"
+    static let SS_CHECK_TEMPERING_ALERT_TITLE = "ss_check_tempering_alert_title"
+    static let SS_CHECK_TEMPERING_ALERT_MESSAGE = "ss_check_tempering_alert_message"
+    static let ss_tempering_title = "Tempering Detected!"
+    static let ss_tempering_warning = "Our security shield has detected changes in the application that may indicate tempering, which could potentially lead to malware infection, data manipulation, and other risks. Please remove this apps and download from official Google Play Store."
+    
+    static let SS_CHECK_DEBUGGING = "ss_check_debugging"
+    static let SS_CHECK_DEBUGGING_ACTION = "ss_check_debugging_action"
+    static let SS_CHECK_DEBUGGING_ALERT_TITLE = "ss_check_debugging_alert_title"
+    static let SS_CHECK_DEBUGGING_ALERT_MESSAGE = "ss_check_debugging_alert_message"
+    static let ss_debugging_title = "Debugging Mode Detected!"
+    static let ss_debugging_warning = "Your device running on debugging mode. Please disable it."
+    
+    static let SS_CHECK_SCREEN_CASTING = "ss_check_screen_casting"
+    static let SS_CHECK_SCREEN_CASTING_ACTION = "ss_check_screen_casting_action"
+    static let SS_CHECK_SCREEN_CASTING_ALERT_TITLE = "ss_check_screen_casting_alert_title"
+    static let SS_CHECK_SCREEN_CASTING_ALERT_MESSAGE = "ss_check_screen_casting_alert_message"
+    
+    static let SS_CHECK_SCREEN_OVERLAY = "ss_check_screen_overlay"
+    static let SS_CHECK_SCREEN_OVERLAY_ACTION = "ss_check_screen_overlay_action"
+    static let SS_CHECK_SCREEN_OVERLAY_ALERT_TITLE = "ss_check_screen_overlay_alert_title"
+    static let SS_CHECK_SCREEN_OVERLAY_ALERT_MESSAGE = "ss_check_screen_overlay_alert_message"
+    static let ss_screenoverlay_title = "Screen Overlay Detected!"
+    static let ss_screenoverlay_continue = "We are sorry for the inconvenience. For security reasons this app is not allowed to share screen overlay. Please stop the screen overlay in app setting."
+    
+    static let SS_CHECK_CALL_FORWARD = "ss_check_call_forward"
+    static let SS_CHECK_CALL_FORWARD_ACTION = "ss_check_call_forward_action"
+    static let SS_CHECK_CALL_FORWARD_ALERT_TITLE = "ss_check_call_forward_alert_title"
+    static let SS_CHECK_CALL_FORWARD_ALERT_MESSAGE = "ss_check_call_forward_alert_message"
+    static let ss_callforward_title = "Call Forwarding Detected!";
+    static let ss_callforward_continue = "We are sorry for the inconvenience. For security reasons this app does not recommend allowing call forwarding to be active.";
+    
+    static let SS_CHECK_MULTIPLE_LOGIN = "ss_check_multiple_login"
+    static let SS_CHECK_MULTIPLE_LOGIN_ACTION = "ss_check_multiple_login_action"
+    static let SS_CHECK_MULTIPLE_LOGIN_ALERT_TITLE = "ss_check_multiple_login_alert_title"
+    static let SS_CHECK_MULTIPLE_LOGIN_ALERT_MESSAGE = "ss_check_multiple_login_alert_message"
+    static let ss_multiple_login_title = "Multiple Login Detected!"
+    static let ss_multiple_login_warning = "We have detected multiple login attempts to your account from different devices or locations within a short period. This alert is designed to protect your account and ensure your security.<br><br> If you initiated these logins, no further action is required. However, if you did not authorize this activity, it is crucial to take immediate steps to safeguard your account. Unauthorized access may put your personal information at risk."
+    
+    static let SS_CHECK_SIM_SWAP = "ss_check_sim_swap"
+    static let SS_CHECK_SIM_SWAP_ACTION = "ss_check_sim_swap_action"
+    static let SS_CHECK_SIM_SWAP_ALERT_TITLE = "ss_check_sim_swap_alert_title"
+    static let SS_CHECK_SIM_SWAP_ALERT_MESSAGE = "ss_check_sim_swap_alert_message"
+    static let ss_simswap_title = "Sim Swap Detected!"
+    static let ss_simswap_warning = "We noticed some unusual app behaviors and activities, including SimCard Swap on your device. If these actions were not initiated by you or you are unsure about any apps, please change your true number imediately."
+    
+    static let SS_CHECK_GEO_VELOCITY = "ss_check_geo_velocity"
+    static let SS_CHECK_GEO_VELOCITY_ACTION = "ss_check_geo_velocity_action"
+    static let SS_CHECK_GEO_VELOCITY_ALERT_TITLE = "ss_check_geo_velocity_alert_title"
+    static let SS_CHECK_GEO_VELOCITY_ALERT_MESSAGE = "ss_check_geo_velocity_alert_message"
+    static let ss_geo_velocity_title = "Geo Velocity Anomaly Detected!"
+    static let ss_geo_velocity_warning = "Anomalies have been identified in the location check associated with your account. This warning is issued to inform you of significant irregularities in the expected location data. Immediate attention is required to address these anomalies, as they may impact your account's functionality, security, and overall user experience."
+
+    static let SS_CHECK_BEHAVIOUR_ANALYSIS = "ss_check_behaviour_analysis"
+    static let SS_CHECK_BEHAVIOUR_ANALYSIS_ACTION = "ss_check_behaviour_analysis_action"
+    static let SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_TITLE = "ss_check_behaviour_analysis_alert_title"
+    static let SS_CHECK_BEHAVIOUR_ANALYSIS_ALERT_MESSAGE = "ss_check_behaviour_analysis_alert_message"
+    static let ss_behaviour_anomaly_title = "Behaviour Anomaly Detected!"
+    static let ss_behaviour_anomaly_warning = "We have identified a significant anomaly in the behavior of your device. This notification serves as a precautionary measure, as unusual patterns can indicate potential security threats, unauthorized access, or software malfunctions that could compromise your data and overall device performance."
+}
+
+private class SelfSignedURLSessionDelegate: NSObject, URLSessionTaskDelegate, URLSessionDataDelegate {
+    public func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+        if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
+            if let serverTrust = challenge.protectionSpace.serverTrust {
+                let credential = URLCredential(trust: serverTrust)
+                completionHandler(.useCredential, credential)
+            }
+        }
+    }
+}
+
+private class Utils {
+    private static let I_BB = 48   // 0
+    private static let I_BBT_1 = 57 // 9
+    private static let I_BAT_1 = 65 // A
+    private static let I_BBT_2 = 90 // Z
+    private static let I_BAT_2 = 97 // a
+    private static let I_BA = 122  // z
+
+    private static let IC_BB = 33   // !
+    private static let IC_BBT_1 = 47 // /
+    private static let IC_BAT_1 = 58 // :
+    private static let IC_BBT_2 = 64 // @
+    private static let IC_BAT_2 = 91 // [
+    private static let IC_BBT_3 = 96 // @
+    private static let IC_BAT_3 = 123 // [
+    private static let IC_BA = 126  // `
+
+    private static var icIGNORE = Set<Int>()
+
+    private static func initIcIgnore() {
+        icIGNORE.insert(10)// \r
+        icIGNORE.insert(13)// \n
+        icIGNORE.insert(32)// <space>
+    }
+    
+    public static func decrypt(str: String) -> String {
+        var arr: [Character]
+        var iRandom = 0
+        var sDecrypt: String
+        iRandom = Int(str.substring(from: 0, to: 0)) ?? 0
+        sDecrypt = getPalindrom(str: str.substring(from: 1, to: nil))
+        arr = Array(sDecrypt)
+        for i in 0..<arr.count {
+            if (isSpecialChar(ch: arr[i])) {
+                arr[i] = getBeforecChar(ch: arr[i], inc: iRandom)
+            } else {
+                arr[i] = getBeforeChar(ch: arr[i], inc: iRandom)
+            }
+        }
+        return String(arr)
+    }
+    
+    private static func isSpecialChar(ch: Character) -> Bool {
+        let ch = Int(ch.asciiValue ?? 0)
+        return (ch >= IC_BB && ch <= IC_BBT_1) || (ch >= IC_BAT_1 && ch <= IC_BBT_2) || (ch >= IC_BAT_2 && ch <= IC_BBT_3) || (ch >= IC_BAT_3 && ch <= IC_BA)
+    }
+    
+    private static func getPalindrom(str: String) -> String {
+        let arr: [Character] = Array(str)
+        var arr2: [Character] = Array(arr)
+
+        for i in 0..<arr.count {
+            arr2[i] = arr[arr.count - (i + 1)]
+        }
+        return String(arr2)
+    }
+    
+    private static func getBeforeChar(ch: Character, inc: Int) -> Character {
+        if icIGNORE.isEmpty {
+            initIcIgnore()
+        }
+        var iAscii = ch
+        let iAsciiBefore = iAscii
+
+        if (icIGNORE.contains(Int(iAscii.asciiValue ?? 0))) {
+            return iAscii;
+        }
+
+        if Int(iAscii.asciiValue ?? 0) > I_BA || Int(iAscii.asciiValue ?? 0) < I_BB {
+        } else {
+            if !icIGNORE.contains(Int(iAscii.asciiValue ?? 0)) {
+                iAscii = Character(UnicodeScalar(Int(iAscii.asciiValue ?? 0) - inc)!)
+                if (I_BAT_1 > Int(iAscii.asciiValue ?? 0) && Int(iAsciiBefore.asciiValue ?? 0) >= I_BAT_1) {
+                    iAscii = Character(UnicodeScalar((I_BBT_1 + 1) - (I_BAT_1 - Int(iAscii.asciiValue ?? 0)))!)
+                }
+                if (I_BAT_2 > Int(iAscii.asciiValue ?? 0) && Int(iAsciiBefore.asciiValue ?? 0) >= I_BAT_2) {
+                    iAscii = Character(UnicodeScalar((I_BBT_2 + 1) - (I_BAT_2 - Int(iAscii.asciiValue ?? 0)))!)
+                }
+                if (Int(iAscii.asciiValue ?? 0) < I_BB) {
+                    iAscii = Character(UnicodeScalar((I_BA + 1) + (Int(iAscii.asciiValue ?? 0) - I_BB))!)
+                }
+            }
+        }
+        return iAscii
+    }
+    
+    private static func getBeforecChar(ch: Character, inc: Int) -> Character {
+        var iAscii = ch
+        let iAsciiBefore = iAscii
+        if (Int(iAscii.asciiValue ?? 0) > IC_BA || Int(iAscii.asciiValue ?? 0) < IC_BB) {
+        } else {
+            iAscii = Character(UnicodeScalar(Int(iAscii.asciiValue ?? 0) - inc)!)
+            if (Int(iAscii.asciiValue ?? 0) < IC_BB) {
+                iAscii = Character(UnicodeScalar((IC_BA + 1) + (Int(iAscii.asciiValue ?? 0) - IC_BB))!)
+                if (Int(iAscii.asciiValue ?? 0) < IC_BAT_3 && Int(iAscii.asciiValue ?? 0) > IC_BBT_3) {
+                    iAscii = Character(UnicodeScalar((IC_BBT_3 + 1) - (IC_BAT_3 - Int(iAscii.asciiValue ?? 0)))!)
+                }
+            }
+            if (IC_BAT_3 > Int(iAscii.asciiValue ?? 0) && Int(iAsciiBefore.asciiValue ?? 0) >= IC_BAT_3) {
+                iAscii = Character(UnicodeScalar((IC_BBT_3 + 1) - (IC_BAT_3 - Int(iAscii.asciiValue ?? 0)))!)
+            }
+            if (IC_BAT_2 > Int(iAscii.asciiValue ?? 0) && Int(iAsciiBefore.asciiValue ?? 0) >= IC_BAT_2) {
+                iAscii = Character(UnicodeScalar((IC_BBT_2 + 1) - (IC_BAT_2 - Int(iAscii.asciiValue ?? 0)))!)
+            }
+            if (IC_BAT_1 > Int(iAscii.asciiValue ?? 0) && Int(iAsciiBefore.asciiValue ?? 0) >= IC_BAT_1) {
+                iAscii = Character(UnicodeScalar((IC_BBT_1 + 1) - (IC_BAT_1 - Int(iAscii.asciiValue ?? 0)))!)
+            }
+        }
+        return iAscii
+    }
+}
+
+extension String {
+    public func substring(from: Int?, to: Int?) -> String {
+        if let start = from {
+            guard start < self.count else {
+                return ""
+            }
+        }
+        
+        if let end = to {
+            guard end >= 0 else {
+                return ""
+            }
+        }
+        
+        if let start = from, let end = to {
+            guard end - start >= 0 else {
+                return ""
+            }
+        }
+        
+        let startIndex: String.Index
+        if let start = from, start >= 0 {
+            startIndex = self.index(self.startIndex, offsetBy: start)
+        } else {
+            startIndex = self.startIndex
+        }
+        
+        let endIndex: String.Index
+        if let end = to, end >= 0, end < self.count {
+            endIndex = self.index(self.startIndex, offsetBy: end + 1)
+        } else {
+            endIndex = self.endIndex
+        }
+        
+        return String(self[startIndex ..< endIndex])
+    }
+}
+
+extension UIColor {
+    public static var mainColorSS: UIColor {
+        return renderColor(hex: "#046cfc")
+    }
+    
+    public static var blackDarkModeSS: UIColor {
+        return renderColor(hex: "#262626")
+    }
+    
+    public class func renderColor(hex: String) -> UIColor {
+        var cString:String = hex.trimmingCharacters(in: .whitespacesAndNewlines).uppercased()
+
+        if (cString.hasPrefix("#")) {
+            cString.remove(at: cString.startIndex)
+        }
+
+        if ((cString.count) != 6) {
+            return UIColor.gray
+        }
+
+        var rgbValue:UInt64 = 0
+        Scanner(string: cString).scanHexInt64(&rgbValue)
+
+        return UIColor(
+            red: CGFloat((rgbValue & 0xFF0000) >> 16) / 255.0,
+            green: CGFloat((rgbValue & 0x00FF00) >> 8) / 255.0,
+            blue: CGFloat(rgbValue & 0x0000FF) / 255.0,
+            alpha: CGFloat(1.0)
+        )
+    }
+}
+
+extension UIApplication {
+    public static var appVersion: String? {
+        return Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String
+    }
+    
+    var rootViewController: UIViewController? {
+        return UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController
+    }
+    
+    public var visibleViewController: UIViewController? {
+        let keyWindow = UIApplication.shared.windows.filter {$0.isKeyWindow}.first
+        if var topController = keyWindow?.rootViewController {
+            while let presentedViewController = topController.presentedViewController {
+                topController = presentedViewController
+            }
+            return topController
+        }
+        return nil
+    }
+}
+
+extension UIImage {
+    static func imageWithColorSS(color: UIColor, size: CGSize) -> UIImage? {
+        let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height)
+        UIGraphicsBeginImageContextWithOptions(size, false, 0)
+        color.setFill()
+        UIRectFill(rect)
+        guard let image: UIImage = UIGraphicsGetImageFromCurrentImageContext() else {
+            return nil
+        }
+        UIGraphicsEndImageContext()
+        return image
+    }
+}
+
+public class TMessageSS {
+    public var mType: String = ""
+    public var mVersion: String = ""
+    public var mCode: String = ""
+    public var mStatus: String = ""
+    public var mPIN: String = ""
+    public var mL_PIN: String = ""
+    public var mBodies: [String: String] = [String: String]()
+    private var mMedia:[UInt8] = [UInt8]()
+    
+    let C_HEADER:UnicodeScalar = UnicodeScalar(0x01)
+    let C_ENTRY:UnicodeScalar = UnicodeScalar(0x02)
+    let C_KEYVAL:UnicodeScalar = UnicodeScalar(0x03)
+    let C_ARRAY:UnicodeScalar = UnicodeScalar(0x04)
+    
+    var S_HEADER: String = ""
+    var S_ENTRY: String = ""
+    var S_KEYVAL: String = ""
+    var S_ARRAY: String = ""
+    
+    
+    public static let TYPE_SQLITE_ONLY =  "1"
+    public static let TYPE_ALL         =  "2"
+    public static let TYPE_NEED_ACK    =  "3"
+    
+    let ERRCOD = "A97"
+    let MEDIA_LENGTH = "ML"
+    let FILE_SIZE = "A53C"
+    let IMEI = "Bb"
+    let VERCOD = "Bd"
+    
+    func getCLMUserId() -> String {
+        guard let me = UserDefaults.standard.string(forKey: "me") else {
+            return ""
+        }
+        return me
+    }
+    
+    public init() {
+        mVersion = "1.0.111"
+        mBodies[IMEI] = getCLMUserId()
+        mBodies[VERCOD] = "2.2.177"
+    }
+    
+    public init(data : String) {
+        _ = unpack(data: data)
+    }
+    
+    init(type: String, version: String, code: String,status: String, pin: String, l_pin: String, bodies:[String: String], media:  [UInt8]) {
+        mType = type
+        mVersion = version
+        mCode = code
+        mStatus = status
+        mPIN = pin
+        mL_PIN = l_pin
+        mBodies = bodies
+        mMedia = media
+        mBodies[IMEI] = getCLMUserId()
+        mBodies[VERCOD] = "2.2.177"
+    }
+    
+    public func clone(p_tmessage:TMessageSS) -> TMessageSS {
+        return TMessageSS(
+            type: p_tmessage.mType,
+            version: p_tmessage.mVersion,
+            code: p_tmessage.mCode,
+            status: p_tmessage.mStatus,
+            pin: p_tmessage.mPIN,
+            l_pin: p_tmessage.mL_PIN,
+            bodies: p_tmessage.mBodies,
+            media: p_tmessage.mMedia
+        )
+    }
+    
+    public func setMedia(media: [UInt8]) {
+        mMedia = media
+        mBodies[MEDIA_LENGTH] = String(media.count)
+    }
+    
+    public func getCode() -> String {
+        return mCode
+    }
+    public func getStatus() -> String {
+        return mStatus
+    }
+    public func getPIN() -> String {
+        return mPIN
+    }
+    public func getType() -> String {
+        return mType
+    }
+    public func getL_PIN() -> String {
+        return mL_PIN
+    }
+    public func getMedia() -> [UInt8] {
+        return mMedia
+    }
+    public func getBody(key : String) -> String {
+        if let data = mBodies[key] {
+            return data
+        }
+        else {
+            return ""
+        }
+    }
+    public func getBody(key : String, default_value: String) -> String {
+        if ((mBodies[key] == nil)) {
+            return default_value
+        } else if mBodies[key] == "null" {
+            return default_value
+        } else {
+            return mBodies[key]!
+        }
+    }
+    
+    public func getBodyAsInteger(key : String, default_value: Int) -> Int {
+        if ((mBodies[key] == nil)) {
+            return default_value
+        } else if mBodies[key] == "null" {
+            return default_value
+        } else {
+            return Int(mBodies[key]!)!
+        }
+    }
+    public func getBodyAsLong(key : String, default_value: CLong) -> CLong {
+        if let body = mBodies[key] {
+            if (body == "null") {
+                return default_value
+            }
+            if (body == "nil") {
+                return default_value
+            }
+            return (body as NSString).integerValue
+            
+        }
+        else {
+            return default_value
+        }
+    }
+    
+    public func pack() -> String {
+        if (S_HEADER.isEmpty) { S_HEADER.append(Character(C_HEADER)) }
+        
+        var data = ""
+        data.append(mType)
+        data.append(Character(C_HEADER))
+        data.append(mVersion)
+        data.append(Character(C_HEADER))
+        data.append(mCode)
+        data.append(Character(C_HEADER))
+        data.append(mStatus)
+        data.append(Character(C_HEADER))
+        data.append(mPIN)
+        data.append(Character(C_HEADER))
+        data.append(mL_PIN)
+        data.append(Character(C_HEADER))
+        data.append(toString(body: mBodies))
+        data.append(Character(C_HEADER))
+        if let media = String(data: Data(getMedia()), encoding: .windowsCP1250) {
+            data.append(media)
+        }
+        return data
+        
+    }
+    
+    
+    public func toBytes() -> [UInt8] {
+        let data:String = pack()
+        var result: [UInt8] = Array(data.utf8)
+        //print("[bytes_processing] build bytes data:" + String(result.count) + ", media:" + String(getMedia().count))
+        if (!getMedia().isEmpty) {
+            for index in 0...getMedia().count - 1 {
+                result.append(getMedia()[index])
+            }
+        }
+        return result
+        
+    }
+    
+    private func toString(body : [String: String]) -> String {
+        if (S_ENTRY.isEmpty) { S_ENTRY.append(Character(C_ENTRY)) }
+        if (S_KEYVAL.isEmpty) { S_KEYVAL.append(Character(C_KEYVAL)) }
+        
+        var result = ""
+        for (key, value) in body {
+            result += key + S_KEYVAL + value + S_ENTRY
+        }
+        if (!result.isEmpty) {
+            result = String(result.prefix(result.count - 1))
+        }
+        return result
+    }
+    
+    private func toMediaBytes(image: String) ->  [UInt8] {
+        if (image == "null") {
+            return [UInt8]()
+        }
+        if let data = NSData(base64Encoded: image, options: .ignoreUnknownCharacters) {
+            var buffer = [UInt8](repeating: 0, count: data.length)
+            data.getBytes(&buffer, length: data.length)
+            return buffer
+        }
+        return [UInt8]()
+    }
+    
+    public func unpack(data: String) -> Bool {
+        var result  = false
+        if (S_HEADER.isEmpty) { S_HEADER.append(Character(C_HEADER)) }
+        let headers = data.split(separator: Character(C_HEADER), maxSplits: 8, omittingEmptySubsequences: false)
+        if (headers.count == 8) {
+            mType    = String(headers[0])
+            mVersion = String(headers[1])
+            mCode    = String(headers[2])
+            mStatus  = String(headers[3])
+            mPIN     = String(headers[4])
+            mL_PIN   = String(headers[5])
+            mBodies  = toBodies(data: String(headers[6]))
+            mMedia   = toMediaBytes(image: String(headers[7]))
+            result   = true
+        }
+        return result
+    }
+    
+    public func unpack(bytes_data: [UInt8]) -> Bool {
+        var result  = false
+        let data = getData(bytes_data: bytes_data)
+        let headers = data.split(separator: Character(C_HEADER), maxSplits: 8, omittingEmptySubsequences: false)
+        if (headers.count >= 8) {
+            mType    = String(headers[0])
+            mVersion = String(headers[1])
+            mCode    = String(headers[2])
+            mStatus  = String(headers[3])
+            mPIN     = String(headers[4])
+            mL_PIN   = String(headers[5])
+            mBodies  = toBodies(data: String(headers[6]))
+            mMedia   = getMedia(bytes_data: bytes_data)
+            result   = true
+        }
+        else {
+            //print("[bytes_processing] Invalid header length: " + String(headers.count))
+        }
+        return result
+    }
+    
+    private func toBodies(data: String) -> [String: String]  {
+        var cvalues = [String: String]()
+        
+        if (data.isEmpty || data == "") {
+            return cvalues
+        }
+        if (S_ENTRY.isEmpty) { S_ENTRY.append(Character(C_ENTRY)) }
+        if (S_KEYVAL.isEmpty) { S_KEYVAL.append(Character(C_KEYVAL)) }
+        
+        let elements = data.split(separator: Character(C_ENTRY), omittingEmptySubsequences: false)
+        
+        for element in elements {
+            let keyval = element.split(separator: Character(C_KEYVAL), omittingEmptySubsequences: false)
+            cvalues[String(keyval[0])] = String(keyval[1])
+        }
+        return cvalues
+    }
+    
+    private func getData(bytes_data : [UInt8]) -> String {
+        var result = ""
+        if (S_HEADER.isEmpty) { S_HEADER.append(Character(C_HEADER)) }
+        
+        var iLength = 0
+        for bData in bytes_data {
+            let chr = Character(UnicodeScalar(bData))
+            
+            if (chr == Character(C_HEADER)) {
+                iLength = iLength + 1
+                if (iLength == 8) {
+                    break
+                }
+            }
+            result.append(chr)
+        }
+        return result
+    }
+    
+    private func getMedia(bytes_data:  [UInt8]) ->  [UInt8] {
+        var result:[UInt8] = [UInt8]()
+        if bytes_data.count > 0 {
+            var ml = getBodyAsInteger(key: MEDIA_LENGTH, default_value: 0)
+            if ml == 0 {
+                ml = getBodyAsInteger(key: FILE_SIZE, default_value: 0)
+            }
+            if ml > 0 {
+                let start = bytes_data.count - ml
+                for index in start...bytes_data.count - 1 {
+                    result.append(bytes_data[index])
+                }
+            }
+        }
+        return result
+    }
+    
+    public func toLogString() -> String {
+        var result = ""
+        result += ("[" + mType + "]")
+        result += ("[" + mVersion + "]")
+        result += ("[" + mCode + "]")
+        result += ("[" + mStatus + "]")
+        result += ("[" + mPIN + "]")
+        result += ("[" + mL_PIN + "]")
+        result += ("[" + toBodyLogString() + "]")
+        result += ("[" + String(mMedia.count) + "]")
+        return result
+    }
+    
+    private func toBodyLogString() -> String {
+        if (S_ENTRY.isEmpty) { S_ENTRY.append(Character(C_ENTRY)) }
+        if (S_KEYVAL.isEmpty) { S_KEYVAL.append(Character(C_KEYVAL)) }
+        
+        var result = ""
+        for (key, value) in mBodies {
+            result += "{" + key + "=" + value + "}"
+        }
+        return result
+    }
+    
+    public func isOk() -> Bool {
+        return getBody(key: ERRCOD, default_value: "99") == "00"
+    }
+}
+
+public class CoreMessage_TMessageUtil {
+        
+    private static var mTID = NSDate().timeIntervalSince1970 * 1000
+    
+    public static func getTID() -> String {
+        mTID = Double(Int(mTID) + Int(1))
+        return String(Int(mTID))
+    }
+    
+    public static func getString(json: Any, key: String) -> String {
+        return getString(json: json, key: key, def: "")
+    }
+    
+    public static func getString(json: Any, key: String, def: String) -> String {
+        if let dict = json as? [String: Any], let value = dict[key] as? String {
+            if !value.isEmpty {
+                return value
+            }
+        }
+        return def
+    }
+    
+    public static func getInt(json: Any, key: String, def: Int) -> Int {
+        if let dict = json as? [String: Any], let value = dict[key] as? Int {
+            return value
+        }
+        return def
+    }
+    
+    public static func getIntAsString(json: Any, key: String, def: Int) -> String {
+        return String(getInt(json: json, key: key, def: def))
+    }
+    
+    public static func getLong(json: Any, key: String, def: CLong) -> CLong {
+        if let dict = json as? [String: Any], let value = dict[key] as? CLong {
+            return value
+        }
+        return def
+    }
+    
+}
+
+public class SSLibAlertController: UIAlertController {
+    public override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        
+        // Customize the title's font
+        let titleFont = UIFont.boldSystemFont(ofSize: 16)
+        let titleAttributes = [NSAttributedString.Key.font: titleFont]
+        setValue(NSAttributedString(string: self.title ?? "", attributes: titleAttributes), forKey: "attributedTitle")
+        
+        // Change the font for the message
+        let messageFont = UIFont.systemFont(ofSize: 14)
+        let messageAttributes = [NSAttributedString.Key.font: messageFont]
+        setValue(NSAttributedString(string: self.message ?? "", attributes: messageAttributes), forKey: "attributedMessage")
+        
+        for i in self.actions {
+            let attributedText = NSAttributedString(string: i.title ?? "", attributes: [NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16)])
+
+            guard let label = (i.value(forKey: "__representer") as AnyObject).value(forKey: "label") as? UILabel else { return }
+            label.attributedText = attributedText
+        }
+
+    }
+}

+ 13 - 0
appbuilder-ios/StreamShield/StreamShield/StreamShield.docc/StreamShield.md

@@ -0,0 +1,13 @@
+# ``StreamShield``
+
+<!--@START_MENU_TOKEN@-->Summary<!--@END_MENU_TOKEN@-->
+
+## Overview
+
+<!--@START_MENU_TOKEN@-->Text<!--@END_MENU_TOKEN@-->
+
+## Topics
+
+### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->
+
+- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->

+ 18 - 0
appbuilder-ios/StreamShield/StreamShield/StreamShield.h

@@ -0,0 +1,18 @@
+//
+//  StreamShield.h
+//  StreamShield
+//
+//  Created by Qindi on 31/10/24.
+//
+
+#import <Foundation/Foundation.h>
+
+//! Project version number for StreamShield.
+FOUNDATION_EXPORT double StreamShieldVersionNumber;
+
+//! Project version string for StreamShield.
+FOUNDATION_EXPORT const unsigned char StreamShieldVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import <StreamShield/PublicHeader.h>
+
+