FAQ
Q1:Run error: "SDK initialization failed"?
Check:
- The license file contains your current APP bundleID;
- All SDK resource have been exported to your current APP project;
- The phone time has been set to invalid time;
- The license name read in DFLivenessController is the same to the DFLicense file name.
NSString *licPath = [[NSBundle mainBundle] pathForResource:@"DFLicense" ofType:@""];
Q2:Compile error: "Undefined symbols for architecture arm64: "std::nothrow", referenced from:"?
Check:
- All SDK resource have been exported to your current APP project;
- "-lstdc++" has been added to Xcode–>Targets–>Build Setting–>Linking–>Other Linker Flags.
Q3:What will be returned when silent liveness detecting successfully?
You can get returned paramters in the following delegate methonds when using DFLivenessController:
- (void)livenessDidSuccessfulGetData:(NSData *)encryTarData
dfImages:(NSArray *)arrDFImage
successScore:(float)successScore;
- (void)livenessDidSuccessfulGetData:(NSData *)encryTarData
dfImages:(NSArray *)arrDFImage
successScore:(float)successScore
isHack:(BOOL)isHack;
encryTarData: protobuf data,arrDFImage: images, isHack: is hack or not when set autoAntiHack to YES, successScore has been deprecated.
Q4:How to upload protobuf data for antiHack and how to configure api_id、api_secret?
You can get protobuf data in the following methods when you set autoAntiHack to NO:
- (void)livenessDidSuccessfulGetData:(NSData *)encryTarData
dfImages:(NSArray *)arrDFImage
successScore:(float)successScore;
Call server api to upload protobuf data(encryTarData) and put protobuf data to request body, set api_id、api_secret to request header field. You can get antiHack score when request successfully and is hack when the result score is bigger than the default threshold(0.98).