function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manish Kumar 61Manish Kumar 61 

Add Lightning component to Salesforce1

I created one lightning component but my lightning component is not showing in LIghtning Component tab. I want to add it to Salesforce1 but it's not visible. What am I missing?
Best Answer chosen by Manish Kumar 61
Gaurav KheterpalGaurav Kheterpal
I assume you mean that you want your component to show up in Salesforce1 menu. If so, you need to make sure that your component follows the force:appHostable interface.

For example,
 
<aura:component implements="force:appHostable" />
//...
/...
</aura:component>
You can refer to the official tutorial here (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_add_cmp_salesforce1.htm).

If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.

 

All Answers

Gaurav KheterpalGaurav Kheterpal
I assume you mean that you want your component to show up in Salesforce1 menu. If so, you need to make sure that your component follows the force:appHostable interface.

For example,
 
<aura:component implements="force:appHostable" />
//...
/...
</aura:component>
You can refer to the official tutorial here (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_add_cmp_salesforce1.htm).

If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.

 
This was selected as the best answer
Manish Kumar 61Manish Kumar 61
Thanks, this is what I was looking for.
Derrick Koon 7Derrick Koon 7
I followed the instructions, the tab for my lightning component showed up in Salesforce1, but when i click on the tab, a spnner came out and a blank page was displayed.  What am I missing?
tggagnetggagne
I was having this same problem a little while ago, but walked away and it worked when I came back to it.  Some kind of caching problem?  Regardless, it's working now.
Wenda McMahanWenda McMahan
I already had the <aura:component implements="force:appHostable">

but still the component does not show up. Also, my Setup => Create Tabs => ... reads "Lightning Pages" ... I don't have a selection of "Lightning Components" ... is this the issue?