iOS SDK
The Unbxd SDK implements support for making network calls to the Unbxd platform and lets you easily configure and integrate Unbxd Site Search in your eCommerce application.
Features
The following features are currently supported with Unbxd SDK.
Features | Description |
---|---|
Analytics | Allows you to track various visitor events on the eCommerce store such as product clicks, add to cart, orders, etc. |
Unbxd Commerce Search | Allows you to interact with the Unbxd platform and implement all search related functionality with ease. |
Autosuggest | For autocompletion of search queries and showcasing products relevant to query as you type. |
Browse | Allows you to interact with the Unbxd platform and implement all category related functionality with ease. You can customize the experience on various pages – Category, Brand, or any other attribute by leveraging various built-in features of Browse. |
Recommendations | Allows you to integrate the Unbxd recommendations widgets that showcase personalized product suggestions to visitors on every page of your eCommerce store. |
Unbxd SDK for iOS
The Unbxd SDK implements support for making network calls to the Unbxd platform and lets you easily configure and integrate Unbxd Site Search in your eCommerce application.
Features
The following features are currently supported with Unbxd SDK.
Features | Description |
---|---|
Analytics | Allows you to track various visitor events on the eCommerce store such as product clicks, add to cart, orders, etc. |
Unbxd Commerce Search | Allows you to interact with the Unbxd platform and implement all search related functionality with ease. |
Autosuggest | For autocompletion of search queries and showcasing products relevant to query as you type. |
Browse | Allows you to interact with the Unbxd platform and implement all category related functionality with ease. You can customize the experience on various pages – Category, Brand, or any other attribute by leveraging various built-in features of Browse. |
Recommendations | Allows you to integrate the Unbxd recommendations widgets that showcase personalized product suggestions to visitors on every page of your eCommerce store. |
Prerequisites
Before you get started with the integration, you need to:
- Get your Site Key: Set up your Unbxd account and obtain an API key, Site key. These keys are generated at the time of account creation and can be accessed within Console at Manage > Configure Site > Keys.
- Upload your Product catalog: A product catalog contains product-specific information for products in your inventory, like, title, price, category, color, description, availability, etc. Unbxd product discovery algorithms rely on the products and their fields within your feed data. You need to upload your catalog as a single JSON file.
For more information on product feed, see here.
Dependencies
- Alamofire 5.1.3 or above – Alamofire is a Swift-based HTTP networking library for iOS and Mac OS X.
- CocoaLumberjack 3.4.1 or above – Logging framework.
Supported Platforms
Unbxd SDK is a dynamic framework programmed using Swift 4. This can be integrated with iOS applications with version 9.0 and above. The Framework is compatible with both Swift and Objective-C.
Installation
Cocoapods is an application level dependency manager for Cocoa projects. It provides a standard format for managing external libraries. You can install it with the command below:
$ gem install cocoa pods
To integrate UnbxdSDK into your Xcode project using Cocoapods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/unbxd/iOS-SDK-Pod.git'
platform :ios, '10.0'
target 'demo-unbxd' do
use_frameworks!
pod 'Unbxd'
end
Run the command below:
$ pod install
Initialization
To begin, you will need to initialize the client. Import UnbxdSDK framework as below:
import Unbxd
UnbxdSDK is initialized with an API key and Site key.
let client = Client(siteKey: "<SITE-KEY>", apiKey: "<API-KEY>", logsConfig: LogsConfig)
LogsConfig – Used to configure log level and provide folder path where log file to be saved. Example:
let logsFolderPath = "\(NSHomeDirectory())/Documents"
LogsConfig(logLevel: .verbose, folderPath: logsFolderPath)
All the SDK methods are invoked on a shared instance of UbClient
.
IMPORTANT: We advise you to use your API Key in encrypted form on your frontend and never share it with anyone.
Updated 19 days ago