Configure the iOS SDK for v2.16.0 or later
Note: versions of MobbScan prior to v2.16.0 are no longer maintained, but can still be installed following these steps. If you do not have v2.16.0, please contact your Mobbeel representative and they will send it to you.
Installation steps
The steps to include the SDK as of v2.16.0 are:
1) Add the xcframeworks, bundle and files included in the SDK distribution folder to your project.
You can just drag and drop the libs folder in the SDK to your project.
Note: Please note that if you add the whole libs folder all frameworks will be included. It is better if you add the basic frameworks and you add the rest once you need them. The basic frameworks you'll need, along with MobbScanSDK-iOS.bundle are:
Please note that every MobbScan xcframework, except for the third party ones, are now dynamic frameworks, so they must be included checking the Embed & Sign option.
Note: There are optional features in the SDK that will require additional configuration, such as liveness face validation, among others. Each feature will explain what it needs to be configured in the Getting Started section.
2) Add the required frameworks and libraries to your target application on the Link Frameworks and Libraries section
The required frameworks and libraries are:
libc++.tbd
libiconv.dylib
AssetsLibrary.framework
AudioToolbox.framework
AVFoundation.framework
CoreMedia.framework
CoreMotion.framework
Once everything is configured you should have something like this:
-ObjC -lsqlite3
flags to “Other Linker Flags” in the Build Settings.
3) Add If you follow these steps you should be able to import the #import <MobbScanSDK-iOS/MobbScanSDK-iOS.h>
header in your files.
Info.plist
file.
4) Add the required literals to your MobbScan SDK needs to access your camera and your gallery for document detection, so you need to give your aplicacion access to those resorces. In order to do so, you need to add the followingliterals to your Info.plist
file:
<key>NSPhotoLibraryUsageDescription</key>
<string>Used to scan documents</string>
<key>NSCameraUsageDescription</key>
<string>Used to scan documents</string>
Troubleshooting
Legacy Build System
Since xcframework is a new type of iOS artefact, it must be built on New build system instead of Legacy Build System. You can change this option on File -> Project/Workspace Settings:
Framework cannot be found
Sometimes, when you add the framework to the project, the source folder of the framework itself is not added correctly to the project's configuration. Please make sure that the folder is added to the Framework Search Paths in the Build Settings of the project.
App Store distribution
Note: As of MobbScan v2.18.4 you can skip this step as it is no longer needed.
Although the problem that the App Store has with simulator architectures is avoided with the xcframework, the third-party frameworks that are included in the SDK zip contain the binaries for the supported simulators. Before distributing your app to the App Store, you must strip those simulator binaries from the frameworks.
Please, take a look at the App Store distribution section in order to learn how to do this.
SDK Example
An example application is included in the SDK. You can find it under the sample
folder of the SDK.
The example app simply scans a Spanish identity document and then shows all the results on screen.