Browse Source

add login by email

alqindiirsyam 2 years ago
parent
commit
014c2700d8

+ 5 - 1
appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift

@@ -113,7 +113,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
             let banner = FloatingNotificationBanner(title: "Check your connection".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()
         } else {
-            Nexilis.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false) //AA6164AA13F0A6262677AC7443C37E3F6F0A342E8BEE84B700CB59C876166FE0(AWS) //36BCB99AA3885165E64ECC50591C4DA5072A25B2E7BAADA5A1B57E18737FF88C(CBN)
+            var showButton = false
+            if PrefsUtil.getCpaasMode() == PrefsUtil.CPAAS_MODE_FLOATING || PrefsUtil.getCpaasMode() == PrefsUtil.CPAAS_MODE_MIX {
+                showButton = true
+            }
+            Nexilis.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: showButton) //AA6164AA13F0A6262677AC7443C37E3F6F0A342E8BEE84B700CB59C876166FE0(AWS) //36BCB99AA3885165E64ECC50591C4DA5072A25B2E7BAADA5A1B57E18737FF88C(CBN)
             if let response = Nexilis.writeSync(message: getPrefs(key: ""), timeout: 5000) {
                 if response.mBodies[CoreMessage_TMessageKey.ERRCOD] == "00" {
                     let data = response.getBody(key: CoreMessage_TMessageKey.DATA)

+ 0 - 1
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -435,7 +435,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                         if(!id.isEmpty){
                             Nexilis.changeUser(f_pin: id)
                             UserDefaults.standard.setValue(id, forKey: "me")
-                            UserDefaults.standard.set("", forKey: "pwd")
                             Utils.setProfile(value: false)
                             UserDefaults.standard.synchronize()
                             // pos registration

+ 10 - 10
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -140,15 +140,15 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             createMidFloatingButton()
             navigationController?.setNavigationBarHidden(true, animated: false)
         }
-        if((cpaasMode == PrefsUtil.CPAAS_MODE_FLOATING || cpaasMode == PrefsUtil.CPAAS_MODE_MIX)) {
-            let rect = CGRect(x: self.view.bounds.width - 100, y: self.view.bounds.height / 2, width: 50, height: 250)
-            floating = FloatingButton()
-            floating?.frame = rect
-            floating?.isShow = true
-            
-            view.addSubview(floating!)
-            navigationController?.setNavigationBarHidden(true, animated: false)
-        }
+//        if((cpaasMode == PrefsUtil.CPAAS_MODE_FLOATING || cpaasMode == PrefsUtil.CPAAS_MODE_MIX)) {
+//            let rect = CGRect(x: self.view.bounds.width - 100, y: self.view.bounds.height / 2, width: 50, height: 250)
+//            floating = FloatingButton()
+//            floating?.frame = rect
+//            floating?.isShow = true
+//
+//            view.addSubview(floating!)
+//            navigationController?.setNavigationBarHidden(true, animated: false)
+//        }
         
         
         
@@ -166,7 +166,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.gray, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
         }
         UIFont.overrideInitialize()
-        ViewController.pullActionButton()
     }
 
     override func viewDidLayoutSubviews() {
@@ -413,6 +412,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         }
         if firstLoad {
             firstLoad = false
+            ViewController.pullActionButton()
             let customTab = PrefsUtil.getCustomTab().split(separator: ",")
             if customTab[0] == "1" {
                 firstTab?.viewWillAppear(false)

+ 101 - 76
appbuilder-ios/NexilisLite/NexilisLite/Resource/Palio.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
         <capability name="Image references" minToolsVersion="12.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -19,11 +19,11 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="QWa-3f-uCc">
-                                <rect key="frame" x="0.0" y="44" width="414" height="818"/>
+                                <rect key="frame" x="0.0" y="48" width="414" height="814"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="cell" rowHeight="60" id="IAB-7H-Ah2" customClass="ContactCallCell" customModule="NexilisLite" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="44.5" width="414" height="60"/>
+                                        <rect key="frame" x="0.0" y="50" width="414" height="60"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="IAB-7H-Ah2" id="2gG-93-Dud">
                                             <rect key="frame" x="0.0" y="0.0" width="414" height="60"/>
@@ -127,13 +127,13 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Name" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ei8-yA-DhU">
-                                <rect key="frame" x="166" y="64" width="82" height="38.5"/>
+                                <rect key="frame" x="166" y="68" width="82" height="38.5"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="32"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Status" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="uQZ-6c-vO9">
-                                <rect key="frame" x="182.5" y="122.5" width="49" height="20.5"/>
+                                <rect key="frame" x="182.5" y="126.5" width="49" height="20.5"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <nil key="highlightedColor"/>
@@ -223,7 +223,7 @@
                                         <rect key="frame" x="0.0" y="18" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="pc8-2U-MSs" id="Xmq-xK-1yg">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Target Audience" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="y2e-Vl-JVL">
@@ -250,7 +250,7 @@
                                         <rect key="frame" x="0.0" y="61.5" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Zbt-qh-ktl" id="nyg-ih-YLJ">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Promotion Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jjY-KN-zVt">
@@ -386,7 +386,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="reuseCell" id="6y6-2f-cif">
-                                <rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="6y6-2f-cif" id="Lss-GN-Uug">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -420,7 +420,7 @@
                         <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifier" id="RT8-Qa-6dG">
-                                <rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="RT8-Qa-6dG" id="Axr-HY-bpT">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -449,7 +449,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="reuseIdentifier" id="OiN-Zh-59R">
-                                <rect key="frame" x="0.0" y="44.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="OiN-Zh-59R" id="7Yl-bg-HYf">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -477,7 +477,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="cellHistoryCC" rowHeight="120" id="Ig6-m3-mZR" customClass="CellMyHistory" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="0.0" y="44.5" width="414" height="120"/>
+                                <rect key="frame" x="0.0" y="50" width="414" height="120"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Ig6-m3-mZR" id="TYr-gT-h1j">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="120"/>
@@ -774,7 +774,7 @@
                                                             <nil key="highlightedColor"/>
                                                         </label>
                                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="NYg-hJ-SNM">
-                                                            <rect key="frame" x="8" y="124" width="358" height="31"/>
+                                                            <rect key="frame" x="8" y="124" width="358" height="34.5"/>
                                                             <state key="normal" title="Button"/>
                                                             <buttonConfiguration key="configuration" style="filled" title="Contact Center History">
                                                                 <color key="baseBackgroundColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -895,60 +895,85 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="amR-gf-O8n">
-                                <rect key="frame" x="40" y="54" width="334" height="2"/>
+                                <rect key="frame" x="40" y="58" width="334" height="2"/>
                                 <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="2" id="lQU-R4-eCU"/>
                                 </constraints>
                             </view>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please enter your desired Username and Password" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nim-58-zjc">
-                                <rect key="frame" x="20" y="76" width="374" height="17"/>
+                                <rect key="frame" x="20" y="80" width="374" height="17"/>
                                 <color key="tintColor" systemColor="tintColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <color key="textColor" systemColor="systemGrayColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Username" textAlignment="natural" minimumFontSize="14" translatesAutoresizingMaskIntoConstraints="NO" id="XNI-ec-RQS">
-                                <rect key="frame" x="20" y="113" width="374" height="34"/>
+                                <rect key="frame" x="20" y="117" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Hor-5y-mXt" customClass="PasswordTextField" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="20" y="157" width="374" height="34"/>
+                                <rect key="frame" x="20" y="161" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ytt-6A-LrS">
-                                <rect key="frame" x="357" y="164" width="27" height="22"/>
+                                <rect key="frame" x="357" y="168" width="27" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
                             </button>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Or do you have an account" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6YT-EA-rdk">
+                                <rect key="frame" x="20" y="215" width="374" height="17"/>
+                                <color key="tintColor" systemColor="tintColor"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                <color key="textColor" systemColor="systemGrayColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="r6G-Iy-52F">
+                                <rect key="frame" x="176.5" y="240" width="61" height="25"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="25" id="iUn-3A-TRE"/>
+                                </constraints>
+                                <color key="tintColor" systemColor="labelColor"/>
+                                <state key="normal" title="Button"/>
+                                <buttonConfiguration key="configuration" style="filled" title="LOGIN">
+                                    <fontDescription key="titleFontDescription" type="system" pointSize="12"/>
+                                </buttonConfiguration>
+                            </button>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="EW3-tZ-XKp"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
                             <constraint firstItem="nim-58-zjc" firstAttribute="centerX" secondItem="c8L-V8-I1g" secondAttribute="centerX" id="1At-pR-p9E"/>
+                            <constraint firstItem="6YT-EA-rdk" firstAttribute="top" secondItem="Hor-5y-mXt" secondAttribute="bottom" constant="20" id="2Vk-GS-3Sp"/>
                             <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="amR-gf-O8n" secondAttribute="trailing" constant="40" id="9Bu-nb-uOE"/>
                             <constraint firstItem="XNI-ec-RQS" firstAttribute="leading" secondItem="EW3-tZ-XKp" secondAttribute="leading" constant="20" id="F8y-TU-1IG"/>
+                            <constraint firstItem="r6G-Iy-52F" firstAttribute="top" secondItem="6YT-EA-rdk" secondAttribute="bottom" constant="8" symbolic="YES" id="He4-HF-kWt"/>
                             <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="ytt-6A-LrS" secondAttribute="trailing" constant="30" id="NoJ-Wa-EW3"/>
                             <constraint firstItem="Hor-5y-mXt" firstAttribute="top" secondItem="XNI-ec-RQS" secondAttribute="bottom" constant="10" id="QC1-Jp-kSJ"/>
                             <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="nim-58-zjc" secondAttribute="trailing" constant="20" id="Rdb-lb-gOO"/>
                             <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="Hor-5y-mXt" secondAttribute="trailing" constant="20" id="Uti-pJ-9cB"/>
                             <constraint firstItem="XNI-ec-RQS" firstAttribute="top" secondItem="nim-58-zjc" secondAttribute="bottom" constant="20" id="XJb-ck-66S"/>
+                            <constraint firstItem="6YT-EA-rdk" firstAttribute="leading" secondItem="EW3-tZ-XKp" secondAttribute="leading" constant="20" id="aLA-qc-p5U"/>
                             <constraint firstItem="amR-gf-O8n" firstAttribute="top" secondItem="EW3-tZ-XKp" secondAttribute="top" constant="10" id="cHv-VJ-65A"/>
+                            <constraint firstItem="r6G-Iy-52F" firstAttribute="centerX" secondItem="c8L-V8-I1g" secondAttribute="centerX" id="e2I-HK-gQD"/>
                             <constraint firstItem="Hor-5y-mXt" firstAttribute="leading" secondItem="EW3-tZ-XKp" secondAttribute="leading" constant="20" id="fEc-ef-RCK"/>
                             <constraint firstItem="nim-58-zjc" firstAttribute="top" secondItem="amR-gf-O8n" secondAttribute="bottom" constant="20" id="jyZ-aK-9gQ"/>
                             <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="XNI-ec-RQS" secondAttribute="trailing" constant="20" id="mK7-0L-TMj"/>
                             <constraint firstItem="ytt-6A-LrS" firstAttribute="top" secondItem="XNI-ec-RQS" secondAttribute="bottom" constant="17" id="nYy-do-ekB"/>
                             <constraint firstItem="amR-gf-O8n" firstAttribute="leading" secondItem="EW3-tZ-XKp" secondAttribute="leading" constant="40" id="qFO-qL-lQ1"/>
+                            <constraint firstItem="EW3-tZ-XKp" firstAttribute="trailing" secondItem="6YT-EA-rdk" secondAttribute="trailing" constant="20" id="rYI-s9-lyt"/>
                             <constraint firstItem="nim-58-zjc" firstAttribute="leading" secondItem="EW3-tZ-XKp" secondAttribute="leading" constant="20" id="tZ9-b7-MkZ"/>
                         </constraints>
                     </view>
                     <connections>
                         <outlet property="descField" destination="nim-58-zjc" id="zth-t5-Han"/>
+                        <outlet property="loginButton" destination="r6G-Iy-52F" id="6o2-jJ-vFz"/>
+                        <outlet property="loginQuest" destination="6YT-EA-rdk" id="mwg-HO-Vud"/>
                         <outlet property="passwordField" destination="Hor-5y-mXt" id="a2P-Nb-M0P"/>
                         <outlet property="showPasswordButton" destination="ytt-6A-LrS" id="hG3-NY-3cH"/>
                         <outlet property="usernameField" destination="XNI-ec-RQS" id="dhB-Ay-LTJ"/>
@@ -967,33 +992,33 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kTB-1V-x5Q">
-                                <rect key="frame" x="40" y="222" width="334" height="2"/>
+                                <rect key="frame" x="40" y="226" width="334" height="2"/>
                                 <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="2" id="fjW-7f-3fX"/>
                                 </constraints>
                             </view>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pb_cd_person" translatesAutoresizingMaskIntoConstraints="NO" id="QJj-ZS-JXF">
-                                <rect key="frame" x="87" y="84" width="240" height="128"/>
+                                <rect key="frame" x="87" y="88" width="240" height="128"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="128" id="EbJ-oL-HS6"/>
                                     <constraint firstAttribute="width" constant="240" id="xfn-bE-JX9"/>
                                 </constraints>
                             </imageView>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your Nickname" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="1fG-j6-8fG">
-                                <rect key="frame" x="20" y="234" width="374" height="34"/>
+                                <rect key="frame" x="20" y="238" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="8GQ-Mu-dYz" customClass="PasswordTextField" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="20" y="278" width="374" height="34"/>
+                                <rect key="frame" x="20" y="282" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X96-Lm-m7m">
-                                <rect key="frame" x="356" y="284" width="27" height="22"/>
+                                <rect key="frame" x="356" y="288" width="27" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -1036,32 +1061,32 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Change password to keep your account secure" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yqd-uF-xRd">
-                                <rect key="frame" x="40" y="84" width="334" height="17"/>
+                                <rect key="frame" x="40" y="88" width="334" height="17"/>
                                 <color key="tintColor" systemColor="tintColor"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <color key="textColor" systemColor="systemGrayColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Old password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="g7J-Td-biq" customClass="PasswordTextField" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="20" y="121" width="374" height="34"/>
+                                <rect key="frame" x="20" y="125" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C5k-R9-1NU">
-                                <rect key="frame" x="356" y="127" width="27" height="22"/>
+                                <rect key="frame" x="356" y="131" width="27" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
                             </button>
                             <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="New password" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bDv-aU-6EW" customClass="PasswordTextField" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="20" y="165" width="374" height="34"/>
+                                <rect key="frame" x="20" y="169" width="374" height="34"/>
                                 <color key="tintColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="14"/>
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZZQ-tO-BPg">
-                                <rect key="frame" x="356" y="171" width="27" height="22"/>
+                                <rect key="frame" x="356" y="175" width="27" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -1149,7 +1174,7 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="profileCell" id="0wF-pE-j3u" customClass="ProfileCell" customModule="NexilisLite" customModuleProvider="target">
-                                <rect key="frame" x="20" y="49.5" width="374" height="43.5"/>
+                                <rect key="frame" x="20" y="55.5" width="374" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="0wF-pE-j3u" id="5QZ-kT-xNR">
                                     <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@@ -1183,7 +1208,7 @@
                                 </connections>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="none" indentationWidth="10" reuseIdentifier="reuseIdentifier" id="PHV-Mi-xcN">
-                                <rect key="frame" x="20" y="93" width="374" height="43.5"/>
+                                <rect key="frame" x="20" y="99" width="374" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PHV-Mi-xcN" id="iGc-u7-rr2">
                                     <rect key="frame" x="0.0" y="0.0" width="374" height="43.5"/>
@@ -1378,7 +1403,7 @@
                                 </constraints>
                             </view>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nGr-Yc-eYs">
-                                <rect key="frame" x="284" y="54" width="120" height="160"/>
+                                <rect key="frame" x="284" y="58" width="120" height="160"/>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstAttribute="height" constant="160" id="2De-wS-ZKZ"/>
@@ -1405,13 +1430,13 @@
                                 <state key="normal" image="phone.down.fill" catalog="system"/>
                             </button>
                             <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Outgoing Video Call" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XYc-LN-m7Y">
-                                <rect key="frame" x="131" y="54" width="152" height="21"/>
+                                <rect key="frame" x="131" y="58" width="152" height="21"/>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="fl4-q1-mqH">
-                                <rect key="frame" x="284" y="214" width="120" height="582"/>
+                                <rect key="frame" x="284" y="218" width="120" height="578"/>
                                 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <constraints>
                                     <constraint firstAttribute="width" constant="120" id="sxa-uT-dTO"/>
@@ -1420,7 +1445,7 @@
                                 <color key="sectionIndexBackgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="none" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="remoteViewCell" id="5CW-CE-fQt" customClass="CustomCellRemoteView" customModule="NexilisLite" customModuleProvider="target">
-                                        <rect key="frame" x="0.0" y="44.5" width="120" height="160"/>
+                                        <rect key="frame" x="0.0" y="50" width="120" height="160"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="5CW-CE-fQt" id="GmH-A6-dK4">
                                             <rect key="frame" x="0.0" y="0.0" width="120" height="160"/>
@@ -1552,7 +1577,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="reuseCell" id="jeA-6G-jy2">
-                                <rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="jeA-6G-jy2" id="DdU-aI-BRO">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -1585,10 +1610,10 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="XbX-90-NVU">
-                                <rect key="frame" x="0.0" y="44" width="414" height="818"/>
+                                <rect key="frame" x="0.0" y="48" width="414" height="814"/>
                             </imageView>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dtn-XY-Yjx">
-                                <rect key="frame" x="369" y="64" width="25" height="22"/>
+                                <rect key="frame" x="369" y="68" width="25" height="22"/>
                                 <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <state key="normal" image="arrow.triangle.2.circlepath.camera.fill" catalog="system"/>
                             </button>
@@ -1599,7 +1624,7 @@
                                 <nil key="highlightedColor"/>
                             </label>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VhD-Mu-Dj1">
-                                <rect key="frame" x="20" y="56" width="46" height="34"/>
+                                <rect key="frame" x="20" y="60" width="46" height="34"/>
                                 <color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <state key="normal" title="Close"/>
                                 <connections>
@@ -1642,7 +1667,7 @@
                 <navigationController storyboardIdentifier="streamingNav" automaticallyAdjustsScrollViewInsets="NO" id="dEs-fL-JC4" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="VMx-jK-5xn">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -1660,7 +1685,7 @@
                 <navigationController storyboardIdentifier="settingNav" automaticallyAdjustsScrollViewInsets="NO" id="jUQ-Vs-n9A" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="5pa-h0-hNP">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -1678,7 +1703,7 @@
                 <navigationController storyboardIdentifier="contactChatNav" automaticallyAdjustsScrollViewInsets="NO" id="fN9-fa-00b" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="cuo-kr-hfM">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -1700,7 +1725,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierChat" id="zd4-bn-4R1">
-                                <rect key="frame" x="0.0" y="44.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="zd4-bn-4R1" id="N2x-sI-FVQ">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -1708,7 +1733,7 @@
                                 </tableViewCellContentView>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierContact" id="C8N-ND-gaQ">
-                                <rect key="frame" x="0.0" y="88" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="93.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="C8N-ND-gaQ" id="RU8-Cm-q4o">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -1716,7 +1741,7 @@
                                 </tableViewCellContentView>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierGroup" id="fwt-K3-Cph">
-                                <rect key="frame" x="0.0" y="131.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="137" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="fwt-K3-Cph" id="wls-xz-0W0">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -1745,7 +1770,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifier" id="XJk-Zo-ZWJ">
-                                <rect key="frame" x="0.0" y="44.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="XJk-Zo-ZWJ" id="Ssg-PF-ctd">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -1770,7 +1795,7 @@
                 <navigationController storyboardIdentifier="addFriendNav" automaticallyAdjustsScrollViewInsets="NO" id="7Wn-tA-a36" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="BPo-Ji-MTR">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -1787,7 +1812,7 @@
             <objects>
                 <viewController storyboardIdentifier="videoVCQmera" id="gD1-QK-4o7" customClass="QmeraVideoViewController" customModule="NexilisLite" customModuleProvider="target" sceneMemberID="viewController">
                     <view key="view" contentMode="scaleToFill" id="v1l-Ih-Bwq">
-                        <rect key="frame" x="0.0" y="0.0" width="414" height="842"/>
+                        <rect key="frame" x="0.0" y="0.0" width="414" height="838"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <viewLayoutGuide key="safeArea" id="ls5-RN-thL"/>
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
@@ -1804,7 +1829,7 @@
                 <navigationController storyboardIdentifier="createGroupNav" automaticallyAdjustsScrollViewInsets="NO" id="gGk-tB-HXd" sceneMemberID="viewController">
                     <toolbarItems/>
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="AVS-vC-GWW">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <nil name="viewControllers"/>
@@ -1831,7 +1856,7 @@
                                         <rect key="frame" x="0.0" y="10" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="LMB-bw-Bw2" id="yfs-8p-jg3">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Target Audience" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bQi-FR-XdS">
@@ -1858,7 +1883,7 @@
                                         <rect key="frame" x="0.0" y="53.5" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="GLM-eF-OVa" id="fGs-XI-hzd">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Broadcast Type" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vy3-7B-AVq">
@@ -1885,7 +1910,7 @@
                                         <rect key="frame" x="0.0" y="97" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="kxc-P5-eRH" id="Jra-ac-Ppc">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Broadcast Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9bR-wi-Nl9">
@@ -1912,7 +1937,7 @@
                                         <rect key="frame" x="0.0" y="140.5" width="414" height="43.5"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="ZLb-aH-mzP" id="Ojf-jm-OaD">
-                                            <rect key="frame" x="0.0" y="0.0" width="385.5" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="383.5" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Broadcast Variant" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lpV-Iz-jU7">
@@ -2056,7 +2081,7 @@
                                                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                                     <prototypes>
                                                         <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="memberCell" id="KLi-it-fQR" customClass="BroadcastMembersTableViewCell" customModule="NexilisLite" customModuleProvider="target">
-                                                            <rect key="frame" x="0.0" y="44.5" width="414" height="43.5"/>
+                                                            <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
                                                             <autoresizingMask key="autoresizingMask"/>
                                                             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KLi-it-fQR" id="T6c-sB-rPD">
                                                                 <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -2285,7 +2310,7 @@
             <objects>
                 <navigationController storyboardIdentifier="broadcastNav" title="Broadcast Navigation Controller" modalPresentationStyle="fullScreen" id="NH6-7u-Fec" sceneMemberID="viewController">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="56D-ii-ei5">
-                        <rect key="frame" x="0.0" y="44" width="414" height="44"/>
+                        <rect key="frame" x="0.0" y="48" width="414" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                     </navigationBar>
                     <connections>
@@ -2306,7 +2331,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="reuseCell" id="Pav-Pk-Qle">
-                                <rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="Pav-Pk-Qle" id="pJW-b9-oFZ">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -2340,7 +2365,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="reuseCell" id="D0S-Cs-tKI">
-                                <rect key="frame" x="0.0" y="49.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="55.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="D0S-Cs-tKI" id="bHv-cf-3wj">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -2374,7 +2399,7 @@
                         <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <prototypes>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierContact" id="T7c-Gy-ZCh">
-                                <rect key="frame" x="0.0" y="44.5" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="T7c-Gy-ZCh" id="efe-Ef-u3N">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -2385,7 +2410,7 @@
                                 </connections>
                             </tableViewCell>
                             <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="reuseIdentifierGroup" id="KzB-f3-raJ">
-                                <rect key="frame" x="0.0" y="88" width="414" height="43.5"/>
+                                <rect key="frame" x="0.0" y="93.5" width="414" height="43.5"/>
                                 <autoresizingMask key="autoresizingMask"/>
                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KzB-f3-raJ" id="DdU-Cy-zh3">
                                     <rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -2857,12 +2882,12 @@
                                 <rect key="frame" x="107" y="836" width="200" height="30"/>
                                 <subviews>
                                     <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ldh-a7-G8u">
-                                        <rect key="frame" x="0.0" y="0.0" width="61" height="30"/>
+                                        <rect key="frame" x="0.0" y="0.0" width="67.5" height="30"/>
                                         <state key="normal" title="Button"/>
                                         <buttonConfiguration key="configuration" style="plain" title="Alpha"/>
                                     </button>
                                     <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="100" minValue="0.0" maxValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="BPs-KH-mSQ">
-                                        <rect key="frame" x="59" y="0.0" width="143" height="31"/>
+                                        <rect key="frame" x="65.5" y="0.0" width="136.5" height="31"/>
                                         <connections>
                                             <action selector="onAlphaChanged:" destination="m7A-yE-OFx" eventType="valueChanged" id="X0j-xb-PBe"/>
                                         </connections>
@@ -2901,32 +2926,32 @@
         <image name="Send-Image" width="500" height="500"/>
         <image name="Sofa" width="2048" height="1677"/>
         <image name="Sticker---Emoji" width="500" height="500"/>
-        <image name="arrow.triangle.2.circlepath.camera.fill" catalog="system" width="128" height="94"/>
-        <image name="eye.fill" catalog="system" width="128" height="78"/>
-        <image name="gearshape.fill" catalog="system" width="128" height="121"/>
+        <image name="arrow.triangle.2.circlepath.camera.fill" catalog="system" width="128" height="93"/>
+        <image name="eye.fill" catalog="system" width="128" height="80"/>
+        <image name="gearshape.fill" catalog="system" width="128" height="123"/>
         <image name="ic_internal" width="128" height="128"/>
-        <image name="message.circle.fill" catalog="system" width="128" height="121"/>
-        <image name="message.fill" catalog="system" width="128" height="113"/>
+        <image name="message.circle.fill" catalog="system" width="128" height="123"/>
+        <image name="message.fill" catalog="system" width="128" height="114"/>
         <image name="mic.slash.fill" catalog="system" width="108" height="128"/>
         <image name="pb_cd_person" width="512" height="512"/>
         <image name="pdf-icon" width="860" height="901"/>
         <image name="pencil" catalog="system" width="128" height="113"/>
-        <image name="person.badge.plus.fill" catalog="system" width="128" height="124"/>
-        <image name="person.circle.fill" catalog="system" width="128" height="121"/>
-        <image name="person.crop.circle.fill" catalog="system" width="128" height="121"/>
+        <image name="person.badge.plus.fill" catalog="system" width="128" height="125"/>
+        <image name="person.circle.fill" catalog="system" width="128" height="123"/>
+        <image name="person.crop.circle.fill" catalog="system" width="128" height="123"/>
         <image name="person.fill" catalog="system" width="128" height="120"/>
         <image name="phone" catalog="system" width="128" height="115"/>
-        <image name="phone.down.fill" catalog="system" width="128" height="52"/>
+        <image name="phone.down.fill" catalog="system" width="128" height="55"/>
         <image name="phone.fill" catalog="system" width="128" height="114"/>
         <image name="plus" catalog="system" width="128" height="113"/>
-        <image name="speaker.slash.fill" catalog="system" width="124" height="128"/>
-        <image name="speaker.wave.3.fill" catalog="system" width="128" height="86"/>
-        <image name="trash.circle.fill" catalog="system" width="128" height="121"/>
-        <image name="video" catalog="system" width="128" height="83"/>
-        <image name="video.fill" catalog="system" width="128" height="82"/>
-        <image name="xmark.circle.fill" catalog="system" width="128" height="121"/>
+        <image name="speaker.slash.fill" catalog="system" width="118" height="128"/>
+        <image name="speaker.wave.3.fill" catalog="system" width="128" height="84"/>
+        <image name="trash.circle.fill" catalog="system" width="128" height="123"/>
+        <image name="video" catalog="system" width="128" height="82"/>
+        <image name="video.fill" catalog="system" width="128" height="81"/>
+        <image name="xmark.circle.fill" catalog="system" width="128" height="123"/>
         <systemColor name="labelColor">
-            <color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <color red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
         </systemColor>
         <systemColor name="secondarySystemBackgroundColor">
             <color red="0.94901960784313721" green="0.94901960784313721" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>

+ 7 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/id.lproj/Localizable.strings

@@ -178,3 +178,10 @@
 "Are you sure you want to end video call?" = "Apakah anda yakin ingin mengakhiri panggilan video?";
 "Please wait..." = "Mohon tunggu...";
 "Unable to access servers. Try again later" = "Tidak dapat mengakses server. Coba lagi nanti";
+"Unregistered email account" = "Akun email tidak terdaftar";
+"Or do you have an account" = "Atau punya akun?";
+"Verification Code" = "Kode Verifikasi";
+"Your verification code has been sent to" = "Kode verifikasi telah dikirim ke";
+"Please check your email and enter the code sent" = "Harap periksa email anda dan masukkan kode yang tertera";
+"Expired OTP" = "OTP telah kadaluarsa";
+"Invalid OTP" = "OTP tidak valid"

+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/CoreMessage_TMessageBank.swift

@@ -1222,6 +1222,27 @@ public class CoreMessage_TMessageBank {
         return tmessage
     }
     
+    public static func getSendOTPLogin(p_email: String) -> TMessage {
+        let me = UserDefaults.standard.string(forKey: "me")!
+        let tmessage = TMessage()
+        tmessage.mCode = CoreMessage_TMessageCode.SEND_OTP_LOGIN
+        tmessage.mStatus = CoreMessage_TMessageUtil.getTID()
+        tmessage.mPIN = me
+        tmessage.mBodies[CoreMessage_TMessageKey.EMAIL] = p_email
+        return tmessage
+    }
+
+    public static func getSendVerifyChangeDevice(p_email: String, p_vercode: String) -> TMessage {
+        let me = UserDefaults.standard.string(forKey: "me")!
+        let tmessage = TMessage()
+        tmessage.mCode = CoreMessage_TMessageCode.SEND_VERIFY_LOGIN
+        tmessage.mStatus = CoreMessage_TMessageUtil.getTID()
+        tmessage.mPIN = me
+        tmessage.mBodies[CoreMessage_TMessageKey.EMAIL] = p_email
+        tmessage.mBodies[CoreMessage_TMessageKey.OTP] = p_vercode
+        return tmessage;
+    }
+    
     public static func getChangePersonMSISDN(msisdn: String) -> TMessage {
         let me = UserDefaults.standard.string(forKey: "me")!
         let tmessage = TMessage()

+ 2 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/CoreMessage_TMessageCode.swift

@@ -630,6 +630,8 @@ public class CoreMessage_TMessageCode {
     public static let SEND_CHANGE_MSISDN = "B8D";
     public static let SEND_SIGNIN_OTP = "SSI01A";
     public static let SEND_SIGNUP_OTP = "SSU01O";
+    public static let SEND_VERIFY_LOGIN = "SVL";
+    public static let SEND_OTP_LOGIN = "SOTL";
     
     //Whiteboard
     public static let DRAW_WHITEBOARD = "DWB";

+ 132 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeDeviceViewController.swift

@@ -16,6 +16,7 @@ public class ChangeDeviceViewController: UIViewController {
     
     public var isDismiss: ((String) -> ())?
     public var forceLogin = false
+    public var fromChangeNamePass = false
     
     public override func viewDidLoad() {
         super.viewDidLoad()
@@ -28,8 +29,9 @@ public class ChangeDeviceViewController: UIViewController {
         passwordField.addPadding(.right(40))
         passwordField.isSecureTextEntry = true
         showPasswordButton.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
-        usernameField.placeholder = "Your Nickname".localized()
+        usernameField.placeholder = "Your Nickname".localized() + "/" + "Email".localized()
         passwordField.placeholder = "Password".localized()
+        usernameField.addTarget(self, action: #selector(checkUsername(_:)), for: .editingChanged)
         
         showPasswordButton.addTarget(self, action: #selector(showPassword), for: .touchUpInside)
         
@@ -38,6 +40,24 @@ public class ChangeDeviceViewController: UIViewController {
         view.addGestureRecognizer(tapGesture)
     }
     
+    @objc func checkUsername(_ textField: UITextField) {
+        let text : String! = usernameField.text
+        if isValidEmail(text) {
+            passwordField.isHidden = true
+            showPasswordButton.isHidden = true
+        } else if passwordField.isHidden {
+            passwordField.isHidden = false
+            showPasswordButton.isHidden = false
+        }
+    }
+    
+    func isValidEmail(_ email: String) -> Bool {
+        let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,64}"
+
+        let emailPred = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
+        return emailPred.evaluate(with: email)
+    }
+    
     @objc func dismissKeyboard() {
         //Causes the view (or one of its embedded text fields) to resign the first responder status.
         view.endEditing(true)
@@ -53,6 +73,105 @@ public class ChangeDeviceViewController: UIViewController {
         }
     }
     
+    func checkEmail(email: String) {
+        if !CheckConnection.isConnectedToNetwork() || API.nGetCLXConnState() == 0 {
+            let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+            imageView.tintColor = .white
+            let banner = FloatingNotificationBanner(title: "Check your connection".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()
+            return
+        }
+        Nexilis.showLoader()
+        DispatchQueue.global().async {
+            if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.getSendOTPLogin(p_email: email), timeout: 30 * 1000) {
+                if response.getBody(key: CoreMessage_TMessageKey.ERRCOD, default_value: "99") != "00" {
+                    DispatchQueue.main.async {
+                        Nexilis.hideLoader()
+                        let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                        imageView.tintColor = .white
+                        let banner = FloatingNotificationBanner(title: "Unregistered email account".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()
+                    }
+                } else {
+                    DispatchQueue.main.async {
+                        Nexilis.hideLoader()
+                        self.showPageOTP(email: email)
+                    }
+                }
+            } else {
+                DispatchQueue.main.async {
+                    Nexilis.hideLoader()
+                    let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                    imageView.tintColor = .white
+                    let banner = FloatingNotificationBanner(title: "Unable to access servers. Try again later".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()
+                }
+            }
+        }
+    }
+    
+    func showPageOTP(email: String, errCode:String = "") {
+        let showOTPVC = VerifyEmail()
+        showOTPVC.email = email
+        showOTPVC.showWrongOTP = errCode
+        showOTPVC.isDismiss = { code in
+            Nexilis.showLoader()
+            DispatchQueue.global().async {
+                if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.getSendVerifyChangeDevice(p_email: email, p_vercode: code), timeout: 30 * 1000) {
+                    if !response.isOk() {
+                        DispatchQueue.main.async {
+                            Nexilis.hideLoader()
+                            self.showPageOTP(email: email, errCode: response.getBody(key: CoreMessage_TMessageKey.ERRCOD, default_value: "99"))
+                        }
+                    } else {
+                        self.deleteAllRecordDatabase()
+                        let id = response.getBody(key: CoreMessage_TMessageKey.F_PIN, default_value: "")
+                        let thumb = response.getBody(key: CoreMessage_TMessageKey.THUMB_ID, default_value: "")
+                        if(!id.isEmpty) {
+                            Nexilis.changeUser(f_pin: id)
+                            UserDefaults.standard.setValue(id, forKey: "me")
+                            Utils.setProfile(value: true)
+                            UserDefaults.standard.synchronize()
+                            // pos registration
+                            _ = Nexilis.write(message: CoreMessage_TMessageBank.getPostRegistration(p_pin: id))
+                            DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
+                                Nexilis.hideLoader()
+                                let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
+                                imageView.tintColor = .white
+                                let banner = FloatingNotificationBanner(title: "Successfully changed device".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()
+                                if self.fromChangeNamePass{
+                                    var vc = self.navigationController?.presentingViewController
+                                    while vc?.presentingViewController != nil {
+                                        vc = vc?.presentingViewController
+                                    }
+                                    vc?.dismiss(animated: true, completion: nil)
+                                }
+                                else if !self.forceLogin {
+                                    self.navigationController?.popViewController(animated: true)
+                                } else {
+                                    self.navigationController?.dismiss(animated: true)
+                                }
+                                self.isDismiss?(thumb)
+                            })
+                        }
+                    }
+                } else {
+                    DispatchQueue.main.async {
+                        Nexilis.hideLoader()
+                        let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                        imageView.tintColor = .white
+                        let banner = FloatingNotificationBanner(title: "Unable to access servers. Try again later".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()
+                    }
+                }
+            }
+        }
+        DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
+            self.navigationController?.present(showOTPVC, animated: true, completion: nil)
+        })
+    }
+    
     @objc func didTapSubmit(sender: Any) {
         guard let name = usernameField.text, !name.isEmpty else {
             let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
@@ -61,6 +180,10 @@ public class ChangeDeviceViewController: UIViewController {
             banner.show()
             return
         }
+        if isValidEmail(name) {
+            checkEmail(email: name)
+            return
+        }
         if !name.matches("^[a-zA-Z ]*$") {
             let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
             imageView.tintColor = .white
@@ -116,7 +239,6 @@ public class ChangeDeviceViewController: UIViewController {
                     if(!id.isEmpty) {
                         Nexilis.changeUser(f_pin: id)
                         UserDefaults.standard.setValue(id, forKey: "me")
-                        UserDefaults.standard.set(password, forKey: "pwd")
                         Utils.setProfile(value: true)
                         UserDefaults.standard.synchronize()
                         // pos registration
@@ -127,7 +249,14 @@ public class ChangeDeviceViewController: UIViewController {
                             imageView.tintColor = .white
                             let banner = FloatingNotificationBanner(title: "Successfully changed device".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()
-                            if !self.forceLogin {
+                            if self.fromChangeNamePass{
+                                var vc = self.navigationController?.presentingViewController
+                                while vc?.presentingViewController != nil {
+                                    vc = vc?.presentingViewController
+                                }
+                                vc?.dismiss(animated: true, completion: nil)
+                            }
+                            else if !self.forceLogin {
                                 self.navigationController?.popViewController(animated: true)
                             } else {
                                 self.navigationController?.dismiss(animated: true)

+ 12 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangeNamePassswordViewController.swift

@@ -14,6 +14,8 @@ public class ChangeNamePassswordViewController: UIViewController {
     @IBOutlet weak var passwordField: UITextField!
     @IBOutlet weak var showPasswordButton: UIButton!
     @IBOutlet weak var descField: UILabel!
+    @IBOutlet weak var loginQuest: UILabel!
+    @IBOutlet weak var loginButton: UIButton!
     
     public var fromSetting = false
     public var isSuccess: (() -> ())?
@@ -44,11 +46,21 @@ public class ChangeNamePassswordViewController: UIViewController {
         passwordField.placeholder = "Password".localized()
         descField.text = "Please enter your desired Username and Password".localized()
         
+        loginQuest.text = "Or do you have an account".localized()
+        loginButton.setTitle(("Login".localized()).uppercased(), for: .normal)
+        loginButton.addTarget(self, action: #selector(showLogin), for: .touchUpInside)
+        
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(dismissKeyboard))
         tapGesture.cancelsTouchesInView = false
         view.addGestureRecognizer(tapGesture)
     }
     
+    @objc func showLogin() {
+        let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
+        controller.fromChangeNamePass = true
+        navigationController?.show(controller, sender: nil)
+    }
+    
     @objc func dismissKeyboard() {
         //Causes the view (or one of its embedded text fields) to resign the first responder status.
         view.endEditing(true)
@@ -144,7 +156,6 @@ public class ChangeNamePassswordViewController: UIViewController {
                             Database.shared.database?.inTransaction({ fmdb, rollback in
                                 _ = Database.shared.updateRecord(fmdb: fmdb, table: "BUDDY", cvalues: ["first_name": first , "last_name": last], _where: "f_pin = '\(idMe)'")
                             })
-                            UserDefaults.standard.set(password, forKey: "pwd")
                             Utils.setProfile(value: true)
                             UserDefaults.standard.synchronize()
         //                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "updateFifthTab"), object: nil, userInfo: nil)

+ 14 - 8
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ChangePasswordViewController.swift

@@ -54,13 +54,13 @@ class ChangePasswordViewController: UIViewController {
             banner.show()
             return
         }
-        if odlPassword != UserDefaults.standard.string(forKey: "pwd"){
-            let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
-            imageView.tintColor = .white
-            let banner = FloatingNotificationBanner(title: "Incorrect old password".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()
-            return
-        }
+//        if odlPassword != UserDefaults.standard.string(forKey: "pwd"){
+//            let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+//            imageView.tintColor = .white
+//            let banner = FloatingNotificationBanner(title: "Incorrect old password".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()
+//            return
+//        }
         guard let newPassword = newPassField.text, !newPassword.isEmpty else {
             let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
             imageView.tintColor = .white
@@ -84,7 +84,6 @@ class ChangePasswordViewController: UIViewController {
             tMessage.mBodies[CoreMessage_TMessageKey.PASSWORD_OLD] = md5HexOld
             if let resp = Nexilis.writeAndWait(message: tMessage){
                 if resp.isOk() {
-                    UserDefaults.standard.set(newPassword, forKey: "pwd")
                     DispatchQueue.main.async {
                         let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                         imageView.tintColor = .white
@@ -92,6 +91,13 @@ class ChangePasswordViewController: UIViewController {
                         banner.show()
                         self.navigationController?.popViewController(animated: true)
                     }
+                } else {
+                    DispatchQueue.main.async {
+                        let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                        imageView.tintColor = .white
+                        let banner = FloatingNotificationBanner(title: resp.getBody(key: CoreMessage_TMessageKey.MESSAGE_TEXT), 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()
+                    }
                 }
             } else {
                 DispatchQueue.main.async {

+ 0 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift

@@ -348,7 +348,6 @@ public class SettingTableViewController: UITableViewController {
                         if(!id.isEmpty){
                             Nexilis.changeUser(f_pin: id)
                             UserDefaults.standard.setValue(id, forKey: "me")
-                            UserDefaults.standard.set("", forKey: "pwd")
                             Utils.setProfile(value: false)
                             UserDefaults.standard.synchronize()
                             // pos registration

+ 230 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/VerifyEmail.swift

@@ -0,0 +1,230 @@
+//
+//  VerifyEmail.swift
+//  NexilisLite
+//
+//  Created by Akhmad Al Qindi Irsyam on 28/10/22.
+//
+
+import UIKit
+import NotificationBannerSwift
+
+class VerifyEmail: UIViewController, UITextFieldDelegate, OTPTextFieldDelegate {
+    var initialBounds: CGRect?
+    var email = ""
+    let txtField1 = OTPTextField()
+    let txtField2 = OTPTextField()
+    let txtField3 = OTPTextField()
+    let txtField4 = OTPTextField()
+    let txtField5 = OTPTextField()
+    let txtField6 = OTPTextField()
+    var firstLoad = true
+    var isDismiss: ((String) -> ())?
+    var showWrongOTP = ""
+
+    override func viewDidLoad() {
+        super.viewDidLoad()
+
+        view.backgroundColor = .white
+        
+        let topIndicator = UIView()
+        topIndicator.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        topIndicator.layer.cornerRadius = 5
+        topIndicator.layer.masksToBounds = true
+        view.addSubview(topIndicator)
+        topIndicator.anchor(top: view.safeAreaLayoutGuide.topAnchor, paddingTop: 20, centerX: view.centerXAnchor, width: 80, height: 10)
+        
+        let titleVerify = UILabel()
+        titleVerify.font = .systemFont(ofSize: 14, weight: .medium)
+        titleVerify.text = "Verification Code".localized()
+        view.addSubview(titleVerify)
+        titleVerify.anchor(top: topIndicator.bottomAnchor, paddingTop: 8, centerX: view.centerXAnchor)
+        
+        let descVerify = UILabel()
+        descVerify.font = .systemFont(ofSize: 12)
+        descVerify.numberOfLines = 0
+        descVerify.textAlignment = .center
+        descVerify.text = "Your verification code has been sent to".localized() + "\n" + email + "\n" + "Please check your email and enter the code sent".localized()
+        view.addSubview(descVerify)
+        descVerify.anchor(top: titleVerify.bottomAnchor, paddingTop: 8, centerX: view.centerXAnchor)
+        
+        let containerTxt = UIView()
+        view.addSubview(containerTxt)
+        containerTxt.anchor(top: descVerify.bottomAnchor, paddingTop: 20, centerX: view.centerXAnchor, width: 340, height: 60)
+        
+        
+        txtField1.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField1.textAlignment = .center
+        txtField1.font = .systemFont(ofSize: 16)
+        txtField1.keyboardType = .numberPad
+        txtField1.layer.cornerRadius = 5
+        txtField1.layer.masksToBounds = true
+        txtField1.delegate = self
+        txtField1.myDelegate = self
+        containerTxt.addSubview(txtField1)
+        txtField1.anchor(left: containerTxt.leftAnchor, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField2.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField2.textAlignment = .center
+        txtField2.keyboardType = .numberPad
+        txtField2.font = .systemFont(ofSize: 16)
+        txtField2.layer.cornerRadius = 5
+        txtField2.layer.masksToBounds = true
+        txtField2.delegate = self
+        txtField2.myDelegate = self
+        containerTxt.addSubview(txtField2)
+        txtField2.anchor(left: txtField1.rightAnchor, paddingLeft: 8, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField3.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField3.textAlignment = .center
+        txtField3.keyboardType = .numberPad
+        txtField3.font = .systemFont(ofSize: 16)
+        txtField3.layer.cornerRadius = 5
+        txtField3.layer.masksToBounds = true
+        txtField3.delegate = self
+        txtField3.myDelegate = self
+        containerTxt.addSubview(txtField3)
+        txtField3.anchor(left: txtField2.rightAnchor, paddingLeft: 8, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField4.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField4.textAlignment = .center
+        txtField4.keyboardType = .numberPad
+        txtField4.font = .systemFont(ofSize: 16)
+        txtField4.layer.cornerRadius = 5
+        txtField4.layer.masksToBounds = true
+        txtField4.delegate = self
+        txtField4.myDelegate = self
+        containerTxt.addSubview(txtField4)
+        txtField4.anchor(left: txtField3.rightAnchor, paddingLeft: 8, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField5.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField5.textAlignment = .center
+        txtField5.keyboardType = .numberPad
+        txtField5.font = .systemFont(ofSize: 16)
+        txtField5.layer.cornerRadius = 5
+        txtField5.layer.masksToBounds = true
+        txtField5.delegate = self
+        txtField5.myDelegate = self
+        containerTxt.addSubview(txtField5)
+        txtField5.anchor(left: txtField4.rightAnchor, paddingLeft: 8, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField6.backgroundColor = .lightGray.withAlphaComponent(0.5)
+        txtField6.textAlignment = .center
+        txtField6.keyboardType = .numberPad
+        txtField6.font = .systemFont(ofSize: 16)
+        txtField6.layer.cornerRadius = 5
+        txtField6.layer.masksToBounds = true
+        txtField6.delegate = self
+        txtField6.myDelegate = self
+        containerTxt.addSubview(txtField6)
+        txtField6.anchor(left: txtField5.rightAnchor, paddingLeft: 8, centerY: containerTxt.centerYAnchor, width: 50, height: 60)
+        
+        txtField1.becomeFirstResponder()
+        
+        if !showWrongOTP.isEmpty {
+            if showWrongOTP == "3t" {
+                let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                imageView.tintColor = .white
+                let banner = FloatingNotificationBanner(title: "Expired OTP".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()
+            } else if showWrongOTP == "4t" {
+                let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                imageView.tintColor = .white
+                let banner = FloatingNotificationBanner(title: "Invalid OTP".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()
+            }
+        }
+    }
+    
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        if (string.count == 1){
+            if textField == txtField1 {
+               txtField2.becomeFirstResponder()
+            }
+            if textField == txtField2 {
+               txtField3.becomeFirstResponder()
+            }
+            if textField == txtField3 {
+               txtField4.becomeFirstResponder()
+            }
+            if textField == txtField4 {
+                txtField5.becomeFirstResponder()
+            }
+            if textField == txtField5 {
+                txtField6.becomeFirstResponder()
+            }
+            if textField == txtField6 {
+               textField.text? = string
+                txtField6.resignFirstResponder()
+                self.dismiss(animated: true, completion: {
+                    self.isDismiss?("\(self.txtField1.text!)\(self.txtField2.text!)\(self.txtField3.text!)\(self.txtField4.text!)\(self.txtField5.text!)\(self.txtField6.text!)")
+                })
+               return false
+            }
+            textField.text? = string
+            return false
+       } else {
+            if textField == txtField1 {
+               txtField1.becomeFirstResponder()
+            }
+            if textField == txtField2 {
+               txtField1.becomeFirstResponder()
+            }
+            if textField == txtField3 {
+               txtField2.becomeFirstResponder()
+            }
+            if textField == txtField4 {
+               txtField3.becomeFirstResponder()
+            }
+            if textField == txtField5 {
+              txtField4.becomeFirstResponder()
+            }
+            if textField == txtField6 {
+              txtField5.becomeFirstResponder()
+            }
+            textField.text? = string
+            return false
+       }
+    }
+    
+    func textFieldDidDelete() {
+        if txtField2.isFirstResponder && txtField2.text!.isEmpty {
+            txtField1.text = ""
+            txtField1.becomeFirstResponder()
+        } else if txtField3.isFirstResponder && txtField3.text!.isEmpty {
+            txtField2.text = ""
+            txtField2.becomeFirstResponder()
+        } else if txtField4.isFirstResponder && txtField4.text!.isEmpty {
+            txtField3.text = ""
+            txtField3.becomeFirstResponder()
+        } else if txtField5.isFirstResponder && txtField5.text!.isEmpty {
+            txtField4.text = ""
+            txtField4.becomeFirstResponder()
+        } else if txtField6.isFirstResponder && txtField6.text!.isEmpty {
+            txtField5.text = ""
+            txtField5.becomeFirstResponder()
+        }
+    }
+    
+    override func viewDidLayoutSubviews() {
+        if firstLoad {
+            firstLoad = false
+            view.layer.cornerRadius = 20
+            view.layer.masksToBounds = true
+            view.frame = CGRect(x: 0, y: view.bounds.height / 5 * 2 - 50, width: view.bounds.width, height: view.bounds.height / 5 * 3 + 50)
+        }
+    }
+}
+
+protocol OTPTextFieldDelegate: AnyObject {
+    func textFieldDidDelete()
+}
+
+class OTPTextField: UITextField {
+
+    weak var myDelegate: OTPTextFieldDelegate?
+
+    override func deleteBackward() {
+        super.deleteBackward()
+        myDelegate?.textFieldDidDelete()
+    }
+}