Skip to main content

How to Use a Web App in a Portal

In order to use web applications in your native applications, you'll need to properly setup your project to be able to include a web bundle.

Setup the Web Asset Directory#

Your web application needs to be copied into your native application. On iOS, put your web assets in a directory at the same level that contains your main source and the info.plist file:

iOS Web Asset Directory

You will need to include the folder in XCode (and not just simply copy the folder to the right directory).

PortalManager.newPortal("myPortalWebApp").create()
// or...using a different portalId and starting directory
PortalManager.newPortal("help")    .setStartDir("myPortalWebApp")    .create()

Automating the Process#

Once you have your web code and native code linked up, you will need a process to continually copy in new versions of the web application into your mobile projects.

We recommend having some type of automation set up so the mobile developer doesn't have to manually copy over the web code every time there is a new change. We have a few guides for ideas to do so in a monorepo or git submodules.