Skip to main content
Once you have a Portal instance and you have generated a wallet, you can now build a web view to interact with dApps using the Portal wallet. In the example below, we created WebViewController that initializes Portal’s PortalWebView and adds it as a child view controller. PortalWebView init parameters:
  • portal: Your Portal instance.
  • url: The URL the web view should start at.
  • persistSessionData: Will persist browser session data (local-storage, cookies, etc…) when enabled.
  • onError: An error handler in case the web view throws errors.
  • onPageStart: A handler that fires when the web view is starting to load a page.
  • onPageComplete: A handler that fires when the web view has finished loading a page.
  • eip6963Icon: A string representing the Base64-encoded icon for EIP-6963 compliance.
  • eip6963Name: A string representing the name for EIP-6963 compliance.
  • eip6963Rdns: A reverse DNS string for identifying the application in EIP-6963-compliant contexts.
  • eip6963Uuid: A unique identifier string for EIP-6963 compliance.
And thats it! Remember that you will need a portal instance to start the web view and you will also need to initialize Portal with autoApprove: true if you want the web view to auto-approve transactions. Next, let’s explore how to use Portal’s Swaps integration to perform swaps directly from your iOS app.