# Start Scanning with CaptureSDK

Add barcode scanning and NFC reading and writing to your app

Learn the core concepts and start scanning in your application with just a few lines of code.

## Start Scanning for FREE

Follow this step-by-step guide to seamlessly incorporate CaptureSDK into your application and start scanning today.

### 1. Register for Free

Create your free developer account on the Socket Mobile Developer Portal. Registration gives you access to SDK resources, sample applications, and the ability to generate AppKeys for your projects.

The process only takes a few minutes. Once registered, your account is activated for life and shared across your organisation.

[Create an Account](/register)

### 2. Get Your AppKey

An AppKey is required to initialize CaptureSDK in your application. You can generate and manage AppKeys from your developer account after creating an organisation and registering an app.

Each AppKey is tied to your application's bundle identifier. The AppKey is generated once and has no expiration.

> **Note:** Internet connectivity is NOT required to use CaptureSDK at runtime.

[Manage Apps](/manage-apps)

### 3. Integrate the SDK

Add the CaptureSDK package to your project using the package manager for your platform. Then initialize the SDK with your AppKey and set up the event callbacks to receive device and scan data.

Our sample applications on GitHub provide complete, working examples for each supported platform that you can use as a starting point.

[Sample Apps on GitHub](https://github.com/socketmobile)

### 4. Test Your Solution

Verify your integration by scanning barcodes and reading NFC tags with a connected Socket Mobile reader. The SDK provides detailed event logs and error codes to help troubleshoot any issues during development.

**If you're interested in testing your app with one of our hardware scanners, we provide a 25% developer discount on all our data readers.**

[See Sample Code](https://github.com/orgs/SocketMobile/repositories)

### 5. Prepare for Publishing

**For iOS Apps:**

- Before publishing your app on the App Store, **you must apply for Apple's MFi program**. We offer free assistance with the submission process.
- CaptureSDK requires permission for Bluetooth and Camera access.

**For Android and Windows applications:**

- No additional steps are required to publish your applications.

## CaptureSDK Basics

Understand the four core concepts that power every CaptureSDK integration.

### Device Connection

CaptureSDK automatically manages device discovery and connection. When initialized, the SDK connects to paired readers and dispatches device arrival events to your application. On iOS, devices connect via Bluetooth Classic through the External Accessory framework. On Android and Windows, connections are managed through the Companion Service.

### Scanning Events

The SDK uses an event-driven architecture to deliver scan data to your application. When a barcode is scanned or an NFC tag is read, the SDK triggers a decoded data event with the captured information. This works identically whether using a physical scanner, NFC reader, or SocketCam camera scanning.

### Decoded Data

Scan results include the decoded string data, the raw byte data, and the symbology type (e.g., UPC-A, QR Code, Code 128). The unified data format ensures consistent handling regardless of the input device, making it easy to process barcodes and NFC data uniformly.

### Error Handling

CaptureSDK provides comprehensive error reporting through result codes. Each operation returns a result indicating success or a specific error condition. Common errors include device not found, invalid AppKey, connection timeout, and Bluetooth permission issues.
