### Start Example App Packager Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Starts the Metro server, which is required to run the example application. This allows developers to test changes in a live environment. ```sh yarn example start ``` -------------------------------- ### Full Primer React Native SDK Integration Example Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/README.md A comprehensive example combining initialization, client token generation, and displaying Universal Checkout in a React Native component. It includes the `onCheckoutComplete` callback for handling payment results. ```javascript import * as React from 'react'; import { Primer, PrimerSettings, PrimerCheckoutData } from '@primer-io/react-native'; const CheckoutScreen = async (props: any) => { const onCheckoutComplete = (checkoutData: PrimerCheckoutData) => { // Show a success screen }; const onUniversalCheckoutButtonTapped = async () => { const settings: PrimerSettings = { onCheckoutComplete: onCheckoutComplete }; // Configure the SDK await Primer.configure(settings); // Ask your backend to create a client session const clientToken = await createClientSession(clientSessionRequestParams); // Present Universal Checkout await Primer.showUniversalCheckout(clientToken); }; } ``` -------------------------------- ### Install Primer React Native SDK Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/README.md Instructions for adding the Primer React Native SDK package to your project using either yarn or npm. After installation, navigate to the \/ios folder and run pod install. ```shell # With yarn yarn add @primer-io/react-native # With npm npm i @primer-io/react-native --save ``` -------------------------------- ### Install Primer React Native SDK Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Instructions for installing the Primer React Native SDK using either Yarn or npm. Includes a step for installing CocoaPods dependencies for iOS. ```bash # Install with yarn yarn add @primer-io/react-native # Install with npm npm install @primer-io/react-native --save # For iOS, install CocoaPods dependencies cd ios && pod install ``` -------------------------------- ### Show Universal Checkout with Primer SDK Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/README.md Shows how to present the Universal Checkout interface to the user after obtaining a client token. This is achieved by calling the `showUniversalCheckout` function with the obtained client token. ```javascript const CheckoutScreen = (props: any) => { // ... const onUniversalCheckoutButtonTapped = async () => { try { // ... // Present Universal Checkout await Primer.showUniversalCheckout(clientToken); } catch (err) { // ... } }; } ``` -------------------------------- ### Run Example App on Android Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Builds and runs the example application on an Android device or emulator. This is used to test functionality and UI on the Android platform. ```sh yarn example android ``` -------------------------------- ### Bootstrap Project Dependencies and Pods Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Installs all project dependencies and CocoaPods for the iOS environment. This script is used for initial project setup or after major dependency changes. ```sh yarn bootstrap ``` -------------------------------- ### Initialize Primer React Native SDK Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/README.md Demonstrates how to initialize the Primer SDK within a React Native component. It involves importing necessary components, defining settings (including a callback for checkout completion), and calling the `configure` function. ```javascript import * as React from 'react'; import { Primer, PrimerSettings, PrimerCheckoutData } from '@primer-io/react-native'; const CheckoutScreen = (props: any) => { const onCheckoutComplete = (checkoutData: PrimerCheckoutData) => { // Perform an action based on the payment creation response // ex. show success screen, redirect to order confirmation view, etc. }; React.useEffect(() => { const settings: PrimerSettings = { onCheckoutComplete: onCheckoutComplete }; Primer.configure(settings) .then(() => { // SDK is initialized sucessfully }) .catch (err => { // SDK failed to initialize }) }, []); } ``` -------------------------------- ### Install Xcode Command Line Tools Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Ensures the latest Xcode command line tools are installed on your system, which is a prerequisite for using Fastlane. No specific inputs or outputs other than the successful installation of the tools. ```sh xcode-select --install ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Installs all necessary dependencies for the project, including those for each individual package. This is a prerequisite for most development tasks. ```sh yarn ``` -------------------------------- ### Run Example App on iOS Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Builds and runs the example application on an iOS device or simulator. This is used to test functionality and UI on the iOS platform. ```sh yarn example ios ``` -------------------------------- ### Generate Client Token for Primer SDK Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/README.md Illustrates how to generate a client token, a prerequisite for showing Universal Checkout. This typically involves making an API call to your backend to create a client session. The token should be stored for future use. ```javascript const CheckoutScreen = (props: any) => { // ... const onUniversalCheckoutButtonTapped = async () => { try { // Make an API request to your backend to create a client session // and fetch a client token. const clientToken = await createClientSession(clientSessionRequestParams); } catch (err) { // ... } }; } ``` -------------------------------- ### Build and Upload Android App to Appetize with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'appetize_build_and_upload' action for the Android platform using Fastlane. This command builds the Android application and uploads it to Appetize.io for instant in-browser testing. Requires Appetize credentials and setup. ```sh [bundle exec] fastlane android appetize_build_and_upload ``` -------------------------------- ### Build and Upload iOS App to Appetize with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'appetize_build_and_upload' action for the iOS platform using Fastlane. This command builds the iOS application and uploads it to Appetize.io for instant in-browser testing. Requires Appetize credentials and setup. ```sh [bundle exec] fastlane ios appetize_build_and_upload ``` -------------------------------- ### Implement Universal Checkout Flow Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Demonstrates the implementation of the Universal Checkout flow using the Primer SDK. This involves configuring the SDK, creating a client session via a backend API, and then displaying the Universal Checkout UI. ```javascript import { Primer } from '@primer-io/react-native'; import axios from 'axios'; // Complete checkout flow implementation const handleCheckout = async () => { try { // Step 1: Configure SDK const settings = { onCheckoutComplete: (checkoutData) => { console.log('Payment successful:', checkoutData.payment?.id); navigation.navigate('Success'); }, onError: (error, checkoutData, handler) => { console.error('Payment failed:', error.errorId, error.description); Alert.alert('Payment Error', error.description); } }; await Primer.configure(settings); // Step 2: Create client session via backend const response = await axios.post('https://your-api.com/client-session', { customerId: 'customer_123', orderId: 'order_456', amount: 1000, currencyCode: 'USD' }, { headers: { 'X-Api-Key': 'your-api-key' } }); const clientToken = response.data.clientToken; // Step 3: Show Universal Checkout await Primer.showUniversalCheckout(clientToken); } catch (error) { console.error('Checkout error:', error); } }; // Clean up SDK when done useEffect(() => { return () => { Primer.cleanUp(); }; }, []); ``` -------------------------------- ### Configure Primer SDK Settings and Callbacks Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Configures the Primer SDK with essential settings and callback functions for payment handling. Includes options for payment handling mode, checkout completion, error management, and pre-payment validation. ```javascript import { Primer, PrimerSettings, PrimerCheckoutData } from '@primer-io/react-native'; // Configure SDK settings const settings: PrimerSettings = { paymentHandling: 'AUTO', onCheckoutComplete: (checkoutData: PrimerCheckoutData) => { console.log('Payment completed:', checkoutData.payment?.id); // Navigate to success screen }, onError: (error, checkoutData, handler) => { console.error('Payment error:', error.description); handler?.showErrorMessage(error.description); }, onBeforePaymentCreate: (checkoutPaymentMethodData, handler) => { // Validate payment before creation console.log('Payment method:', checkoutPaymentMethodData.paymentMethodType); handler.continuePaymentCreation(); }, uiOptions: { isInitScreenEnabled: true, isSuccessScreenEnabled: true, theme: { colorPrimary: '#0055FF', colorText: '#000000' } } }; // Initialize the SDK await Primer.configure(settings); ``` -------------------------------- ### Initialize Headless Universal Checkout in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Initializes the headless universal checkout flow, handling various callbacks for payment method loading, tokenization, and checkout completion. It requires a client token obtained from your backend and configures event listeners for a custom UI. Errors during the process are also handled. ```javascript import { HeadlessUniversalCheckout, PrimerSettings, PaymentMethod } from '@primer-io/react-native'; // Configure and start headless checkout const startHeadlessCheckout = async () => { try { const settings: PrimerSettings = { headlessUniversalCheckoutCallbacks: { onAvailablePaymentMethodsLoad: (paymentMethods: PaymentMethod[]) => { console.log('Available payment methods:', paymentMethods.length); setPaymentMethods(paymentMethods); }, onTokenizationStart: (paymentMethodType) => { console.log('Tokenizing:', paymentMethodType); setLoading(true); }, onTokenizationSuccess: (paymentMethodTokenData, handler) => { console.log('Token created:', paymentMethodTokenData.token); handler.complete(); }, onCheckoutComplete: (checkoutData) => { console.log('Checkout complete:', checkoutData.payment?.id); setLoading(false); navigation.navigate('Success'); }, onError: (error, checkoutData) => { console.error('Error:', error.description); setLoading(false); Alert.alert('Error', error.description); } } }; // Get client token from backend const { clientToken } = await createClientSession(); // Start headless checkout const availablePaymentMethods = await HeadlessUniversalCheckout.startWithClientToken( clientToken, settings ); console.log('Payment methods ready:', availablePaymentMethods); } catch (error) { console.error('Failed to start checkout:', error); } }; ``` -------------------------------- ### Tokenization Handler: Manual Payment Handling with Custom Backend in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Configures manual payment handling using PrimerSettings, including the onTokenizeSuccess callback for custom backend integration. This function requires Primer, PrimerSettings, and TokenizationHandler imports. It sends payment tokens to a specified backend API and handles success, failure, or further authentication steps based on the backend's response. ```javascript import { Primer, PrimerSettings, TokenizationHandler } from '@primer-io/react-native'; // Manual payment handling with tokenization const configureManualPayment = async () => { const settings: PrimerSettings = { paymentHandling: 'MANUAL', onTokenizeSuccess: async (paymentMethodTokenData, handler) => { try { console.log('Token:', paymentMethodTokenData.token); console.log('Type:', paymentMethodTokenData.paymentMethodType); // Send token to your backend const response = await fetch('https://your-api.com/payments', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ paymentMethodToken: paymentMethodTokenData.token, amount: 1000, currency: 'USD' }) }); const result = await response.json(); if (result.status === 'AUTHORIZED') { // Payment successful handler.handleSuccess(); } else if (result.requiresNewClientToken) { // Handle 3DS or additional authentication handler.continueWithNewClientToken(result.clientToken); } else { // Payment failed handler.handleFailure('Payment was declined'); } } catch (error) { console.error('Backend error:', error); handler.handleFailure(error.message); } } }; await Primer.configure(settings); }; ``` -------------------------------- ### Configure Google Pay in React Native using Primer SDK Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Sets up Google Pay for integration with the Primer SDK. It defines merchant information, accepted card networks, billing address capture, and shipping address parameters. Dependencies include `PrimerSettings` from `@primer-io/react-native`. Customization options for the Google Pay button appearance are also available. ```javascript import { PrimerSettings } from '@primer-io/react-native'; const settings: PrimerSettings = { paymentMethodOptions: { googlePayOptions: { merchantName: 'Your Company', allowedCardNetworks: ['VISA', 'MASTERCARD', 'AMEX'], isCaptureBillingAddressEnabled: true, emailAddressRequired: true, requireShippingMethod: true, shippingAddressParameters: { isPhoneNumberRequired: true }, buttonOptions: { buttonType: 1, // Buy button buttonTheme: 2 // Dark theme } } } }; await Primer.configure(settings); ``` -------------------------------- ### Handle Client Session Updates in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt This snippet demonstrates how to configure the Primer SDK in React Native to handle client session updates. It includes callbacks for before and after a session update, allowing for UI changes like showing a loading indicator and updating order details upon successful update. Dependencies include '@primer-io/react-native'. ```javascript import { PrimerSettings, ClientSession } from '@primer-io/react-native'; const settings: PrimerSettings = { onBeforeClientSessionUpdate: () => { console.log('Client session will update'); // Show loading indicator setUpdating(true); }, onClientSessionUpdate: (clientSession: ClientSession) => { console.log('Client session updated'); console.log('Order:', clientSession.order); console.log('Amount:', clientSession.order?.totalAmount); console.log('Currency:', clientSession.order?.currencyCode); console.log('Customer:', clientSession.customer?.emailAddress); // Update UI with new session data setOrderAmount(clientSession.order?.totalAmount); setUpdating(false); } }; await Primer.configure(settings); ``` -------------------------------- ### Run Unit Tests Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Executes the unit tests for the project using Jest. Adding tests for new changes is highly encouraged to ensure code stability. ```sh yarn test ``` -------------------------------- ### Implement Klarna Payment Flow in React Native with Primer SDK Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Integrates Klarna payments using `KlarnaManager` and `PrimerKlarnaPaymentView` from `@primer-io/react-native`. The `KlarnaManager` handles the payment session lifecycle, emitting events for different stages like `paymentSessionCreated` and `paymentSessionAuthorized`. The `PrimerKlarnaPaymentView` renders the Klarna payment interface. ```javascript import { KlarnaManager } from '@primer-io/react-native'; import { PrimerKlarnaPaymentView } from '@primer-io/react-native'; // Configure Klarna payment manager const handleKlarnaPayment = async () => { const manager = new KlarnaManager({ paymentMethodType: 'KLARNA', onStep: (step) => { console.log('Klarna step:', step.stepName); if (step.stepName === 'paymentSessionCreated') { console.log('Payment categories:', step.paymentCategories); setKlarnaCategories(step.paymentCategories); } else if (step.stepName === 'paymentSessionAuthorized') { console.log('Payment authorized'); setShowKlarnaView(true); } else if (step.stepName === 'paymentViewLoaded') { console.log('Klarna view ready'); } } }); await manager.start(); }; // Render Klarna payment view const KlarnaCheckout = () => ( console.log('Klarna view loaded')} onError={(error) => console.error('Klarna error:', error)} /> ); ``` -------------------------------- ### Vault Manager: Fetch, Delete, and Pay with Saved Payment Methods in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Demonstrates how to use the VaultManager from '@primer-io/react-native' to fetch, delete, and pay with saved payment methods. It requires the VaultManager to be imported and configured before use. Outputs include the number of saved methods, their types and IDs, and payment status logs. ```javascript import { VaultManager } from '@primer-io/react-native'; // Fetch and display saved payment methods const loadVaultedPaymentMethods = async () => { try { const vaultManager = new VaultManager(); // Configure vault manager await vaultManager.configure(); // Fetch saved payment methods const vaultedMethods = await vaultManager.fetchVaultedPaymentMethods(); console.log(`Found ${vaultedMethods.length} saved payment methods`); vaultedMethods.forEach(method => { console.log(`Method: ${method.paymentMethodType}`); console.log(`ID: ${method.id}`); console.log(`Last 4: ${method.paymentInstrumentData?.last4Digits}`); }); setVaultedPaymentMethods(vaultedMethods); } catch (error) { console.error('Failed to load vaulted methods:', error); } }; // Delete a saved payment method const deletePaymentMethod = async (methodId: string) => { try { const vaultManager = new VaultManager(); await vaultManager.configure(); await vaultManager.deleteVaultedPaymentMethod(methodId); console.log('Payment method deleted'); await loadVaultedPaymentMethods(); // Refresh list } catch (error) { console.error('Failed to delete payment method:', error); } }; // Pay with saved payment method const payWithVaultedMethod = async (methodId: string) => { try { const vaultManager = new VaultManager(); await vaultManager.configure(); // Validate CVV for card payments const additionalData = { cvv: '123' }; const errors = await vaultManager.validate(methodId, additionalData); if (errors.length > 0) { console.error('Validation errors:', errors); return; } // Start payment flow await vaultManager.startPaymentFlow(methodId, additionalData); console.log('Payment flow started'); } catch (error) { console.error('Payment error:', error); } }; ``` -------------------------------- ### Configure Apple Pay in React Native using Primer SDK Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Configures Apple Pay as a payment method within the Primer SDK. This involves setting merchant details, billing and shipping address requirements, and network checks. The `PrimerSettings` type from `@primer-io/react-native` is used. An `onCheckoutComplete` callback is provided to handle post-payment actions. ```javascript import { PrimerSettings } from '@primer-io/react-native'; const settings: PrimerSettings = { paymentMethodOptions: { applePayOptions: { merchantIdentifier: 'merchant.com.yourcompany.app', merchantName: 'Your Company', isCaptureBillingAddressEnabled: true, checkProvidedNetworks: true, billingOptions: { requiredBillingContactFields: ['postalAddress', 'name', 'emailAddress'] }, shippingOptions: { shippingContactFields: ['postalAddress', 'phoneNumber'], requireShippingMethod: true } } }, onCheckoutComplete: (checkoutData) => { console.log('Apple Pay payment complete:', checkoutData.payment?.id); } }; await Primer.configure(settings); ``` -------------------------------- ### Configure Raw Data Manager for Custom Card Payment in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Configures and utilizes the Raw Data Manager for handling custom payment data, specifically for card payments. It includes setting up metadata and validation callbacks, retrieving required input fields, setting card data, submitting the payment, and cleaning up resources. This is useful for building custom payment forms. ```javascript import { RawDataManager } from '@primer-io/react-native'; // Configure raw data manager for custom card form const configureCardPayment = async () => { try { const manager = new RawDataManager(); await manager.configure({ paymentMethodType: 'PAYMENT_CARD', onMetadataChange: (metadata) => { console.log('Card metadata:', metadata); setCardBrand(metadata?.cardNetwork); }, onValidation: (isValid, errors) => { console.log('Validation:', isValid); if (errors) { errors.forEach(error => console.error(error.description)); } setIsFormValid(isValid); } }); // Get required input fields const requiredFields = await manager.getRequiredInputElementTypes(); console.log('Required fields:', requiredFields); // Set card data const cardData = { cardNumber: '4242424242424242', expiryDate: '12/25', cvv: '123', cardholderName: 'John Doe' }; await manager.setRawData(cardData); // Submit payment await manager.submit(); // Clean up await manager.cleanUp(); } catch (error) { console.error('Card payment error:', error); } }; ``` -------------------------------- ### Run Android Unit Tests with Coverage using Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'run_unit_tests_coverage' action for the Android platform using Fastlane. This command runs unit tests and generates a code coverage report for the Android application. Requires a correctly configured Android project and testing framework. ```sh [bundle exec] fastlane android run_unit_tests_coverage ``` -------------------------------- ### Release iOS QA Build with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'qa_release' action for the iOS platform using Fastlane. This command is used to build and distribute a quality assurance (QA) version of the iOS application. It typically involves code signing and deployment configurations. ```sh [bundle exec] fastlane ios qa_release ``` -------------------------------- ### Run iOS Tests with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'tests' action for the iOS platform using Fastlane. This command is typically used to run unit and integration tests for an iOS application. It requires a correctly configured Fastlane environment. ```sh [bundle exec] fastlane ios tests ``` -------------------------------- ### Configure Primer SDK Error Handling in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Sets up a global error handler for the Primer SDK. It logs detailed error information and provides specific user-facing messages and recovery suggestions based on the error type. Dependencies include `@primer-io/react-native`. The handler receives `PrimerError`, `checkoutData`, and `ErrorHandler` objects as input. ```javascript import { Primer, PrimerError, ErrorHandler } from '@primer-io/react-native'; // Configure error handling const settings = { onError: (error: PrimerError, checkoutData, handler: ErrorHandler) => { console.log('Error ID:', error.errorId); console.log('Error Code:', error.errorCode); console.log('Description:', error.description); console.log('Recovery:', error.recoverySuggestion); console.log('Diagnostics ID:', error.diagnosticsId); // Handle specific error types switch (error.errorId) { case 'invalid-client-token': Alert.alert( 'Session Expired', 'Your payment session has expired. Please try again.', [{ text: 'OK', onPress: () => restartCheckout() }] ); break; case 'payment-failed': const message = error.description || 'Payment was declined'; Alert.alert('Payment Failed', message); handler?.showErrorMessage(message); break; case 'network-error': Alert.alert( 'Connection Error', 'Please check your internet connection and try again.' ); break; default: Alert.alert('Error', error.description); handler?.showErrorMessage(error.description); } // Log to analytics logAnalytics('payment_error', { errorId: error.errorId, errorCode: error.errorCode, diagnosticsId: error.diagnosticsId }); } }; await Primer.configure(settings); ``` -------------------------------- ### Perform iOS Danger Check with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'danger_check' action for the iOS platform using Fastlane. This command integrates Danger, a tool for automated code review, into the CI/CD pipeline. It requires Danger to be set up in the project. ```sh [bundle exec] fastlane ios danger_check ``` -------------------------------- ### Payment Resume Handler: Resume Payments Requiring Additional Authentication in React Native Source: https://context7.com/primer-io/primer-sdk-react-native/llms.txt Sets up PrimerSettings to handle payment resume flows, specifically for scenarios like 3DS or redirects. It utilizes the onResumeSuccess and onResumePending callbacks. The onResumeSuccess function sends a resume token to a backend API for authorization and handles success, failure, or continuation with a new client token. The onResumePending callback logs pending payment information. ```javascript import { PrimerSettings, ResumeHandler } from '@primer-io/react-native'; // Handle payment resume flow (3DS, redirects) const settings: PrimerSettings = { onResumeSuccess: async (resumeToken, handler) => { try { console.log('Payment requires resume with token:', resumeToken); // Send resume token to backend const response = await fetch('https://your-api.com/payments/resume', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ resumeToken: resumeToken, paymentId: currentPaymentId }) }); const result = await response.json(); if (result.status === 'AUTHORIZED') { // Payment completed successfully handler.handleSuccess(); } else if (result.requiresNewClientToken) { // Continue with new client token for additional steps handler.continueWithNewClientToken(result.clientToken); } else { // Payment failed handler.handleFailure('Payment authorization failed'); } } catch (error) { console.error('Resume error:', error); handler.handleFailure(error.message); } }, onResumePending: (additionalInfo) => { console.log('Payment pending:', additionalInfo); // Show pending state to user } }; ``` -------------------------------- ### Verify Code with TypeScript and ESLint Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Runs TypeScript for type checking and ESLint for code linting to ensure code quality and adherence to standards. These checks are crucial before committing changes. ```sh yarn typescript yarn lint ``` -------------------------------- ### Run iOS UI Tests with Fastlane Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/fastlane/README.md Executes the 'ui_tests' action for the iOS platform using Fastlane. This command is used to run UI automation tests for an iOS application. It requires a correctly configured Fastlane environment and UI test targets. ```sh [bundle exec] fastlane ios ui_tests ``` -------------------------------- ### Fix Formatting Errors with ESLint Source: https://github.com/primer-io/primer-sdk-react-native/blob/master/CONTRIBUTING.md Automatically fixes code formatting issues identified by ESLint. This command helps maintain consistent code style across the project. ```sh yarn lint --fix ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.