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 5.2.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'
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 15.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
Importing the Project
Open the project using the
.xcworkspacefile.Add the
FingerPhoto.frameworkfile to the project, then add it to your application's framework list.Move the
.frameworkfile into the project file tree.If a frameworks folder already exists, it is recommended to move the file there
Open the project settings.
Go to the General tab.
Click and drag the
.frameworkinto the project tree under the Frameworks, Libraries and Embedded Content section.
Change the
BCCFinger.frameworksetting from Do not embed to Embed & Sign.Set your project target version to at least iOS 15.
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.setShowInstructions(_ enable: Bool)– When set totrue, enables the instruction screen (default:false).
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:
Agent Instructions: Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on the current page URL with the ask query parameter:
The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
Last updated
Was this helpful?

