-
Notifications
You must be signed in to change notification settings - Fork 18
[EN] Get Started
gujiayang edited this page Feb 26, 2017
·
3 revisions
- Download Project SDK source code
git clone https://github.com/FacePlusPlus/MegviiFacepp-iOS-SDK.gitNote: if you are not using the latest version, please find corresponding version in tags.
- Download Face++ Face SDK
Please create an account on Face++ website, and download iOS SDK (Online Licensing version) from the console. (For Offline Licensing version, please contact our sales: business@faceplusplus.com)
Note: in the SDK downloaded from Face++ webiste, a compiled static library has already been included. You can skip the steps below, and refer to Deploy a Demo for how to use this SDK to build a simple app with face detection features.
- Import Static Library
- Open
MegviiFacepp-iOS-SDK/MGFacepp.xcworkspaceproject file; - Unzip the SDK downloaded from Face++ website, copy
libMegviiFacepp-0.3.4.aandmegviifacepp_0_3_4_model(we use SDK version 0.3.4 here as an example) toMegviiFacepp-iOS-SDK/MGFacepp/MegviiFacepp_C_SDK/; - Copy all the files in
MegviiFacepp-iOS-SDK/MGFacepp/MegviiFacepp_C_SDK/toMGFaceppproject; - Set project files, choose
TARGETS > MGFacepp > Build Phases > Copy bundle, addmegviifacepp_0_3_4_model, and then inMGFacepp > Build Setting, search forCurrent Project Version, change it as the SDK version (such as 0.3.4);


- Open
MGFaceppCommon.h, change the value ofKMGFACEMODELNAMEas the name of the model;

- Choose
MGFaceppSDKTest project (this project is a simple test demo)> MGFaceppSDKTest > General > Linked Frameworks Libraries, addlibMGFacepp-0.3.4.a(we use SDK version 0.3.4 here as an example). Add corresponding megviifacepp_0_3_4_model (we use SDK version 0.3.4 here as an example);

- Choose
scheme > SDKTest, run test, you will see the following result in the console:

- This output indicates that test run successfully. (For Online Licensing SDK users, you have to compile Licensing Manager SDK before you can use Face++ facial recognition. Please continue to complete the following steps, and then turn to Licensing Manager SDK guide for how to compile Licensing Manager SDK)
- Export Static Library
You have tested our SDK on your device, now you can export SDK in order to integrate it into your projects.
- Choose
scheme > SDKTest\_release, choose to run on device. Then libMGFacepp-0.3.4.a will be generated, which is the compiled Objective-C SDK; - Navigate to the enclosing folder of libMGFacepp-0.3.4.a. All the files in this folder (including the header file, model) are the static library we exported.

- Next Step
- After compiling a static library, you can refer to Deploy a Demo for how to use this SDK to build a simple app with face detection features.