kevin 3 rokov pred
rodič
commit
3f924dd9fb

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

@@ -126,6 +126,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
                             print("custom tab: \(customTab)")
                             PrefsUtil.setCustomTab(cust: customTab)
                         }
+                        if let urlBase = j["app_builder_url_base"] as? String {
+                            print("url base: \(urlBase)")
+                            PrefsUtil.setURLBase(value: urlBase)
+                        }
+                        if let urlQMS = j["app_builder_url_qms"] as? String {
+                            print("url base: \(urlQMS)")
+                            PrefsUtil.setURLQMS(value: urlQMS)
+                        }
                     }
                 }
             }

+ 5 - 5
appbuilder-ios/AppBuilder/AppBuilder/Base.lproj/LaunchScreen.storyboard

@@ -17,12 +17,12 @@
                         <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pb_icon" translatesAutoresizingMaskIntoConstraints="NO" id="Dki-8X-fvw">
-                                <rect key="frame" x="82" y="323" width="250" height="250"/>
+                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="pb_button" translatesAutoresizingMaskIntoConstraints="NO" id="Dki-8X-fvw">
+                                <rect key="frame" x="107" y="348" width="200" height="200"/>
                                 <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                                 <constraints>
-                                    <constraint firstAttribute="height" constant="250" id="Kvz-Gz-JlQ"/>
-                                    <constraint firstAttribute="width" constant="250" id="YUt-RC-lbI"/>
+                                    <constraint firstAttribute="height" constant="200" id="Kvz-Gz-JlQ"/>
+                                    <constraint firstAttribute="width" constant="200" id="YUt-RC-lbI"/>
                                 </constraints>
                             </imageView>
                         </subviews>
@@ -40,7 +40,7 @@
         </scene>
     </scenes>
     <resources>
-        <image name="pb_icon" width="169" height="168"/>
+        <image name="pb_button" width="128" height="128"/>
         <systemColor name="systemBackgroundColor">
             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
         </systemColor>

+ 12 - 0
appbuilder-ios/AppBuilder/AppBuilder/PrefsUtil.swift

@@ -49,6 +49,12 @@ class PrefsUtil {
     static func getURLThirdTab() -> String? {
         return UserDefaults.standard.string(forKey: "app_builder_url_third_tab")
     }
+    static func getURLBase() -> String? {
+        return UserDefaults.standard.string(forKey: "app_builder_url_base")
+    }
+    static func getURLQMS() -> String? {
+        return UserDefaults.standard.string(forKey: "app_builder_url_qms")
+    }
     
     static func setURLFirstTab(value: String) {
         UserDefaults.standard.set(value, forKey: "app_builder_url_first_tab")
@@ -57,6 +63,12 @@ class PrefsUtil {
     static func setURLThirdTab(value: String) {
         UserDefaults.standard.set(value, forKey: "app_builder_url_third_tab")
     }
+    static func setURLBase(value: String) {
+        UserDefaults.standard.set(value, forKey: "app_builder_url_base")
+    }
+    static func setURLQMS(value: String) {
+        UserDefaults.standard.set(value, forKey: "app_builder_url_qms")
+    }
     
     static func getTerms() -> Bool {
         return UserDefaults.standard.bool(forKey: "terms_app")

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

@@ -194,7 +194,7 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate {
     
     @objc func startConversation(){
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
-        navigationController.modalPresentationStyle = .fullScreen
+        navigationController.modalPresentationStyle = .custom
 //        navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false

+ 25 - 82
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -162,7 +162,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 ViewController.resetTabSelected()
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .fullScreen
+                navigationController.modalPresentationStyle = .custom
 //                navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
@@ -360,55 +360,21 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         }
     }
     
-//    @objc func qmeraLongPress() {
-//        let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
-//        navigationController.modalPresentationStyle = .fullScreen
-////        navigationController.navigationBar.tintColor = .white
-//        navigationController.navigationBar.barTintColor = .mainColor
-//        navigationController.navigationBar.isTranslucent = false
-////        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-////        navigationController.navigationBar.titleTextAttributes = textAttributes
-//        navigationController.view.backgroundColor = .mainColor
-//        UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
-//    }
-    
     @objc func ccTap() {
         print("ccTap")
         if(ViewController.checkIsChangePerson()){
-            var isOfficer = false
-            Database.shared.database?.inTransaction({ (fmdb, rollback) in
-                let idMe = UserDefaults.standard.string(forKey: "me") as String?
-                if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT user_type, image_id FROM BUDDY where f_pin='\(idMe!)'"), cursorData.next() {
-                    if cursorData.string(forColumnIndex: 0) == "24" {
-                        isOfficer = true
-                    }
-                    cursorData.close()
-                    return
-                }
-            })
             show(b: false)
-            if isOfficer {
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "myHistoryCC") as! HistoryCCViewController
-                controller.isOfficer = true
-                let navigationController = UINavigationController(rootViewController: controller)
-//                navigationController.navigationBar.tintColor = .white
-                navigationController.modalPresentationStyle = .fullScreen
-                navigationController.navigationBar.barTintColor = .mainColor
-                navigationController.navigationBar.isTranslucent = false
-//                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-//                navigationController.navigationBar.titleTextAttributes = textAttributes
-                navigationController.view.backgroundColor = .mainColor
-                UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
-            } else {
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
-                controller.isContactCenter = true
-                let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.modalPresentationStyle = .fullScreen
-                UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
-            }
-        }
-        if(ViewController.isExpandButton){
-            ViewController.expandButton()
+            let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "editorPersonalVC") as! EditorPersonal
+            controller.isContactCenter = true
+            let navigationController = UINavigationController(rootViewController: controller)
+            navigationController.modalPresentationStyle = .custom
+            navigationController.navigationBar.tintColor = .white
+            navigationController.navigationBar.barTintColor = .mainColor
+            navigationController.navigationBar.isTranslucent = false
+            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+            navigationController.navigationBar.titleTextAttributes = textAttributes
+            navigationController.view.backgroundColor = .mainColor
+            UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
     }
     
@@ -417,18 +383,15 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         if(ViewController.checkIsChangePerson()){
             show(b: false)
             let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
-            navigationController.modalPresentationStyle = .fullScreen
-//            navigationController.navigationBar.tintColor = .white
+            navigationController.modalPresentationStyle = .custom
+            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-//            navigationController.navigationBar.titleTextAttributes = textAttributes
+            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
-        if(ViewController.isExpandButton){
-            ViewController.expandButton()
-        }
     }
     
     @objc func callTap() {
@@ -437,18 +400,15 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             show(b: false)
             let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID")
             let navigationController = UINavigationController(rootViewController: callContact)
-            navigationController.modalPresentationStyle = .fullScreen
-//            navigationController.navigationBar.tintColor = .white
+            navigationController.modalPresentationStyle = .custom
+            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-//            navigationController.navigationBar.titleTextAttributes = textAttributes
+            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
-        if(ViewController.isExpandButton){
-            ViewController.expandButton()
-        }
     }
     
     @objc func chatTap() {
@@ -456,34 +416,20 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         if(ViewController.checkIsChangePerson()){
             show(b: false)
             let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
-            navigationController.modalPresentationStyle = .fullScreen
-//            navigationController.navigationBar.tintColor = .white
+            navigationController.modalPresentationStyle = .custom
+            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-//            navigationController.navigationBar.titleTextAttributes = textAttributes
+            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
-        if(ViewController.isExpandButton){
-            ViewController.expandButton()
-        }
     }
     
-//    @objc func settingTap() {
-//        let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
-//        navigationController.modalPresentationStyle = .fullScreen
-////        navigationController.navigationBar.tintColor = .white
-//        navigationController.navigationBar.barTintColor = .mainColor
-//        navigationController.navigationBar.isTranslucent = false
-////        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-////        navigationController.navigationBar.titleTextAttributes = textAttributes
-//        navigationController.view.backgroundColor = .mainColor
-//        UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
-//    }
-    
     @objc func postTap() {
         if(ViewController.checkIsChangePerson()){
+            show(b: false)
             let customTab = PrefsUtil.getCustomTab().split(separator: ",")
             let cpaasMode = PrefsUtil.getCpaasMode()
             var i = 0
@@ -514,9 +460,6 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 })
             }
         }
-        if(ViewController.isExpandButton){
-            ViewController.expandButton()
-        }
         
     }
     

+ 11 - 9
appbuilder-ios/NexilisLite/Nexilis.swift

@@ -22,7 +22,9 @@ public class Nexilis: NSObject {
     
     static let ADDRESS_33 = "192.168.0.33"
     
-    static let ADDRESS_RELEASE = "202.158.33.26"
+    // static let ADDRESS_RELEASE = "202.158.33.26" //CBN
+
+    static let ADDRESS_RELEASE = "108.137.84.148" //AWS
     
     //    static let PORT = 45328
     //    static let PORT = 65328 // 33
@@ -1043,7 +1045,7 @@ extension Nexilis: CallDelegate {
                 videoController.dataPerson.append(data)
                 videoController.isInisiator = false
                 let navigationController = UINavigationController(rootViewController: videoController)
-                navigationController.modalPresentationStyle = .fullScreen
+                navigationController.modalPresentationStyle = .custom
                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                 if checkViewController == nil {
                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1412,7 +1414,7 @@ extension Nexilis: MessageDelegate {
                                 editorPersonalVC.channelContactCenter = message.getBody(key: CoreMessage_TMessageKey.CHANNEL)
                                 editorPersonalVC.fPinContacCenter = message.getBody(key: CoreMessage_TMessageKey.L_PIN)
                                 let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                navigationController.modalPresentationStyle = .fullScreen
+                                navigationController.modalPresentationStyle = .custom
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
                             }
                         }
@@ -1708,7 +1710,7 @@ extension Nexilis: MessageDelegate {
                                                         alert.addAction(UIAlertAction(title: "Ok".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                                             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                                                             let navigationController = UINavigationController(rootViewController: controller)
-                                                            navigationController.modalPresentationStyle = .fullScreen
+                                                            navigationController.modalPresentationStyle = .custom
                                                             navigationController.navigationBar.tintColor = .white
                                                             navigationController.navigationBar.barTintColor = .mainColor
                                                             navigationController.navigationBar.isTranslucent = false
@@ -1736,7 +1738,7 @@ extension Nexilis: MessageDelegate {
                                                 editorPersonalVC.unique_l_pin = threadIdentifier
                                                 editorPersonalVC.fromNotification = true
                                                 let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                                                navigationController.modalPresentationStyle = .fullScreen
+                                                navigationController.modalPresentationStyle = .custom
                                                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                                                 if checkViewController == nil {
                                                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1749,7 +1751,7 @@ extension Nexilis: MessageDelegate {
                                                 editorGroupVC.unique_l_pin = threadIdentifier
                                                 editorGroupVC.fromNotification = true
                                                 let navigationController = UINavigationController(rootViewController: editorGroupVC)
-                                                navigationController.modalPresentationStyle = .fullScreen
+                                                navigationController.modalPresentationStyle = .custom
                                                 let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                                                 if checkViewController == nil {
                                                     UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1785,7 +1787,7 @@ extension Nexilis: MessageDelegate {
                                     alert.addAction(UIAlertAction(title: "Ok".localized(), style: UIAlertAction.Style.default, handler: {(_) in
                                         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                                         let navigationController = UINavigationController(rootViewController: controller)
-                                        navigationController.modalPresentationStyle = .fullScreen
+                                        navigationController.modalPresentationStyle = .custom
                                         navigationController.navigationBar.tintColor = .white
                                         navigationController.navigationBar.barTintColor = .mainColor
                                         navigationController.navigationBar.isTranslucent = false
@@ -1813,7 +1815,7 @@ extension Nexilis: MessageDelegate {
                             editorPersonalVC.unique_l_pin = threadIdentifier
                             editorPersonalVC.fromNotification = true
                             let navigationController = UINavigationController(rootViewController: editorPersonalVC)
-                            navigationController.modalPresentationStyle = .fullScreen
+                            navigationController.modalPresentationStyle = .custom
                             let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                             if checkViewController == nil {
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)
@@ -1826,7 +1828,7 @@ extension Nexilis: MessageDelegate {
                             editorGroupVC.unique_l_pin = threadIdentifier
                             editorGroupVC.fromNotification = true
                             let navigationController = UINavigationController(rootViewController: editorGroupVC)
-                            navigationController.modalPresentationStyle = .fullScreen
+                            navigationController.modalPresentationStyle = .custom
                             let checkViewController = UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.presentedViewController
                             if checkViewController == nil {
                                 UIApplication.shared.windows.filter {$0.isKeyWindow}.last?.rootViewController?.present(navigationController, animated: true, completion: nil)

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

@@ -481,7 +481,7 @@ public class FloatingButton: UIView {
             return
         }
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
-        navigationController.modalPresentationStyle = .fullScreen
+        navigationController.modalPresentationStyle = .custom
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
@@ -526,7 +526,7 @@ public class FloatingButton: UIView {
         }
         let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID")
         let navigationController = UINavigationController(rootViewController: callContact)
-        navigationController.modalPresentationStyle = .fullScreen
+        navigationController.modalPresentationStyle = .custom
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false

+ 3 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -22,7 +22,9 @@ public class Nexilis: NSObject {
     
     static let ADDRESS_33 = "192.168.0.33"
     
-    static let ADDRESS_RELEASE = "202.158.33.26"
+    // static let ADDRESS_RELEASE = "202.158.33.26" //CBN
+
+    static let ADDRESS_RELEASE = "108.137.84.148" //AWS
     
     //    static let PORT = 45328
     //    static let PORT = 65328 // 33