Cognex Mobile Barcode SDK Knowledge Base

Using cmbSDK in XCode

https://cmbdn.cognex.com/v2.7.x/knowledge/-cognex-mobile-barcode-sdk-for-ios/using-cmbsdk/using-cmbsdk-in-xcode

...Set up your application to use the iOS cmbSDK:Open XCode and start a new project.Add the following liOS cmbSDK:Open XCode and start a new project.Add the following lib and frameworks to your project:* Sy...

Getting Started

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.ios/getting-started

...Open Visual Studio and follow this steps:1. Go to File -> New -> Project.2. Select iOS App (Xamarin)iOS App (Xamarin) , set project name and from templates select Blank AppAfter creating a blank applicat...

Getting Started

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/getting-started

...te Mobile App(Xamarin.Forms) , set project name, from templates select Blank and choose Android and iOS platform.Next right click on your Android platform specific project file, then click Properties and...

Introduction

https://cmbdn.cognex.com/v2.7.x/knowledge/cordova-plugin-for-cmbsdk/introduction

...at can be found in the www folder of your Cordova app.Supports the two major platforms: Android and iOS. All features on both platforms are tailored to work the same from a user/developer point of view. ...

Integrating cmbSDK React-Native Module

https://cmbdn.cognex.com/v2.7.x/knowledge/react-nat/integrating-cmbsdk-react-native-module

...Make sure you have downloaded the cmbSDK React-Native zip archive from our download page.For iOS friOS from the downloaded zip file, open the iOS directory.1.1 If you are using the mobile device's bui...

Reference cmbSDK

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.ios/reference-cmbsdk

...nLibrary.dll and than install the nuget package.If you plan to use your application on devices with iOS lower than 12.2 extra steps are required:Add Swift dylib dependencies for runtime support. Starting...

Reference cmbSDK

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/reference-cmbsdk

...er is now included in the nuget package as well.If you plan to use your application on devices with iOS lower than 12.2 extra steps are required:Add Swift dylib dependencies for runtime support. Starting...

Installation

https://cmbdn.cognex.com/v2.7.x/knowledge/cordova-plugin-for-cmbsdk/installation

...or example: /Users/superUser/cmb-cordova-master cordova platform add android //cordova platform add ios //if you want to build on iosFor an Ionic solution:#install ionic sudo npm install -g cordova ionic...

Getting your MX Mobile Terminal Enabled App into the App Store

https://cmbdn.cognex.com/v2.7.x/knowledge/-cognex-mobile-barcode-sdk-for-ios/getting-your-mx-mobile-terminal-enabled-app-into-the-app-store

... added Apple will reject the app.Submit a request on https://cmbdn.cognex.com/mfi/apply for each iOS app you want to publish to the App Store. You can create MFi request in advance when app name and ...

Licensing the SDK

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/licensing-the-sdk

...de, ScannerPreviewOption.Defaults, true, "SDK_KEY"); }Otherwise if you have different keys (key for iOS only and key for Android only) add these keys inside AndroidManifest.xml or Info.plist files.For An...

Debugging on MX Mobile Terminal

https://cmbdn.cognex.com/v2.7.x/knowledge/-cognex-mobile-barcode-sdk-for-ios/debugging-on-mx-mobile-terminal

... application via Wi-Fi.Debugging on iPhone using XCode:Prerequisites:XCode 9 or neweriPhone running iOS 11 or newerIf you are running your application with XCode, make sure your device is plugged in via ...

Implementing SDK

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.ios/implementing-sdk

...hen an applicaiton is suspended, the connection to the scanning device is// automatically closed by iOS; thus when we are resumed (become active) we// have to restore the connection (assuming we had one)...

Implementing SDK

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/implementing-sdk

...s[0] != ScannerExceptions.NoException){// ask for Camera Permission if necessary (android only, for iOS we handle permission from SDK)if ((ScannerExceptions)args[0] == ScannerExceptions.CameraPermissionE...

Using the Camera Reader

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/using-the-camera-reader

...yed even if an aiming mode is selected (for example CameraMode == PASSIVE_AIMER).HighResolution(for iOS only)Use the device camera in higher resolution to help with scanning small barcodes, but slow deco...

Requesting Camera Permission for Phone Camera Scanner (for Android only)

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/requesting-camera-permission-for-phone-camera-scanner-for-android-only

...s[0] != ScannerExceptions.NoException){// ask for Camera Permission if necessary (android only, for iOS we handle permission from SDK)if ((ScannerExceptions)args[0] == ScannerExceptions.CameraPermissionE...

checkCameraPermission()/requestCameraPermission()

https://cmbdn.cognex.com/v2.7.x/knowledge/cordova-plugin-for-cmbsdk/api-methods/checkcamerapermissionrequestcamerapermission

...ssion is denied// If result is 1, on android means permission rationale should be shown,// while on ios means permission can be requested, otherwise the result is 0 });cmbScanner.requestCameraPermission(...

setPreviewContainerBelowStatusBar()

https://cmbdn.cognex.com/v2.7.x/knowledge/react-nat/rct-api-metho/setpreviewcontainerbelowstatusbar

...en using the device's built in camera for scanning (CMBReader.DEVICE_TYPE.Camera).Available only on iOS.Sets the camera preview partial view top axis to start below the status bar matching the Androids b...

Camera Overlay Customization

https://cmbdn.cognex.com/v2.7.x/knowledge/xamarin/xamarin.forms/camera-overlay-customization

...tainer (partial view), and use cmb_scanner_view.xml if scanning is started in full screen. Same for iOS, copy the xib files from the Resources/iOS directory into your iOS platform specific project and mo...