iOS - Migration guide

This page is intended as a guide for the process of migrating from MobileSDKv1 to MobileSDKv2.

Previously, the sniffer and wizard library were part of one framework (CameraWizard) and the streaming part of a second framework (CameraStreamer). This is not the case anymore, as there's only one framework (CMMobileSDK) which includes several classes: CameraSniffer, CameraWizard, CameraStreamer and NuboCamWizard.

The main big difference between the two SDKs is that the old version needed basic authentication for instantiating objects and used XML API calls for other requests, while the new version requires an access token to be passed with each REST API call. You should set CMAccessTokenProvider.delegate to some instance at your program which holds valid access token, MobileSDK will ask instance to provide token when it required.

To perform migration you should replace MobileSDKv1 with MobileSDKv2 (check Installation guide page for instructions).

Below you can find examples of MobileSDKv1 and MobileSDKv2 usage differences.

Please note that we covered mostly used methods; check Public API page to learn all available methods and callbacks.

We used ObjC for example however Swift can be used instead with same semantics.

CameraSniffer + CameraWizard

Init  Expand source
Start sniffing  Expand source
Stop sniffing  Expand source
Device found/error callbacks  Expand source
Add camera to platform  Expand source
Camera added/error callbacks  Expand source


Init  Expand source
Pause stream  Expand source
Resume/seek stream  Expand source
Frame received/error callbacks  Expand source