3

As lightning web component do not support currently (spring 19) in lightning out. How would one expose the component On a native mobile device? Is it possible?

2 Answers 2

5

You can use your Lightning Web Component in mobile app too. The < component >.js-meta.xml file defines the metadata values for the component, including the design configuration for components intended for use in Lightning App Builder. Edit the configuration file to:

  • Make your component usable in Lightning App Builder and in managed packages.
  • Define what types of Lightning pages your component can be used on.
  • Configure your component’s properties.
  • Set your component’s supported objects.
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>45.0</apiVersion>
<isExposed>true</isExposed>
<masterLabel>Best Component Ever</masterLabel>
<description>This is a demo component.</description>
<targets>
      <target>lightning__RecordPage</target>
      <target>lightning__AppPage</target>
      <target>lightning__HomePage</target>
</targets></LightningComponentBundle>

Including the above code in meta file will expose your component to App pages, home pages and record pages. You can use app pages in your mobile app.

Read more here: Use Components in Salesforce Experiences

It will tell you how to use Lightning web components in different containers, including Lightning Experience, the Salesforce mobile app, and Lightning communities.

7
  • Are you saying that lwc would be wrapped with aura Component then placed on a lightning page and added as a tab to Salesforce mobile app would work ? Would it be possible then to expose it this way via lightning out app then? I guess I need to expirment it but if someone have tried would save some time..
    – sfdx bomb
    Mar 17, 2019 at 20:59
  • remember to accept the answer =)
    – glls
    Mar 30, 2019 at 11:45
  • 1
    So as of right now, LWC components are not visible in Salesforce Mobile App without first being exposed through Aura component? #fineprint Jun 21, 2019 at 20:21
  • 1
    @bemon yes played a bit with it - you can add your lwc to lightning__AppPage and then expose this tab in Salesforce mobile app.
    – sfdx bomb
    Jul 30, 2019 at 11:53
  • 1
    @sfdxbomb so you still can't actually put a simple LWC on record page to appear in mobile, correct? LWCs definitely lose appeal if they can't be accessed in mobile app. Jun 25, 2020 at 5:06
1

Expose the lightning web component is only available on lightning__AppPage. Not lightning record page. Tried with form factor visibility, aura component wrapper, lightning tab. None of them work with permission and record type specified...

Unless! You assign it as org default, it worked for me. If you don't want permission, record type control... go ahead.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .