Mobile and Offline Developer Guide
No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Understand the Mobile Development Cycle
Debug Mobile Components
Development Tools and Processes
Set up and use your development tools for the most efficient developer experience while
building mobile and offline LWCs.
Developing LWCs and apps for use in Salesforce mobile apps uses all the same developer tools and processes that developing LWCs for desktop use. It also poses special challenges, especially in the areas of testing and debugging. This chapter describes a number of additional tools and processes designed specifically for developing mobile LWCs.
-
Understand the Mobile Development Cycle
Learn the basics of the development cycle for mobile components, including the essential tasks and tools that you need to be productive while building LWCs for use on mobile devices. -
Set Up Your Development Environment
Before you can create your first Lightning web component (LWC), or test a LWC in a mobile app, you must set up your development environment for mobile components. -
Preview Lightning Web Components on Mobile
When you’re developing Lightning web components, it’s important to inspect your components’ presentation not only on the desktop, but also on mobile devices. To preview your components on virtual mobile devices and see changes as you code, use the Salesforce CLI Mobile Extensions plug-in. Then download and run virtual device builds of the Salesforce mobile app to preview how your components coexist with other components in Salesforce. -
Validate Lightning Web Components for Offline Use
Use the Komaci Static Analyzer (or static analyzer for short) during component development to validate your Lightning web components for offline use. Using the static analyzer helps you ensure that code dependencies and data your component depends on can be primed when a network connection is available, making the component and its data available offline when the network has limited or no connectivity. -
Develop Offline-Ready LWCs with the LWC Offline Test Harness
The LWC Offline Test Harness (Test Harness, for short) is a lightweight testing, debugging, and inspection app. It enables developers to debug Lightning web components for use in their LWC Offline-based mobile apps. Use Test Harness to execute Quick Actions on selected SObjects from your Salesforce org, debug component JavaScript, and inspect drafts and draft queue behavior. -
Debug Your Components with Virtual Device Builds
To debug your components, connect your desktop browsers to the Salesforce mobile app running on your virtual devices. Then use Safari (iOS) or Chrome (Android) developer tools to view and interact with HTML markup, step through JavaScript code, and see console logging and error messages. -
Customize the Offline Experience for the Salesforce Mobile App
Mobile Offline is an advanced runtime environment for Lightning web components. Available only for mobile devices, it replaces the standard Lightning components runtime and augments it with features designed specifically for mobile and offline use.