forcedotcom/sf-skills / plugins/builder/mobile-development/skills/mobile-platform-native-capabilities-integrate
mobile-platform-native-capabilities-integrate
VerifiedBuild a Salesforce LWC that uses native mobile device capabilities — barcode scanner, biometrics, location, NFC, calendar, contacts, document scanner, geofencing, AR space capture, app review, and payments. Use this skill when the user asks for an LWC that scans a barcode, captures a photo of a document, reads location or geofences, prompts for biometrics, reads/writes the device calendar or contacts, taps NFC, takes a payment, prompts for an app review, or scans an AR space. Also triggers on "lightning/mobileCapabilities", "mobile capability", "Nimbus", "device capability". Do not use for mobile offline / Komaci priming reviews (use `mobile-platform-offline-validate`) or for picking generic Lightning base components (use `design-systems-slds-apply`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.6 KB |
| references/app-review.md | markdown | 2.2 KB |
| references/ar-space-capture.md | markdown | 3.3 KB |
| references/barcode-scanner.md | markdown | 8.1 KB |
| references/base-capability.md | markdown | 651 B |
| references/biometrics.md | markdown | 3.9 KB |
| references/calendar.md | markdown | 7.3 KB |
| references/contacts.md | markdown | 6.9 KB |
| references/document-scanner.md | markdown | 9.7 KB |
| references/geofencing.md | markdown | 4.2 KB |
| references/location.md | markdown | 5.4 KB |
| references/mobile-capabilities.md | markdown | 2.1 KB |
| references/nfc.md | markdown | 7.5 KB |
| references/payments.md | markdown | 2.9 KB |
references/ar-space-capture.md
View on GitHub# AR Space Capture Service Grounding Context
The following content provides grounding information for generating a Salesforce LWC that leverages AR Space Capture facilities on mobile devices. Specifically, this context will cover the API types and methods available to leverage the AR Space Capture API of the mobile device, within the LWC.
## AR Space Capture Service API
```typescript
/*
* Copyright (c) 2024, Salesforce, Inc.
* All rights reserved.
* For full license text, see the LICENSE.txt file
*/
import { BaseCapability } from '../BaseCapability.js';
/**
* Use this factory function to get an instance of {@linkcode ARSpaceCapture}.
* @returns An instance of {@linkcode ARSpaceCapture}.
*/
export function getARSpaceCapture(): ARSpaceCapture;
/**
* Scan a room using Apple's RoomPlan AR Capabilities.
*/
export interface ARSpaceCapture extends BaseCapability {
/**
* Scan Room using Apple's AR Capabilities.
* @param options The customization options for the {@linkcode ARSpaceCapture} Plugin.
* @returns A resolved promise returns {@linkcode ARSpaceCaptureResult} object.
*/
scanRoom(options?: ARSpaceCaptureOptions): Promise<ARSpaceCaptureResult>;
}
/**
* ARSpaceCaptureResult interface.
*/
export interface ARSpaceCaptureResult {
capturedRooms: CapturedRoom[] | null;
}
/**
* CapturedRoom interface.
*/
export interface CapturedRoom {
/**
* An array of walls that the framework identifies during a scan.
*/
walls: unknown[];
/**
* An array of doors that the framework identifies during a scan.
*/
doors: unknown[];
/**
* An array of windows that the framework identifies during a scan.
*/
windows: unknown[];
/**
* An array of openings that the framework identifies during a scan.
*/
openings: unknown[];
/**
* An array of floors that the framework identifies during a scan.
* Available iOS 17.0+.
*/
floors: unknown[];
/**
* An array of objects that the framework identifies during a scan.
*/
objects: unknown[];
/**
* A unique alphanumeric value that the framework assigns the room.
*/
identifier: string;
/**
* One or more room types that the framework observes in the room.
* Available iOS 17.0+.
*/
sections: unknown[];
/**
* The story, floor number, or level on which the captured room resides within a larger structure.
* Available iOS 17.0+.
*/
story: number;
/**
* A version number for the captured room.
* Available iOS 17.0+.
*/
version: number;
}
/**
* ARSpaceCaptureOptions interface.
*/
export interface ARSpaceCaptureOptions {
permissionRationaleText?: string;
presentWithAnimation: boolean;
}
/**
* ARSpaceCaptureFailure interface.
*/
export interface ARSpaceCaptureFailure {
code: ARSpaceCaptureFailureCode;
message: string;
}
/**
* Possible failure codes.
*/
type ARSpaceCaptureFailureCode =
| 'USER_DISMISSED' // User cancelled the operation.
| 'USER_DENIED_PERMISSION' // The user denied permissions to use the device camera.
| 'AR_NOT_SUPPORTED' // The AR capabilities are not enabled/available on the device.
| 'SERVICE_NOT_ENABLED' // The service is not enabled and therefore cannot be used.
| 'UNKNOWN_REASON'; // An error happened in the native code that is not permission based. Will give more information in the ARSpaceCaptureFailure message
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |