alqindiirsyam 2 jaren geleden
bovenliggende
commit
b37ab0c855
18 gewijzigde bestanden met toevoegingen van 147 en 29 verwijderingen
  1. 1 1
      appbuilder-ios/AppBuilder/AppBuilder/AppDelegate.swift
  2. 12 1
      appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift
  3. 2 0
      appbuilder-ios/AppBuilder/AppBuilder/Info.plist
  4. 8 0
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  5. 8 3
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  6. 1 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift
  7. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift
  8. 7 3
      appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift
  9. 50 8
      appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift
  10. 5 5
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift
  11. 6 3
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift
  12. 7 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  13. 9 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  14. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift
  15. 9 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  16. 8 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift
  17. 2 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SettingTableViewController.swift
  18. 8 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SignUpSignIn.swift

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

@@ -117,7 +117,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
             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, fromMAB: true) //AA6164AA13F0A6262677AC7443C37E3F6F0A342E8BEE84B700CB59C876166FE0(AWS) //36BCB99AA3885165E64ECC50591C4DA5072A25B2E7BAADA5A1B57E18737FF88C(CBN)
+            Nexilis.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: showButton, fromMAB: true) //AA6164AA13F0A6262677AC7443C37E3F6F0A342E8BEE84B700CB59C876166FE0(AWS) //1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18(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)

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

@@ -261,11 +261,17 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
     override public func viewWillAppear(_ animated: Bool) {
         self.navigationController?.navigationBar.topItem?.title = ""
         self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithTransparentBackground()
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         navigationController?.navigationBar.backgroundColor = .clear
         navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
         navigationController?.navigationBar.shadowImage = UIImage()
         navigationController?.navigationBar.isTranslucent = true
         navigationController?.setNavigationBarHidden(false, animated: false)
+        navigationController?.navigationBar.overrideUserInterfaceStyle = .light
+        navigationController?.navigationBar.barStyle = .default
         navigationController?.navigationBar.tintColor = .black
         tabBarController?.navigationItem.leftBarButtonItem = nil
         tabBarController?.navigationItem.searchController = nil
@@ -320,7 +326,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         if let arr = Item.menus[section] {
             let menu = arr[indexPath.row]
             content.image = menu.icon
-            content.imageProperties.tintColor = .mainColor
+            content.imageProperties.tintColor = .black
             content.imageProperties.maximumSize = CGSize(width: 24, height: 24)
             content.text = menu.title
             cell.accessoryView = nil
@@ -474,6 +480,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 Nexilis.showLoader()
                 DispatchQueue.global().async {
                     self.deleteAllRecordDatabase()
+                    UserDefaults.standard.removeObject(forKey: "device_id")
                     Nexilis.destroyAll()
                     let apiKey = Nexilis.sAPIKey
                     var id = UIDevice.current.identifierForVendor?.uuidString ?? "UNK-DEVICE"
@@ -574,6 +581,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
+            navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+            navigationController.navigationBar.barStyle = .black
             navigationController.modalPresentationStyle = .custom
             self.present(navigationController, animated: true)
         } else if item.title == "Notification Message(s)".localized() || item.title == "Notification Message(s) Group".localized() {
@@ -585,6 +594,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
+            navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+            navigationController.navigationBar.barStyle = .black
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor

+ 2 - 0
appbuilder-ios/AppBuilder/AppBuilder/Info.plist

@@ -22,6 +22,8 @@
 	<string>$(CURRENT_PROJECT_VERSION)</string>
 	<key>LSRequiresIPhoneOS</key>
 	<true/>
+    <key>UIViewControllerBasedStatusBarAppearance</key>
+    <true/>
 	<key>NSCameraUsageDescription</key>
 	<string>Video Call, Conference Room, Content Creation and Live Streaming.</string>
 	<key>NSContactsUsageDescription</key>

+ 8 - 0
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -150,6 +150,8 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         self.navigationController?.present(navigationController, animated: true, completion: nil)
     }
     
@@ -305,12 +307,18 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     override func viewWillAppear(_ animated: Bool) {
 //        tabBarController?.navigationItem.leftBarButtonItem = cancelSearchButton
         self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.black]
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithTransparentBackground()
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         navigationController?.navigationBar.backgroundColor = .clear
         navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
         navigationController?.navigationBar.shadowImage = UIImage()
         navigationController?.navigationBar.isTranslucent = true
         navigationController?.setNavigationBarHidden(false, animated: false)
         navigationController?.navigationBar.tintColor = .black
+        navigationController?.navigationBar.overrideUserInterfaceStyle = .light
+        navigationController?.navigationBar.barStyle = .default
         tabBarController?.navigationItem.leftBarButtonItem = voiceItem
         tabBarController?.navigationItem.searchController = searchController
         tabBarController?.navigationItem.rightBarButtonItem = menuItem

+ 8 - 3
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -197,12 +197,15 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             }))
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                 ViewController.resetTabSelected()
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -449,6 +452,8 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -514,13 +519,13 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
             
             let imageAgree = UIImageView()
             imageAgree.image = UIImage(systemName: "arrow.forward.circle")
-            imageAgree.tintColor = .mainColor
+            imageAgree.tintColor = .black
             containerButton.addSubview(imageAgree)
             imageAgree.anchor(left: containerButton.leftAnchor, centerY: containerButton.centerYAnchor, width: 40, height: 40)
             
             let titleAgree = UILabel()
             titleAgree.text = "Agree and Continue".localized()
-            titleAgree.textColor = .mainColor
+            titleAgree.textColor = .black
             containerButton.addSubview(titleAgree)
             titleAgree.anchor(left: imageAgree.rightAnchor, right: containerButton.rightAnchor, paddingLeft: 5, centerY: containerButton.centerYAnchor)
             

+ 1 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -319,7 +319,7 @@ extension URL {
 
 extension UIColor {
     public static var mainColor: UIColor {
-        renderColor(hex: "#000000")
+        renderColor(hex: "#3669ad")
     }
     
     public static var secondaryColor: UIColor {

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

@@ -356,6 +356,8 @@ public class FloatingButton: UIView {
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor

+ 7 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/Model/User.swift

@@ -19,6 +19,7 @@ public class User: Model {
     public var offline_mode: String?
     public var ex_block: String?
     public var ex_offmp: String?
+    public var device_id: String
     
     public var isSelected: Bool = false
     
@@ -32,9 +33,10 @@ public class User: Model {
         self.offline_mode = ""
         self.ex_block = ""
         self.ex_offmp = ""
+        self.device_id = ""
     }
     
-    public init(pin: String, firstName: String, lastName: String, thumb: String, userType: String = "0", privacy_flag: String = "", offline_mode: String = "", ex_block: String = "", official: String = "", ex_offmp: String = "") {
+    public init(pin: String, firstName: String, lastName: String, thumb: String, userType: String = "0", privacy_flag: String = "", offline_mode: String = "", ex_block: String = "", official: String = "", ex_offmp: String = "", device_id: String = "") {
         self.pin = pin
         self.firstName = firstName
         self.lastName = lastName
@@ -45,6 +47,7 @@ public class User: Model {
         self.official = official
         self.ex_block = ex_block
         self.ex_offmp = ex_offmp
+        self.device_id = device_id
     }
     
     public static func == (lhs: User, rhs: User) -> Bool {
@@ -65,7 +68,7 @@ public class User: Model {
         }
         var user: User?
         Database.shared.database?.inTransaction({ fmdb, rollback in
-            if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select f_pin, first_name, last_name, image_id, user_type, privacy_flag, offline_mode, ex_block from BUDDY where f_pin = '\(pin)'"), cursor.next() {
+            if let cursor = Database.shared.getRecords(fmdb: fmdb, query: "select f_pin, first_name, last_name, image_id, user_type, privacy_flag, offline_mode, ex_block, device_id from BUDDY where f_pin = '\(pin)' OR device_id = '\(pin)'"), cursor.next() {
                 user = User(pin: cursor.string(forColumnIndex: 0) ?? "",
                             firstName: cursor.string(forColumnIndex: 1) ?? "",
                             lastName: cursor.string(forColumnIndex: 2) ?? "",
@@ -73,7 +76,8 @@ public class User: Model {
                             userType: cursor.string(forColumnIndex: 4) ?? "",
                             privacy_flag: cursor.string(forColumnIndex: 5) ?? "",
                             offline_mode: cursor.string(forColumnIndex: 6) ?? "",
-                            ex_block: cursor.string(forColumnIndex: 7) ?? "")
+                            ex_block: cursor.string(forColumnIndex: 7) ?? "",
+                            device_id: cursor.string(forColumnIndex: 8) ?? "")
                 cursor.close()
             } else {
                 user = User(pin: pin,

+ 50 - 8
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -505,7 +505,8 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
@@ -514,6 +515,8 @@ public class Nexilis: NSObject {
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 if UIApplication.shared.visibleViewController?.navigationController != nil {
                     UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
                 } else {
@@ -542,6 +545,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -557,12 +562,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -584,6 +592,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -599,12 +609,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -627,6 +640,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -642,12 +657,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -669,6 +687,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -684,12 +704,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -722,12 +745,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -750,6 +776,8 @@ public class Nexilis: NSObject {
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
+        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController.navigationBar.barStyle = .black
         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
         navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
@@ -766,12 +794,15 @@ public class Nexilis: NSObject {
         if !isChangeProfile {
             let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                controller.forceLogin = true
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -2113,6 +2144,8 @@ extension Nexilis: MessageDelegate {
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
+                                        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                                        navigationController.navigationBar.barStyle = .black
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
                                         navigationController.view.backgroundColor = .mainColor
@@ -2479,6 +2512,8 @@ extension Nexilis: MessageDelegate {
                                             navigationController.navigationBar.tintColor = .white
                                             navigationController.navigationBar.barTintColor = .mainColor
                                             navigationController.navigationBar.isTranslucent = false
+                                            navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                                            navigationController.navigationBar.barStyle = .black
                                             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                             navigationController.navigationBar.titleTextAttributes = textAttributes
                                             navigationController.view.backgroundColor = .mainColor
@@ -2871,12 +2906,15 @@ extension Nexilis: MessageDelegate {
                                 if (cursorData.string(forColumnIndex: 0)! + " " + cursorData.string(forColumnIndex: 1)!).trimmingCharacters(in: .whitespaces) == "USR\(UserDefaults.standard.string(forKey: "me")!)" {
                                     let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
                                     alert.addAction(UIAlertAction(title: "OK".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                                        let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
+                                        let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "signupsignin") as! SignUpSignIn
+                                        controller.forceLogin = true
                                         let navigationController = UINavigationController(rootViewController: controller)
                                         navigationController.modalPresentationStyle = .fullScreen
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
+                                        navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                                        navigationController.navigationBar.barStyle = .black
                                         let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                         navigationController.navigationBar.titleTextAttributes = textAttributes
                                         navigationController.view.backgroundColor = .mainColor
@@ -2916,6 +2954,8 @@ extension Nexilis: MessageDelegate {
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = .mainColor
                                 navigationController.navigationBar.isTranslucent = false
+                                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                                navigationController.navigationBar.barStyle = .black
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
                                 navigationController.view.backgroundColor = .mainColor
@@ -2987,6 +3027,8 @@ extension Nexilis: MessageDelegate {
                                 navigationController.navigationBar.tintColor = .white
                                 navigationController.navigationBar.barTintColor = .mainColor
                                 navigationController.navigationBar.isTranslucent = false
+                                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                                navigationController.navigationBar.barStyle = .black
                                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                                 navigationController.navigationBar.titleTextAttributes = textAttributes
                                 navigationController.view.backgroundColor = .mainColor

+ 5 - 5
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift

@@ -244,7 +244,7 @@ class QmeraAudioViewController: UIViewController {
             if isOutgoing {
                 let onGoingCC = UserDefaults.standard.string(forKey: "onGoingCC") ?? ""
                 if onGoingCC.isEmpty {
-                    Nexilis.shared.callManager.startCall(handle: u.pin)
+                    Nexilis.shared.callManager.startCall(handle: u.device_id)
                 } else {
                     do {
                         try AVAudioSession.sharedInstance().setCategory(.playAndRecord)
@@ -252,7 +252,7 @@ class QmeraAudioViewController: UIViewController {
                         try AVAudioSession.sharedInstance().overrideOutputAudioPort(.none)
                     } catch {
                     }
-                    API.initiateCCall(sParty: u.pin)
+                    API.initiateCCall(sParty: u.device_id)
                 }
             }
         }
@@ -383,7 +383,7 @@ class QmeraAudioViewController: UIViewController {
             } else {
                 self.users.append(user)
                 // Start Calling
-                Nexilis.shared.callManager.startCall(handle: user.pin)
+                Nexilis.shared.callManager.startCall(handle: user.device_id)
             }
         }
         controller.selectedUser.append(contentsOf: users)
@@ -477,7 +477,7 @@ class QmeraAudioViewController: UIViewController {
                     UserDefaults.standard.removeObject(forKey: "startTimeCC")
                     UserDefaults.standard.removeObject(forKey: "waitingRequestCC")
                 }
-                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.pin) {
+                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.device_id) {
                     Nexilis.shared.callManager.end(call: call)
                 } else {
                     API.terminateCall(sParty: nil)
@@ -490,7 +490,7 @@ class QmeraAudioViewController: UIViewController {
                     Nexilis.shared.callManager.end(call: Nexilis.shared.callManager.calls[i])
                 }
             } else {
-                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.pin) {
+                if let user = self.user, let call = Nexilis.shared.callManager.call(with: user.device_id) {
                     Nexilis.shared.callManager.end(call: call)
                 } else {
                     API.terminateCall(sParty: nil)

+ 6 - 3
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift

@@ -360,7 +360,8 @@ class QmeraVideoViewController: UIViewController {
         if isInisiator {
             labelIncomingOutgoing.text = "Outgoing video call".localized() + "..."
             Nexilis.startAudio(nMode: 2, bSpeakerOn: true)
-            API.initiateCCall(sParty: dataPerson[0]["f_pin"]!, nCamIdx: 1, nResIdx: 2, nVQuality: 2, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView, ivRemoteZ: zoomView)
+            let dataDevice = User.getData(pin: dataPerson[0]["f_pin"]!)
+            API.initiateCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 2, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView, ivRemoteZ: zoomView)
         } else {
             let systemSoundID: SystemSoundID = 1254
             AudioServicesPlaySystemSound(systemSoundID)
@@ -504,7 +505,8 @@ class QmeraVideoViewController: UIViewController {
             return
         }
         Nexilis.startAudio(nMode: 2, bSpeakerOn: true)
-        API.receiveCCall(sParty: dataPerson[0]["f_pin"]!, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView,ivRemoteZ: zoomView)
+        let dataDevice = User.getData(pin: dataPerson[0]["f_pin"]!)
+        API.receiveCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: listRemoteViewFix, ivLocalView: cameraView,ivRemoteZ: zoomView)
         DispatchQueue.main.async {
             self.myImage.removeFromSuperview()
             self.name.removeFromSuperview()
@@ -795,7 +797,8 @@ class QmeraVideoViewController: UIViewController {
                 } else {
                     DispatchQueue.main.async {
                         self.dataPerson.append(data)
-                        API.initiateCCall(sParty: data["f_pin"] as? String, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: self.listRemoteViewFix, ivLocalView: self.cameraView, ivRemoteZ: self.zoomView)
+                        let dataDevice = User.getData(pin: data["f_pin"]!)
+                        API.initiateCCall(sParty: dataDevice!.device_id, nCamIdx: 1, nResIdx: 2, nVQuality: 4, ivRemoteView: self.listRemoteViewFix, ivLocalView: self.cameraView, ivRemoteZ: self.zoomView)
                     }
                 }
             }

+ 7 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -84,6 +84,11 @@ public class EditorGroup: UIViewController {
     }
     
     public override func viewDidAppear(_ animated: Bool) {
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithOpaqueBackground()
+        navBarAppearance.backgroundColor = UIColor.mainColor
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         navigationController?.navigationBar.isTranslucent = false
         navigationController?.navigationBar.backgroundColor = .mainColor
         navigationController?.navigationBar.tintColor = .white
@@ -112,8 +117,10 @@ public class EditorGroup: UIViewController {
         
         buttonSendChat.circle()
         buttonSendChat.addTarget(self, action: #selector(sendTapped), for: .touchUpInside)
+        buttonSendChat.backgroundColor = .mainColor
         buttonAckConfidential.circle()
         buttonAckConfidential.addTarget(self, action: #selector(showChooserACKConfidential), for: .touchUpInside)
+        buttonAckConfidential.backgroundColor = .mainColor
         textFieldSend.layer.cornerRadius = textFieldSend.maxCornerRadius()
         textFieldSend.layer.borderWidth = 1.0
         textFieldSend.text = "Send message".localized()

+ 9 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -102,9 +102,16 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
     }
     
     public override func viewDidAppear(_ animated: Bool) {
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithOpaqueBackground()
+        navBarAppearance.backgroundColor = UIColor.mainColor
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         navigationController?.navigationBar.isTranslucent = false
         navigationController?.navigationBar.backgroundColor = .mainColor
         navigationController?.navigationBar.tintColor = .white
+        navigationController?.navigationBar.overrideUserInterfaceStyle = .dark
+        navigationController?.navigationBar.barStyle = .black
         if self.navigationController?.isNavigationBarHidden ?? false {
             self.navigationController?.setNavigationBarHidden(false, animated: false)
         }
@@ -130,12 +137,14 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
         
         buttonSendChat.circle()
         buttonSendChat.addTarget(self, action: #selector(sendTapped), for: .touchUpInside)
+        buttonSendChat.backgroundColor = .mainColor
         if isContactCenter {
             buttonAckConfidential.isHidden = true
             constraintLeftTextField.constant = 20
         } else {
             buttonAckConfidential.circle()
             buttonAckConfidential.addTarget(self, action: #selector(showChooserACKConfidential), for: .touchUpInside)
+            buttonAckConfidential.backgroundColor = .mainColor
         }
         textFieldSend.layer.cornerRadius = textFieldSend.maxCornerRadius()
         textFieldSend.layer.borderWidth = 1.0

+ 2 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorStarMessages.swift

@@ -1003,6 +1003,8 @@ public class EditorStarMessages: UIViewController, UITableViewDataSource, UITabl
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
+            navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+            navigationController.navigationBar.barStyle = .black
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor

+ 9 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -69,8 +69,6 @@ class ContactChatViewController: UITableViewController {
         } else {
             title = "Start Conversation".localized()
         }
-        let attributes = [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 16.0), NSAttributedString.Key.foregroundColor: UIColor.white]
-        self.navigationController?.navigationBar.titleTextAttributes = attributes
         
         //        navigationController?.navigationBar.prefersLargeTitles = true
         
@@ -122,6 +120,8 @@ class ContactChatViewController: UITableViewController {
                 navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
+                navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+                navigationController.navigationBar.barStyle = .black
                 let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
                 navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
@@ -166,6 +166,13 @@ class ContactChatViewController: UITableViewController {
     }
     
     override func viewWillAppear(_ animated: Bool) {
+        let attributes = [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: 16.0), NSAttributedString.Key.foregroundColor: UIColor.white]
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithOpaqueBackground()
+        navBarAppearance.backgroundColor = UIColor.mainColor
+        navBarAppearance.titleTextAttributes = attributes
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
         removeAllData()
         getData()
     }

+ 8 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ProfileViewController.swift

@@ -63,6 +63,7 @@ public class ProfileViewController: UITableViewController {
     
     private func reload() {
         if let user = self.user {
+            self.navigationController?.navigationBar.topItem?.title = "\(user.firstName) \(user.lastName)"
             self.title = "\(user.firstName) \(user.lastName)"
             if !user.thumb.isEmpty {
                 self.profile.setImage(name: user.thumb)
@@ -106,6 +107,7 @@ public class ProfileViewController: UITableViewController {
 //                            self.buttonHistoryCC.isHidden = true
                         }
                     }
+                    self.navigationController?.navigationBar.topItem?.title = "\(user.firstName) \(user.lastName)"
                     self.title = "\(user.firstName) \(user.lastName)"
                     if !user.thumb.isEmpty {
                         self.profile.setImage(name: user.thumb)
@@ -171,6 +173,12 @@ public class ProfileViewController: UITableViewController {
         navigationController?.navigationBar.titleTextAttributes = nil
     }
     
+    public override func viewDidAppear(_ animated: Bool) {
+        if let me = UserDefaults.standard.string(forKey: "me"), me == data || flag == Flag.me || flag == Flag.friend {
+            reload()
+        }
+    }
+    
     public override func viewDidLoad() {
         super.viewDidLoad()
         
@@ -204,7 +212,6 @@ public class ProfileViewController: UITableViewController {
             }
             switchPrivateAccount.addTarget(self, action: #selector(privateAccountSwitch), for: .valueChanged)
             switchAcceptCall.addTarget(self, action: #selector(acceptCallSwitch), for: .valueChanged)
-            reload()
         } else if flag == Flag.invite {
             navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(didTapAdd(sender:)))
             call.isEnabled = false
@@ -228,7 +235,6 @@ public class ProfileViewController: UITableViewController {
             }
             navigationController?.navigationBar.topItem?.backButtonTitle = "Back".localized()
             myViewGroup.removeFromSuperview()
-            reload()
         }
     }
     

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

@@ -441,6 +441,8 @@ public class SettingTableViewController: UITableViewController {
             navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
+            navigationController.navigationBar.overrideUserInterfaceStyle = .dark
+            navigationController.navigationBar.barStyle = .black
             let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
             navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor

+ 8 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/SignUpSignIn.swift

@@ -28,6 +28,10 @@ public class SignUpSignIn: UIViewController {
         descSignUpSignIn.text = "Please enter your nickname or email address and your password".localized()
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Submit".localized(), style: .plain, target: self, action: #selector(didTapSubmit(sender:)))
         
+        if forceLogin {
+            navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Cancel".localized(), style: .plain, target: self, action: #selector(didTapCancel(sender:)))
+        }
+        
         passwordField.addPadding(.right(40))
         passwordField.isSecureTextEntry = true
         showPasswordButton.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
@@ -42,6 +46,10 @@ public class SignUpSignIn: UIViewController {
         view.addGestureRecognizer(tapGesture)
     }
     
+    @objc func didTapCancel(sender: Any) {
+        self.navigationController?.dismiss(animated: true)
+    }
+    
     @objc func checkUsername(_ textField: UITextField) {
         let text : String! = usernameField.text
         if isValidEmail(text) {