Embedding a Root Navigation Controller in Swift Using Storyboard
By default, Capacitor apps are embedded in a CAPBridgeViewController
. To utilize the "push" type for presenting microapps, it is necessary to embed the app within a navigation controller.
Step 1: Open the Main Storyboard
- In the project navigator, locate and open the
Main.storyboard
file.

Step 2: Add a Navigation Controller
-
Select the Bridge View Controller and locate the Editor section in the menu bar.
-
Select Editor -> Embed In -> Navigation Controller. This will embed the Bridge View Controller within a navigation controller, as well as set the navigation controller as the initial view controller.

Step 3: Customize the Navigation Controller
- To remove the navigation bar, set "Top Bar" to "None" in the Simulated Metrics section of the navigation controller.