ios – Call a viewcontroller present in a framework form my current project


I have been trying to call a view controller present in my Framework’s story board from a demo project. I am not able to do so and it ends up with following error :

Could not find a storyboard named ‘checkoAuthFrameworkStoryBoard’ in bundle NSBundle

My code :

Current project from where I am trying to open the Framework’s view controller :

if let bundle = Bundle(identifier: "co.transpacks.checkoAuthFramework") {
                MyFrameworkCoordinator.instantiateFrameworkStoryboard(controller: self, bundle: bundle)
            }

Framework’s public class which is being called :

public class MyFrameworkCoordinator {
    public static func instantiateFrameworkStoryboard(controller: UIViewController,bundle: Bundle) {
            let storyboard = UIStoryboard(name: "checkoAuthFrameworkStoryBoard", bundle: bundle)
            let scanVC = storyboard.instantiateViewController(withIdentifier: "ScanViewController") as! ScanViewController
            
            controller.present(scanVC.self, animated: true, completion: {
                
            })
    }
    
}

please help.

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img