Importing the Face Capture SDK to a Project¶
To include the Face Capture SDK in your application requires the following steps:
- Copy files to the following directories in your React Native project
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/ |
- Add the Objective-C source files (located in /dst/ios/src) to the Xcode project file
- Add the AwFaceCaptureFrameWork framework to the Xcode project file
- Add __IOS__ to the GCC preprocessor definitions list in the Xcode project file
- Run “npm install” in /dst
- Run “pod install” in /dst/ios
- Import the Face Capture wrapper classes into your sources as necessary
...
import { FaceCapture } from "../face_capture/face_capture";