Skip to content

[EN] Get Started

gujiayang edited this page Feb 26, 2017 · 3 revisions
  1. Download Project SDK source code

git clone https://github.com/FacePlusPlus/MegviiFacepp-iOS-SDK.git

Note: if you are not using the latest version, please find corresponding version in tags.

  1. 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.

  1. Import Static Library

  • Open MegviiFacepp-iOS-SDK/MGFacepp.xcworkspace project file;
  • Unzip the SDK downloaded from Face++ website, copy libMegviiFacepp-0.3.4.a and megviifacepp_0_3_4_model (we use SDK version 0.3.4 here as an example) to MegviiFacepp-iOS-SDK/MGFacepp/MegviiFacepp_C_SDK/;
  • Copy all the files in MegviiFacepp-iOS-SDK/MGFacepp/MegviiFacepp_C_SDK/ to MGFacepp project;
  • Set project files, choose TARGETS > MGFacepp > Build Phases > Copy bundle, add megviifacepp_0_3_4_model, and then in MGFacepp > Build Setting, search for Current Project Version, change it as the SDK version (such as 0.3.4);

Face++ configure

Face++ configure

  • Open MGFaceppCommon.h, change the value of KMGFACEMODELNAME as the name of the model;

Face++ configure

  • Choose MGFaceppSDKTest project (this project is a simple test demo)> MGFaceppSDKTest > General > Linked Frameworks Libraries, add libMGFacepp-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);

Face++ configure

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

SDKTest run

  • 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)
  1. 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.

Face++ export library

  1. 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.

Clone this wiki locally