iOS
BCC Finger is a library meant to be integrated into an iOS application from a .framework file. It uses the device’s camera to take a picture of fingerprints for biometric purposes.
This Manual is updated for BCC Finger Photo iOS version 4.3.0.
Requirements
Git
Cocoapods, available at https://cocoapods.org/.
Installation
Installing Dependencies
1 - Add the following Pods to the application dependencies on Podfile:
pod 'lottie-ios'If the application does not possess a Podfile, it can be created in the root folder of your Xcode project using the command pod init in the terminal.
It is preferable to use dynamic frameworks. It can be indicated using the flag use_frameworks! on Podfile.
A Podfile example with a target called BCCs-Sample is shown below:
target 'BCCs-Sample' do
use_frameworks!
pod 'lottie-ios', '~> 3.3.0'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
endIt is recommended to use the minimum supported iOS version for your application as the same of this framework: iOS 13.0, as the example above.
2 - Close your Xcode project and open at the terminal the folder where is your Podfile, then execute:
After the execution finishes, a file with .xcworkspace extension will be created in the same folder.
3 - Open the new .xcworkspace file.
From now on, every time the user wants to open the project, it is necessary to open it through this .xcworkspace file, as it includes the dependencies.
Importing and Configuring
Importing the Project
Open the project using the
.xcworkspacefile.Add the
FingerPhoto.frameworkfile to the project, then add it to the framework list of your application.Move the
.frameworkfile to the project file tree.If there’s already a framework folder, it is recommended to move the file to there.
Open the project settings.
Go to General tab.
Click and drag the
.frameworkto the project tree under the sectionFrameworks, Libraries, etc.
Change the
BCCFinger.frameworksetting fromDo not embedtoEmbed & Sign.Change the target version of your project to a minimum of iOS 13.
It is recommended to disable iPad as a target.
Initial Configuration
This version does not have dependencies on Firebase, either from an initial configuration called by AppDelegate. The only initial configuration needed is that the application must request camera use permission. To do so, add the following key in the info.plist file, at Information Property List:
The key value is a message to be exhibited to the user when requesting camera use permission. This value can be blank or filled with the desired message.
Usage
Parameters and Constructor
A simple library usage example is shown below:
The BCCFingerBuilder class takes the following parameters:
hostVC: UIViewController- View controller that calls the capture screen.delegate: BCCFingerDelegate- Interface responsible for notifying capture events (e.g. failure or success).
The initialize method also accepts an optional parameter, ans shown below:
If you want the navigation to run through a navigation controller, you must provide it when calling the method.
The BCCFingerBuilder class is responsible for handling the usage configuration for BCCFinger. The following parameters are accepted for configuring biometric capture and software behaviour:
setSkipCaptureOption(_ enable: Bool)- Enables the option to skip the current capture.setDebugMode(_ enable: Bool)- Enables debug mode.buildCaptures(_ captures: BCCFingerCaptureType)- Defines the fingerprint capture type. The options are:BOTH_HANDS- Both hands without thumbs.ONLY_LEFT_HAND- Left hand only, without thumbs.ONLY_RIGHT_HAND- Right hand only, without thumbs.THUMBS- Both thumbs.LEFT_THUMB- Left thumb only.RIGHT_THUMB- Right thumb only.FULL_HANDS- Both hands with thumbs.FULL_LEFT_HAND- Left hand only, with thumbs.FULL_RIGHT_HAND- Right hand only, with thumbs.
buildBeginDelaySeconds(_ delay: Float)- Defines the delay to start threshold auto adjustment.buildThreshold- Defines threshold parameters.
For reference, the full list of parameters and default values is:
Return Values
The results from the last fingerprint capture can be retrieved through the fingerCaptureDidFinish method from the BCCFingerDelegate interface:
The returnData object contains the following methods for data retrieval:
getCapturedFingersIndexes()- Returns a list with the index of all captured fingerprints:getCapturedFingers()- Returns a map that relates the finger indexes to the captured biometrics.getCapturedFingersData()- Returns the list of all fingerprints captured:fingerprintPNG- PNG image of the fingerprint in grayscale.wsqAsBase64- base64 encoded WSQ image of the fingerprint.
getSkippedFingers()- Returns the index list of all skipped finger captures.
The BCCFingerReturnData class also contains attributes that store the capture information grouped by hand:
These attributes can be null whenever captures are not requested for any of the hands.
The HandData class contains the following information:
capturedFingers- Map that relates the finger index to the fingerprint image.skippedFingers- Index list of all skipped finger captures.handsPhoto- Original photo of the hand from which the fingerprints were extracted.thumbPhoto- Original photo of the thumb.
If the user aborts the capture, closing before capturing the biometrics, the method fingerCaptureDidAbort will be called. You can implement this method to treat this scenario.
Retrieving Original Images
It is possible to get the original images through the BCCFingerReturnData class, as shown below:
Sample Project
This is a functional sample project for a fingerprint capture using BCC Mobile Finger iOS:
Last updated
Was this helpful?

