Deep Link not working after opening third-party ios SDK screen in flutter plugin

Viewed 186

I've created a plugin in flutter. Inside this plugin's iOS side, I've used third-party iOS SDK. Third-party SDK contains their own screen. Deep-link working perfectly in flutter screens. But when I open the third-party SDK's screen then deep link stop working. For example ScreenA is flutter's screen and ScreenB is third-party iOS SDK Screen. Invoking deep link opens ScreenA but when i navigate to ScreenB then i cant open Screen A using deep link. To open third-party sdk screen I've used the below code on my plugin's ios side.

let flutterViewController = FlutterViewController()
            self.navigationController = UINavigationController(rootViewController: flutterViewController);
            self.navigationController.setNavigationBarHidden(true, animated: false)
            self.window = UIWindow(frame: UIScreen.main.bounds)
            self.window!.rootViewController = self.navigationController
            self.window!.makeKeyAndVisible()
        Third-partySdk.sharedInstance.openScreen()

And in the iOS SDK side

let currentBundle = Bundle(for: type(of: self))
        let cs = CustomScreen(nibName: "nibName", bundle: currentBundle)
        navigationController.setNavigationBarHidden(true, animated: true)
        navigationController.navigationBar.barStyle = .default
        navigationController.navigationBar.isTranslucent = false
        navigationController.pushViewController(cs, animated: true)

I've searched many StackOverflow answers and other ways but could not find any solution.

0 Answers
Related