hellohaptik / HPWebKitLib-iOS

Apache License 2.0
0 stars 0 forks source link

Launch controller does not have navigation controller instance" #14

Open arunsngh100 opened 2 years ago

arunsngh100 commented 2 years ago

Hi Dev Team... getting below message while using latest version

Error Domain=com.haptik.HPWebKit Code=-56 "Launch controller does not have navigation controller instance" UserInfo={NSLocalizedDescription=Launch controller does not have navigation controller instance, NSLocalizedRecoverySuggestion=Embed launch controller with navigation controller}

IDE - Xcode 13.3.1 Swift Compiler - 5 Minimum OS Support - 11.1

avinashamanjha251 commented 2 years ago

Hi Dev Team, I'm also getting the same

"Launch controller does not have navigation controller instance" I tried to open sdk from app delegate in flutter project getting same message ...


 AppDelegate.shared.nvc = UINavigationController(rootViewController:  UIViewController())
        AppDelegate.shared.nvc?.isNavigationBarHidden = true
        UIView.transition(with: AppDelegate.shared.window!, duration: 0.33, options: UIView.AnimationOptions.transitionCrossDissolve, animations: {
            AppDelegate.shared.window?.rootViewController =  AppDelegate.shared.nvc
        }, completion: { (finished) in

        })
        AppDelegate.shared.window?.becomeKey()
        AppDelegate.shared.window?.makeKeyAndVisible()

        do {
            try HPKit.sharedSDK.loadGuestConversation(launchController: AppDelegate.shared.nvc!, customData: nil)                    
            result(true)
        } catch {
            print(error)
            result(false)
        }