Importing the Face Capture SDK to a Project

To include the Face Capture SDK in your application requires the following steps:

  1. Copy files to the following directories in your React Native project
Table 1 Copy Files:
Source File (src=FaceCapture, installation) Destination Folder (dst)
   
/src/react_native/aw_face_capture/face_capture.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_android_image.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_camera.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_capture_state.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_constants.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_enums.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_errors.js /dst/src/face_capture/
/src/react_native/aw_face_capture/face_capture_workflow.js /dst/src/face_capture/
   
/src/react_native/aw_face_capture/ios/RCTFaceCaptureModule.h /dst/ios/src/
/src/react_native/aw_face_capture/ios/RCTFaceCaptureModule.m /dst/ios/src/
/src/react_native/aw_face_capture/ios/RCTFaceCaptureUtility.h /dst/ios/src/
/src/react_native/aw_face_capture/ios/RCTFaceCaptureUtility.m /dst/ios/src/
   
/src/lib/ios-arm64/AwFaceCaptureFrameWork.framework /dst/ios/lib/
  1. Add the Objective-C source files (located in /dst/ios/src) to the Xcode project file
  2. Add the AwFaceCaptureFrameWork framework to the Xcode project file
  3. Add __IOS__ to the GCC preprocessor definitions list in the Xcode project file
  4. Run “npm install” in /dst
  5. Run “pod install” in /dst/ios
  6. Import the Face Capture wrapper classes into your sources as necessary
Listing 1 Including Face Capture
                           ...

   import { FaceCapture } from "../face_capture/face_capture";