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"
IONPortal *mapsPortal = [[IONPortal alloc] initWithName:@"maps" startDir:nil initialContext:nil];
IONPortal *shoppingPortal = [[IONPortal alloc] initWithName:@"shopping" startDir:nil initialContext:nil];
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.
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.