Installation guide
To add the MindBehind.framework library to your XCode project, follow the steps below to install the framework using CocoaPods
- First, install CocoaPods if it isn't already
gem install cocoapods
- Copy the
MindBehind.framework
andMindBehind.podspec
files somewhere in your project directory, for example invendor/MindBehind
- Add the MindBehind dependency to your Podfile, using a local
path
that points to the directory in step 2
target 'YourApp' do
pod 'MindBehind', :path => 'vendor/MindBehind'
end
- Install the pod
pod install
- Open the generated
.xcworkspace
file and add the following keys to your app's Info.plist file (replacing the values if desired):
<key>NSPhotoLibraryUsageDescription</key>
<string>${PRODUCT_NAME} will read your photo library to gather additional information</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>${PRODUCT_NAME} will write to your photo library to gather additional information</string>
<key>NSCameraUsageDescription</key>
<string>${PRODUCT_NAME} will use your camera to gather additional information</string>
- Start using the framework in your code.
Objective-C:
#import <MindBehind/MindBehind.h>
[MindBehind initWithSettings:[MBCSettings settingsWithIntegrationId:@"YOUR_INTEGRATION_ID"] completionHandler:^(NSError * _Nullable error, NSDictionary * _Nullable userInfo) {
// Your code after init is complete
}];
Swift:
MindBehind.initWith(MBCSettings(integrationId: "YOUR_INTEGRATION_ID")) { (error: Error?, userInfo: [AnyHashable : Any]?) in
// Your code after init is complete
}