Skip to main content

Veritran Docs

Initialization

Follow these steps to initialize XpressPlug SDK for iOS devices:

  1. Import XpressPlugModule:

    XpressPlugSDK.initialize( 
      appDelegateClass: AppDelegate.self, withConstants: constants, andResources: resources, 
      andModules: modules) 
  2. Invoke the Initialize method:

    const initializeXpressPlug = async () => { 
        try { 
          console.log ('---- ReactNative | Calling XpressPlugModule Initialize'); 
          const result = await XpressPlugModule.initialize(); 
          const success = result === 'true'; 
          setXpInitialized(success); 
          console.log( 
            `---- ReactNative | XpressPlugModule Initialized successfully: ${success}`); 
        } catch (e) { 
          console.error(e); 
        } 
      }; 
    
      initializeXpressPlug();