In this guide, you will learn how to get started with the Genius Scan SDK for iOS.
The SDK for iOS is composed of a single iOS framework GSSDK. The framework exposes different levels of abstractions depending on the path you choose to integrate the Genius Scan SDK in your app.
You can choose to use the higher-level Scan Flow which abstracts away a lof of complexity and is the fastest integration. Alternatively, you can integrate individual UI components and call image processing routines to have more control on your user experience. These two different paths of integration are described in more details in the simple and the custom integration guides.
We provide two iOS demo projects as part of the SDK:
The SDK framework file used during development may seem large, but it includes slices for all device architectures (arm64, x86_64) and debug symbols. Deployed on your user’s devices, the impact is much smaller.
We provide here the approximate impact of the SDK on your app’s size. The download size is the increase in size of your app when downloaded by your users. The installed size represents the size of the SDK once installed on the user’s device.
Because the Genius Scan SDK is provided as dynamic frameworks placed in your app’s bundle, the App Store’s delta updates logic will skip downloading them if you update your app without updating the Genius Scan SDK.
Drag and drop
GSSDK.xcframework into the Frameworks, Libraries and Embedded Content of your app’s target.
In your Xcode project, under Package Dependencies, add a new dependency on the Genius Scan SDK
https://github.com/thegrizzlylabs/geniusscan-sdk-spm and select the
If you already use CocoaPods, you can use the Genius Scan SDK as a Pod. Just add the following line to your existing Podfile (Make sure you specify the correct SDK location)
pod 'GSSDK', :podspec => 'https://s3.amazonaws.com/tgl.geniusscan.sdk/GSSDK-5.0.0-beta6.podspec'
The Genius Scan SDK is subject to a commercial license: a license key is needed to initialize the SDK. The key must match your application identifier (aka. bundle ID) and the license’s expiration date. Please contact us if you don’t have a license key yet.
The SDK can run without a license key but will stop working after 60 seconds.
You initialize the SDK with your license key as follow:
GSK.setLicenseKey("<YOUR LICENSE KEY>")
By default, the SDK will use the license key set in code to refresh your license, ensuring your users always benefit from the SDK features. For additional reliability, we still recommend to update the license key in the code when your license is renewed.
You can turn off auto-refreshing by using the
GSK.setLicenseKey("<YOUR LICENSE KEY>", autoRefresh: false)
When your license key renews, you will take care of updating it in the app, either by releasing an update with the new license key, or building your own remote refresh logic.
Your app is going to need the user’s permission to access the camera. You need to specify the reason for requesting this permission as part of the
NSCameraUsageDescription in the
Once you have done this, you’re ready to start your actual implementation. The next steps will depend whether you chose the simple integration, using the ScanFlow module, or if you are going for a custom integration.