Usage Examples


  1. For instantiating the TimelineSDK, accessToken and cameraId is the required parameters, while all other parameters are optional
  2. The default value for isTimelineControlsVisible and isVerticalRecordingsVisible is true, which means by default the vertical recording bar and the bottom tab bar will be visible. We can hide it by setting these bool values as false.
  3. The TimelineSDK provides 3 levels of zoom from 0 to 2. 0 is the lowest zoom level that means No zoom and 2 is the maximum zoom level.
  4. In the most zoomed-in state, there will be three dots icon visible for each event. Users will be able to Download and Share through the three-dot menu.
  5. User can set the Primary and Secondary color in Hex string form. Eg: "#0c94c8" By default it will show the camera manager’s primary and secondary color i.e. primaryColor = @"#0c94c8" and secondaryColor = @"#333333".
  6. The SDK supports localizations, it will select the device language. The default language is English.
  7. The SDK supports Poppins and Default (Roboto) font. User can set the font while instantiating the SDK by settings customFont parameter. Eg: timelineObj.customFont = poppinsFont.
  8. The SDK supports hiding specific event types. Eg: timelineObj.hideEventTypes = @"vmdDetected,pirDetected"
    Camera name can be hidden. Eg: timelineObj.isCameraNameVisible = NO;


#import <CMMobileTimelineSDK/CMMobileTimelineSDK.h>
@property (nonatomic, strong) CMMobileTimelineSDK *timeline;
_timeline = [_timelineObj initWithAccessToken:ACCESS_TOKEN cameraId:CAMERA_ID time:0 viewController:self];
_timeline.isTimelineControlsVisible = false;
_timeline.isVerticalRecordingsVisible = false;
_timeline.primaryColor = @"#0c94c8";
_timeline.secondaryColor = @"#333333";
_timeline.customFont = poppinsFont;
_timeline.zoomLevel = 1;
_timeline.hideEventTypes = @"vmdDetected,pirDetected";
_timeline.isCameraNameVisible = NO;
[_timeline present];
import CMMobileTimelineSDK
var timeline = CMMobileTimelineSDK(accessToken: ACCESS_TOKEN, cameraId: CAMERA_ID, time: 0, viewController: self)
timeline.isTimelineControlsVisible = false
timeline.isVerticalRecordingsVisible = false
timeline.primaryColor = @"#0c94c8"
timeline.secondaryColor = @"#333333"
timeline.customFont = poppinsFont
timeline.zoomLevel = 1
timeline.hideEventTypes = "vmdDetected,pirDetected"
timeline.isCameraNameVisible = false
ParameterData TypeDescriptionIs Required
accessTokenStringAccess Token required to passed for Authentication/authorizationtrue
cameraIdIntCamera Id to identify Cameratrue
startTimeDateStart time for laoding events and recordings.Default value : Most recent date and time.
primaryColorStringTakes hex value of color as string.Eg:timelineObj.primaryColor = "#0c94c8";
secondaryColor StringTakes hex value of color as string.Eg:timelineObj.secondaryColor = "#333333";
customFontFontType (enum)Allows user to select default or poppins font. The dafault font is Roboto.Available font types:poppinsFont, defaultFontEg:timelineObj.customFont = poppinsFont;Default Font value: defaultFont
isTimelineControlsVisibleBoolSet True/False to Show/Hide the bottom tab bar control on timeline screen.Eg: timelineObj.isTimelineControlsVisible = true;Default value: True
isVerticalRecordingsVisibleBoolSet True/False to Show/Hide the vertical timeline recordings.Eg:timelineObj.isVerticalRecordingsVisible = false;Default value: True
zoomLevelIntSet the value from 0 to 2 to set the Zoom level, where 0 is No-zoom and 2 is the highest zoom level.Default value: 0 (No zoom)
albumNameStringTo specify the album name for saving the Snapshots and downloaded events.Default album name is: Timeline
hideEventTypesStringString of event types to hide (comma-separated).Eg: timelineObject.hideEventTypes = "vmdDetected,pirDetected" 
isCameraNameVisibleBoolAllows the user to hide Camera name.Default value: True 

Initialize the SDK

// Initialize timeline with the given parameters
// accessToken: Access token
// time: Timestamp of the time to show as selected time, default is current date & time - 0
// viewController: the viewController on the timeline is going to be presented
var timelineObj = CMMobileTimelineSDK(accessToken: "123-1234-2345", cameraId: 23443, time: 0, viewController: vc)
// Set zoom level
// available zoom levels are 0, 1, 2. Default=0
timelineObj.zoomLevel = 2
// Show or hide timeline controls (bottom bar)
timelineObj.isTimelineControlsVisible = false
// Show or hide vertical recordings line
timelineObj.isVerticalRecordingsVisible = false
// Set the primary color 
timelineObj.primaryColor = "#000000"
// Set the secondary color 
timelineObj.secondaryColor = "#FFFFFF"
// Set custom font
// Roboto: defaultFont
// Poppins: poppinsFont
timelineObj.customFont = poppinsFont
// Hide specific event types
timelineObj.hideEventTypes = @"vmdDetected,pirDetected"
// Hide camera name
timelineObj.isCameraNameVisible = false
// Present the timeline on the provided ViewController


Set initialization parameter accessToken.

accessToken = ``"123-1234-2345"

Select Camera

Set initialization parameter cameraId.

cameraId = ``123455

Set Date-Time

Set initialization parameter time with seconds. - timestamp.

time = ``0 or ``1610368200 (in seconds)

Set Zoom Level

Available zoom levels are 0,1,2. Default = 0

timelineObj.zoomLevel = ``2

Set Colors

The default colors are primaryColor = "#0c94c8" and secondaryColor = "#333333"

// Set the primary color
timelineObj.primaryColor = "#000000"
// Set the secondary color
timelineObj.secondaryColor = "#FFFFFF"

Set Font Family

Available font families are Roboto and Poppins.

// Roboto: defaultFont
// Poppins: poppinsFont
timelineObj.customFont = poppinsFont

Hide Bottom Tab Bar GUI Component

timelineObj.isTimelineControlsVisible = ``false

Hide Vertical Recording Line GUI Component

timelineObj.isVerticalRecordingsVisible = ``false

Hide Specific Event Types

timelineObj.hideEvenTypes = ``"vmdDetected,pirDetected"

Hide Camera Name

timelineObj.isCameraNameVisible = ``false


Device language will be set by the SDK. Supported languages are English, Dutch, German, Spanish, Turkish. For unsupported language, the default language is English.