Просмотр исходного кода

remove unused code & add floating button

yayan 1 год назад
Родитель
Сommit
e3afb65f3f

+ 2 - 2
NexilisSampleCode-iOS/ExampleCode/ViewController.swift

@@ -14,8 +14,8 @@ class ViewController: UIViewController, ConnectDelegate {
 
     override func viewDidLoad() {
         super.viewDidLoad()
-        
-        APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self)
+        //FLOATING
+        APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false)
         
         let childrenMenu : [UIAction] = [
             //FEATURES

+ 0 - 51
NexilisSampleCodeFlutter-Android/ios/Runner/AppDelegate.swift

@@ -16,57 +16,6 @@ import NexilisLite
     _ application: UIApplication,
     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
   ) -> Bool {
-    APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self)
-    let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
-    let batteryChannel = FlutterMethodChannel(name: "nativeChannel", binaryMessenger: controller.binaryMessenger)
-    batteryChannel.setMethodCallHandler({(call: FlutterMethodCall, result: FlutterResult) -> Void in
-        // Note: this method is invoked on the UI thread.
-        if call.method == "openContactCenter" {
-            APIS.openContactCenter()
-        } else if call.method == "openInstantMessaging" {
-            APIS.openChat()
-        } else if call.method == "openCall" {
-            APIS.openCall()
-        } else if call.method == "openStreaming" {
-            APIS.openStreaming()
-        } else if call.method == "openWhiteboard" {
-            APIS.openWhiteboard()
-        } else if call.method == "openSettings" {
-            APIS.openSetting()
-        } else if call.method == "openSetOfficer" {
-            APIS.openSetAsOfficerForm()
-        } else if call.method == "openContactCenterChat" {
-            var category: Int?
-            if let arguments = call.arguments as? [String: Any],
-                let param1 = arguments["category"] as? Int {
-                category = param1
-            }
-            APIS.openContactCenter(media: 0, category: category)
-        } else if call.method == "openContactCenterAudioCall" {
-            var category: Int?
-            if let arguments = call.arguments as? [String: Any],
-                let param1 = arguments["category"] as? Int {
-                category = param1
-            }
-            APIS.openContactCenter(media: 1, category: category)
-        } else if call.method == "openContactCenterVideoCall" {
-            var category: Int?
-            if let arguments = call.arguments as? [String: Any],
-                let param1 = arguments["category"] as? Int {
-                category = param1
-            }
-            APIS.openContactCenter(media: 2, category: category)
-        } else if call.method == "signInAdmin" {
-            var pwd: String?
-            if let arguments = call.arguments as? [String: Any],
-                let param1 = arguments["pwd"] as? String {
-                pwd = param1
-            }
-            APIS.signInAdmin(password: pwd ?? "")
-        } else {
-            result(FlutterMethodNotImplemented)
-        }
-    })
     GeneratedPluginRegistrant.register(with: self)
     return super.application(application, didFinishLaunchingWithOptions: launchOptions)
   }

+ 0 - 113
NexilisSampleCodeFlutter-iOS/android/app/src/main/java/com/example/paliolitesamplecodeflutter/MainActivity.java

@@ -20,118 +20,5 @@ public class MainActivity extends FlutterActivity {
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        /*************************************
-         Connect to our server with your newuniverse.io Account, and implement the required Callback.
-         Please Subscribe or contact us to get your newuniverse.io Account.
-         Do not share your newuniverse.io Account or ever give it out to someone outside your organization.
-         ************************************/
-        /**
-         * API.connect (String NexilisAccount, Activity RegisteredActivity, int NexilisButtonMode, boolean UserMayModifyUID, Callback ConnectCallback)
-         *
-         * NexilisAccount 		: Your Nexilis.io Account.
-         * RegisteredActivity 	: Android's Activity class that is used to register the Nexilis Button
-         * NexilisButtonMode 	: The flag that determines when the Nexilis Button should appear.
-         *      0 = Disabled Nexilis Button
-         * 		1 = Within registered Activity, (Nexilis Button only appears when users are in the registered activity)
-         * 		2 = Within App (Nexilis Button always appears as long as user is in the App),
-         * 		3 = Always On (Nexilis Button always appears even if the application process is closed)
-         * UserMayModifyUID 	: Sets whether users are allowed to change the Nexilis UserID.
-         * 		true = enabled,
-         * 		false = disabled
-         * ConnectCallback	: The callback interface to be invoked when calling the method connect.
-         * 		You need to implement onSuccess(String NexilisUserID) & onFailed(String reasonCode) to handle the RESULT.
-         *
-         */
-        API.connect("***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***", this, 0, new Callback() {
-            @Override
-            public void onSuccess(final String NexilisUserID) {
-                /**************************************
-                 The NexilisUserID parameter is generated automatically and can be mapped to a User ID on the application level.
-                 For example, the Nexilis User ID (e.g. User001) can be mapped into the corresponding Application User ID (e.g. John Doe),
-                 so you don't have to share your Application User ID with Nexilis while still being able to monitor your user activities.
-                 **************************************/
-                runOnUiThread(new Runnable() {
-                    @Override
-                    public void run() {
-                        Toast.makeText(getBaseContext(), "Your User ID: " + NexilisUserID + " : " + getString(io.nexilis.service.R.string.pb_loading), Toast.LENGTH_LONG).show();
-                    }
-                });
-            }
-
-            @Override
-            public void onFailed(final String reasonCode) {
-                /**
-                 * reasonCode 	: Returns a code based on the status of the function connect called.
-                 * 		2:Your trial subscription has expired. Please subscribe to continue using Nexilis.
-                 * 		3:Your monthly subscription is not paid in full. Please pay your monthly subscription bill to continue using Nexilis service.
-                 * 		4:Your Customer Engagement Credit has run out and your Prepaid Credit Balance is empty. Please top-up your Prepaid Credit Balance to continue using Nexilis
-                 *		23:Unsupported Android version
-                 * 		93:Missing the required overlay permission
-                 * 		94:Unregistered User
-                 * 		95:Invalid Nexilis Button Mode (1,2,3)
-                 * 		96:Activity is null
-                 * 		97:Account is empty
-                 * 		98:Your account didn't match
-                 * 		99:Something went wrong
-                 */
-                runOnUiThread(new Runnable() {
-                    @Override
-                    public void run() {
-                        Toast.makeText(getBaseContext(), reasonCode, Toast.LENGTH_LONG).show();
-                    }
-                });
-            }
-        });
-    }
-
-    @Override
-    public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
-        super.configureFlutterEngine(flutterEngine);
-        new MethodChannel(flutterEngine.getDartExecutor().getBinaryMessenger(), CHANNEL).setMethodCallHandler((call, result) -> {
-            if (call.method.equals("openContactCenter")) {
-                String response = API.openContactCenter();
-                result.success(response);
-            } else if (call.method.equals("openInstantMessaging")) {
-                String response = API.openChat();
-                result.success(response);
-            } else if (call.method.equals("openCall")) {
-                String response = API.openCall();
-                result.success(response);
-            } else if (call.method.equals("openStreaming")) {
-                String response = API.openLiveStreaming();
-                result.success(response);
-            } else if (call.method.equals("openSettings")) {
-                API.openSettings();
-            } else if (call.method.equals("openWhiteboard")) {
-                String response = API.openWhiteboard();
-                result.success(response);
-            } else if (call.method.equals("openChatGPT")) {
-                String response = API.openSmartChatbot();
-                result.success(response);
-            } else if (call.method.equals("openContactCenterChat")) {
-                Map<String, Integer> map = (Map<String, Integer>) call.arguments;
-                int category = map.get("category");
-                String response = API.openContactCenter(0, category);
-                result.success(response);
-            } else if (call.method.equals("openContactCenterAudioCall")) {
-                Map<String, Integer> map = (Map<String, Integer>) call.arguments;
-                int category = map.get("category");
-                String response = API.openContactCenter(1, category);
-                result.success(response);
-            } else if (call.method.equals("openContactCenterVideoCall")) {
-                Map<String, Integer> map = (Map<String, Integer>) call.arguments;
-                int category = map.get("category");
-                String response = API.openContactCenter(2, category);
-                result.success(response);
-            } else if (call.method.equals("signInAdmin")) {
-                Map<String, String> map = (Map<String, String>) call.arguments;
-            	String pwd = map.get("pwd");
-                String response = API.signInAdmin(pwd);
-                result.success(response);
-            } else if (call.method.equals("openSetOfficer")) {
-                String response = API.openSetAsOfficerForm();
-                result.success(response);
-            }
-        });
     }
 }

+ 2 - 1
NexilisSampleCodeFlutter-iOS/ios/Runner/AppDelegate.swift

@@ -16,7 +16,8 @@ import NexilisLite
     _ application: UIApplication,
     didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
   ) -> Bool {
-    APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self)
+    //FLOATING
+    APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false)
     let controller : FlutterViewController = window?.rootViewController as! FlutterViewController
     let batteryChannel = FlutterMethodChannel(name: "nativeChannel", binaryMessenger: controller.binaryMessenger)
     batteryChannel.setMethodCallHandler({(call: FlutterMethodCall, result: FlutterResult) -> Void in

+ 0 - 2
NexilisSampleCodeIonic-Android/ios/App/App/AppDelegate.swift

@@ -18,8 +18,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, ConnectDelegate {
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // Override point for customization after application launch.
         _ = NativeCap.self
-        
-        APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self)
         return true
     }
 

+ 0 - 63
NexilisSampleCodeIonic-iOS/android/app/src/main/java/com/example/paliolitesamplecodeionic/MainActivity.java

@@ -13,69 +13,6 @@ public class MainActivity extends BridgeActivity {
   protected void onCreate(Bundle savedInstanceState) {
     registerPlugin(NativePlugin.class);
     super.onCreate(savedInstanceState);
-
-    /*************************************
-     Connect to our server with your newuniverse.io Account, and implement the required Callback.
-     Please Subscribe or contact us to get your newuniverse.io Account.
-     Do not share your newuniverse.io Account or ever give it out to someone outside your organization.
-     ************************************/
-    /**
-     * API.connect (String NexilisAccount, Activity RegisteredActivity, int NexilisButtonMode, boolean UserMayModifyUID, Callback ConnectCallback)
-     *
-     * NexilisAccount 		: Your Nexilis.io Account.
-     * RegisteredActivity 	: Android's Activity class that is used to register the Nexilis Button
-     * NexilisButtonMode 	: The flag that determines when the Nexilis Button should appear.
-     *      0 = Disabled Nexilis Button
-     * 		1 = Within registered Activity, (Nexilis Button only appears when users are in the registered activity)
-     * 		2 = Within App (Nexilis Button always appears as long as user is in the App),
-     * 		3 = Always On (Nexilis Button always appears even if the application process is closed)
-     * UserMayModifyUID 	: Sets whether users are allowed to change the Nexilis UserID.
-     * 		true = enabled,
-     * 		false = disabled
-     * ConnectCallback	: The callback interface to be invoked when calling the method connect.
-     * 		You need to implement onSuccess(String NexilisUserID) & onFailed(String reasonCode) to handle the RESULT.
-     *
-     */
-    API.connect("***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***", this, 0, new Callback() {
-      @Override
-      public void onSuccess(final String NexilisUserID) {
-        /**************************************
-         The NexilisUserID parameter is generated automatically and can be mapped to a User ID on the application level.
-         For example, the Nexilis User ID (e.g. User001) can be mapped into the corresponding Application User ID (e.g. John Doe),
-         so you don't have to share your Application User ID with Nexilis while still being able to monitor your user activities.
-         **************************************/
-        runOnUiThread(new Runnable() {
-          @Override
-          public void run() {
-            Toast.makeText(getBaseContext(), "Your User ID: " + NexilisUserID + " : " + getString(io.nexilis.service.R.string.pb_loading), Toast.LENGTH_LONG).show();
-          }
-        });
-      }
-
-      @Override
-      public void onFailed(final String reasonCode) {
-        /**
-         * reasonCode 	: Returns a code based on the status of the function connect called.
-         * 		2:Your trial subscription has expired. Please subscribe to continue using Nexilis.
-         * 		3:Your monthly subscription is not paid in full. Please pay your monthly subscription bill to continue using Nexilis service.
-         * 		4:Your Customer Engagement Credit has run out and your Prepaid Credit Balance is empty. Please top-up your Prepaid Credit Balance to continue using Nexilis
-         *		23:Unsupported Android version
-         * 		93:Missing the required overlay permission
-         * 		94:Unregistered User
-         * 		95:Invalid Nexilis Button Mode (1,2,3)
-         * 		96:Activity is null
-         * 		97:Account is empty
-         * 		98:Your account didn't match
-         * 		99:Something went wrong
-         */
-        runOnUiThread(new Runnable() {
-          @Override
-          public void run() {
-            Toast.makeText(getBaseContext(), reasonCode, Toast.LENGTH_LONG).show();
-          }
-        });
-      }
-    });
   }
 
 }

+ 2 - 2
NexilisSampleCodeIonic-iOS/ios/App/App/AppDelegate.swift

@@ -18,8 +18,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate, ConnectDelegate {
     func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
         // Override point for customization after application launch.
         _ = NativeCap.self
-        
-        APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self)
+        //FLOATING
+        APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false)
         return true
     }
 

+ 1 - 77
NexilisSampleCodeReact-Android/ios/CallNative.swift

@@ -9,82 +9,6 @@ import Foundation
 import NexilisLite
 
 @objc(CallNative)
-class CallNative: NSObject, ConnectDelegate {
-  func onSuccess(userId: String) {
-    
-  }
+class CallNative: NSObject {
   
-  func onFailed(error: String) {
-    
-  }
-  
-  @objc func connect() {
-    APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self) //***REPLACE WITH YOUR API KEY***
-  }
-  
-  @objc func openContactCenter() {
-    DispatchQueue.main.async {
-      APIS.openContactCenter()
-    }
-  }
-  @objc func openChat() {
-    DispatchQueue.main.async {
-      APIS.openChat()
-    }
-  }
-  @objc func openCall() {
-    DispatchQueue.main.async {
-      APIS.openCall()
-    }
-  }
-  @objc func openStreaming() {
-    DispatchQueue.main.async {
-      APIS.openStreaming()
-    }
-  }
-  @objc func openSetting() {
-    DispatchQueue.main.async {
-      APIS.openSetting()
-    }
-  }
-  @objc func openWhiteboard() {
-    DispatchQueue.main.async {
-      APIS.openWhiteboard()
-    }
-  }
-  @objc func openScreenSharing() {
-    DispatchQueue.main.async {
-      APIS.openScreenSharing()
-    }
-  }
-  @objc(openContactCenterChat:)
-  func openContactCenterChat(category: Int) {
-    print("category \(category)")
-    DispatchQueue.main.async {
-      APIS.openContactCenter(media: 0, category: category)
-    }
-  }
-  @objc(openContactCenterAudioCall:)
-  func openContactCenterAudioCall(category: Int) {
-    DispatchQueue.main.async {
-      APIS.openContactCenter(media: 1, category: category)
-    }
-  }
-  @objc(openContactCenterVideoCall:)
-  func openContactCenterVideoCall(category: Int) {
-    DispatchQueue.main.async {
-      APIS.openContactCenter(media: 2, category: category)
-    }
-  }
-  @objc(signInAdmin:)
-  func signInAdmin(pwd: String) {
-    DispatchQueue.main.async {
-      APIS.signInAdmin(password: pwd)
-    }
-  }
-  @objc func openSetOfficer() {
-    DispatchQueue.main.async {
-      APIS.openSetAsOfficerForm()
-    }
-  }
 }

+ 0 - 66
NexilisSampleCodeReact-iOS/android/app/src/main/java/com/paliolitesamplecode/MainActivity.java

@@ -39,71 +39,5 @@ public class MainActivity extends ReactActivity {
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        /*************************************
-         Connect to our server with your newuniverse.io Account, and implement the required Callback.
-         Please Subscribe or contact us to get your newuniverse.io Account.
-         Do not share your newuniverse.io Account or ever give it out to someone outside your organization.
-         ************************************/
-        /**
-         * API.connect (String NexilisAccount, Activity RegisteredActivity, int NexilisButtonMode, boolean UserMayModifyUID, Callback ConnectCallback)
-         *
-         * NexilisAccount 		: Your Nexilis.io Account.
-         * RegisteredActivity 	: Android's Activity class that is used to register the Nexilis Button
-         * NexilisButtonMode 	: The flag that determines when the Nexilis Button should appear.
-         *      0 = Disabled Nexilis Button
-         * 		1 = Within registered Activity, (Nexilis Button only appears when users are in the registered activity)
-         * 		2 = Within App (Nexilis Button always appears as long as user is in the App),
-         * 		3 = Always On (Nexilis Button always appears even if the application process is closed)
-         * UserMayModifyUID 	: Sets whether users are allowed to change the Nexilis UserID.
-         * 		true = enabled,
-         * 		false = disabled
-         * ConnectCallback	: The callback interface to be invoked when calling the method connect.
-         * 		You need to implement onSuccess(String NexilisUserID) & onFailed(String reasonCode) to handle the RESULT.
-         *
-         */
-
-//        API.connect("***REPLACE***WITH***YOUR***NEXILIS***ACCOUNT***", this, 0, new Callback() {
-        API.connect("36BCB99AA3885165E64ECC50591C4DA5072A25B2E7BAADA5A1B57E18737FF88C", this, 0, new Callback() {
-            @Override
-            public void onSuccess(final String NexilisUserID) {
-                /**************************************
-                 The NexilisUserID parameter is generated automatically and can be mapped to a User ID on the application level.
-                 For example, the Nexilis User ID (e.g. User001) can be mapped into the corresponding Application User ID (e.g. John Doe),
-                 so you don't have to share your Application User ID with Nexilis while still being able to monitor your user activities.
-                 **************************************/
-
-                runOnUiThread(new Runnable() {
-                    @Override
-                    public void run() {
-                        Toast.makeText(getBaseContext(), "Your User ID: " + NexilisUserID + " : " + getString(io.nexilis.service.R.string.pb_loading), Toast.LENGTH_LONG).show();
-                    }
-                });
-            }
-
-            @Override
-            public void onFailed(final String reasonCode) {
-                /**
-                 * reasonCode 	: Returns a code based on the status of the function connect called.
-                 * 		2:Your trial subscription has expired. Please subscribe to continue using Nexilis.
-                 * 		3:Your monthly subscription is not paid in full. Please pay your monthly subscription bill to continue using Nexilis service.
-                 * 		4:Your Customer Engagement Credit has run out and your Prepaid Credit Balance is empty. Please top-up your Prepaid Credit Balance to continue using Nexilis
-                 *		23:Unsupported Android version
-                 * 		93:Missing the required overlay permission
-                 * 		94:Unregistered User
-                 * 		95:Invalid Nexilis Button Mode (1,2,3)
-                 * 		96:Activity is null
-                 * 		97:Account is empty
-                 * 		98:Your account didn't match
-                 * 		99:Something went wrong
-                 */
-                
-                runOnUiThread(new Runnable() {
-                    @Override
-                    public void run() {
-                        Toast.makeText(getBaseContext(), reasonCode, Toast.LENGTH_LONG).show();
-                    }
-                });
-            }
-        });
     }
 }

+ 2 - 1
NexilisSampleCodeReact-iOS/ios/CallNative.swift

@@ -19,7 +19,8 @@ class CallNative: NSObject, ConnectDelegate {
   }
   
   @objc func connect() {
-    APIS.connect(apiKey: "1C4FA430BC9F44484AFBE99C8974D70B68CE7891DBE83505CBF01205DE51FC18", delegate: self) //***REPLACE WITH YOUR API KEY***
+    //FLOATING
+    APIS.connect(apiKey: "***REPLACE***WITH***YOUR***ACCOUNT***", delegate: self, showButton: false)
   }
   
   @objc func openContactCenter() {

+ 141 - 1
main.py

@@ -1298,10 +1298,41 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
                         f.write(indented_str(3, '// UIAction(title: "Live Streaming".localized(), handler: {(_) in'))
                         f.write(indented_str(4, "// APIS.openStreaming();"))
                         f.write(indented_str(3, "// }),"))
+                elif "//FLOATING" in line:
+                    if mode == "floating":
+                        if features["cc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        if features["nc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        if features["im"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        if features["call"]["status"]:
+                            f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        if features["ls"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                    else:
+                        f.write(indented_str(0, ""))
+                elif "APIS.connect" in line:
+                    if mode == "floating":
+                        replaced = line.replace("false", "true")
+                        f.write(replaced)
+                    else:
+                        f.write(line)
                 else:
                     f.write(line)
     elif platform == "ios_flutter":
         main_act_path = os.path.join(path_dest, "lib/main.dart")
+        main_act_ios = os.path.join(path_dest, "ios/Runner/AppDelegate.swift")
         with open(main_act_path, "r") as f:
             lines = f.readlines()
         with open(main_act_path, "w") as f:
@@ -1381,8 +1412,45 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
                         f.write(indented_str(4, "// break;", spaces=2))
                 else:
                     f.write(line)
+        with open(main_act_ios, "r") as f:
+            lines = f.readlines()
+        with open(main_act_ios, "w") as f:
+            for line in lines:
+                if "//FLOATING" in line:
+                    if mode == "floating":
+                        if features["cc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        if features["nc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        if features["im"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        if features["call"]["status"]:
+                            f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        if features["ls"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                    else:
+                        f.write(indented_str(0, ""))
+                elif "APIS.connect" in line:
+                    if mode == "floating":
+                        replaced = line.replace("false", "true")
+                        f.write(replaced)
+                    else:
+                        f.write(line)
+                else:
+                    f.write(line)
     elif platform == "ios_ionic":
         main_act_path = os.path.join(path_dest, "src/app/app.component.ts")
+        main_act_ios = os.path.join(path_dest, "ios/App/App/AppDelegate.swift")
         with open(main_act_path, "r") as f:
             lines = f.readlines()
         with open(main_act_path, "w") as f:
@@ -1472,8 +1540,45 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
                         f.write(indented_str(4, "// },", spaces=2))
                 else:
                     f.write(line)
+        with open(main_act_ios, "r") as f:
+            lines = f.readlines()
+        with open(main_act_ios, "w") as f:
+            for line in lines:
+                if "//FLOATING" in line:
+                    if mode == "floating":
+                        if features["cc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        if features["nc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        if features["im"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        if features["call"]["status"]:
+                            f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        if features["ls"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                    else:
+                        f.write(indented_str(0, ""))
+                elif "APIS.connect" in line:
+                    if mode == "floating":
+                        replaced = line.replace("false", "true")
+                        f.write(replaced)
+                    else:
+                        f.write(line)
+                else:
+                    f.write(line)
     elif platform == "ios_react":
         main_act_path = os.path.join(path_dest, "App.tsx")
+        main_act_ios = os.path.join(path_dest, "ios/CallNative.swift")
         with open(main_act_path, "r") as f:
             lines = f.readlines()
         with open(main_act_path, "w") as f:
@@ -1728,7 +1833,42 @@ def change(platform: str, mode: str, path_dest: str, features: dict, security: d
                         f.write(indented_str(5, "/> */}", spaces=2))
                 else:
                     f.write(line)
-
+        with open(main_act_ios, "r") as f:
+            lines = f.readlines()
+        with open(main_act_ios, "w") as f:
+            for line in lines:
+                if "//FLOATING" in line:
+                    if mode == "floating":
+                        if features["cc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CC)'))
+                        if features["nc"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        else:
+                            f.write(indented_str(2, '// Nexilis.defaultFloatingButton.append(Nexilis.IDX_NOTIF_CENTER)'))
+                        if features["im"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CHAT)'))
+                        if features["call"]["status"]:
+                            f.write(indented_str(2,'Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_CALL)'))
+                        if features["ls"]["status"]:
+                            f.write(indented_str(2, 'Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                        else:
+                            f.write(indented_str(2,'// Nexilis.defaultFloatingButton.append(Nexilis.IDX_STREAM)'))
+                    else:
+                        f.write(indented_str(0, ""))
+                elif "APIS.connect" in line:
+                    if mode == "floating":
+                        replaced = line.replace("false", "true")
+                        f.write(replaced)
+                    else:
+                        f.write(line)
+                else:
+                    f.write(line)
 
 def deliver_zip(path_dest, uid):
     rand_name = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(32))