SmartBeat

Includes:
<Foundation/Foundation.h>
<UIKit/UIKit.h>

Introduction

The SmartBeat API provides an initilization interface and configuration interface. Use these APIs to enable SmartBeat functionality. Please be sure to include the following frameworks in your project to use SmartBeat.

  • SystemConfiguration.framework

  • CoreTelephony.framework

  • CoreGraphics.framework

  • OpenGLES.framework

  • libz.tbd



Classes

SmartBeat

SmartBeat object

SmartBeatConfig

Configuration to initialize SmartBeat



Functions

SBLog

Puts a log message in the SmartBeat SDK.

SBLogv

Puts a log message in the SmartBeat SDK. (takes va_list)


SBLog


Puts a log message in the SmartBeat SDK.

void SBLog(
    NSString *format,
    ...);  
Parameters
format

A log format like printf

...

Log arguments

Discussion

If enableNSLog is called, logs by this function are ignored and logs by NSLog() are used instead. However, logs by this function are always used on iOS 10 and above.

If you want to use this function instead of NSLog(), it is usefull to define the following macro in your application's Prefix.pch.

#define NSLog(...) (NSLog(__VA_ARGS__), SBLog(__VA_ARGS__))

Swift can not treatment C style variable length arguments, so please use SBLogv.


SBLogv


Puts a log message in the SmartBeat SDK. (takes va_list)

void SBLogv(
    NSString *format,
    va_list args);  
Parameters
format

A log format like printf

args

Log arguments

Discussion

If enableNSLog is called, logs by this function are ignored and logs by NSLog() are used instead. However, logs by this function are always used on iOS 10 and above.

In Swift, please use with getVaList() as below.

SBLogv("String: %@, Integer: %d", getVaList(["text", 1]))