Skip to main content

Multiple Portals and Multiple Web Applications

In some cases, it makes sense to have different teams handle different portals in bigger applications. For example, one team may maintain a "Maps & Geolocation" Portal while another might handle a "Shopping & Checkout" Portal.

Declaring Multiple Portals

Setting up multiple Portals is as easy as initializing another Portal.

let maps = Portal(name: "maps")
let shopping = Portal(name: "shopping")

This can be made even simpler using the ExpressibleByStringLiteral conformance of Portal:

let maps: Portal = "maps"
let shopping: Portal = "shopping"

Now, the "Maps & Geolocation" Portal will read from the maps directory in your assets folder and the "Shopping & Checkout" Portal will read from the shopping directory in your assets folder.

Project Structure

In your project, you'll need to setup multiple folders in your Assets directory if your web applications are discrete apps. For more information on how to setup web bundles in your native project, see our how-to guide.