All Projects β†’ Countly β†’ countly-sdk-cpp

Countly / countly-sdk-cpp

Licence: MIT license
Countly C++ SDK for Windows, MacOS and Linux

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to countly-sdk-cpp

dotfiles
my dotfiles
Stars: ✭ 12 (-55.56%)
Mutual labels:  mac
gifbar
πŸ¦„ Find Awesome Gif's right in your Menu Bar
Stars: ✭ 37 (+37.04%)
Mutual labels:  mac
dotfiles
Zero friction mac and linux bootstrap
Stars: ✭ 15 (-44.44%)
Mutual labels:  mac
react-device-frameset
React device frameset component
Stars: ✭ 30 (+11.11%)
Mutual labels:  mac
NDILiteSenderPlugin
NDIβ„’ send-only plugin for Unity macOS/iOS
Stars: ✭ 49 (+81.48%)
Mutual labels:  mac
support-dashboard-desktop
A Mac, Windows, Linux, and Chrome dashboard encompassing the services and support tools I use to manage Klinker Apps.
Stars: ✭ 35 (+29.63%)
Mutual labels:  mac
sixarm mac setup
SixArm.com Β» Mac Β» Setup notes for new Mac computer and macOS
Stars: ✭ 57 (+111.11%)
Mutual labels:  mac
dotfiles
πŸ”¨ My dotfiles for setting up my Macs with Ansible
Stars: ✭ 31 (+14.81%)
Mutual labels:  mac
homebrew-srm
Homebrew tap for srm since Apple and Homebrew decided nobody had mechanical disks anymore.
Stars: ✭ 14 (-48.15%)
Mutual labels:  mac
blade runner
Blade Runner is a Jamf Pro based Python application that automates and implements a framework to offboard, secure erase and document deprecated Mac systems.
Stars: ✭ 24 (-11.11%)
Mutual labels:  mac
SevenZip
ObjC wrapper around the 7zip/LZMA SDK
Stars: ✭ 34 (+25.93%)
Mutual labels:  mac
vlc-protocol
Open vlc:// links directly from your web browser.
Stars: ✭ 143 (+429.63%)
Mutual labels:  mac
sepia-assist-server
Core server of the SEPIA Framework responsible for NLU, conversation, smart-service integration, user-accounts and more.
Stars: ✭ 81 (+200%)
Mutual labels:  mac
cleanup manager
Cleanup Manager helps you clean up folders on your Mac's hard drive.
Stars: ✭ 22 (-18.52%)
Mutual labels:  mac
Linux Dynamic Wallpapers
Dynamic Wallpapers for Linux
Stars: ✭ 305 (+1029.63%)
Mutual labels:  mac
podman-macos
πŸ“¦ Podman frontend for macOS
Stars: ✭ 576 (+2033.33%)
Mutual labels:  mac
time-travel
An rsync based backup script which only transfers modified files. Smooth integration into OSX Notification Center.
Stars: ✭ 43 (+59.26%)
Mutual labels:  mac
mute-spotify-ads-mac-osx
Mute Mac (osx) computer audio when Spotify plays an AD
Stars: ✭ 78 (+188.89%)
Mutual labels:  mac
x-ray
See the wifi password of the network you're on
Stars: ✭ 13 (-51.85%)
Mutual labels:  mac
WebDGap
WebDGap allows you to convert any website or HTML/CSS/JavaScript web application to a native Windows, Mac, Linux, PhoneGap, and Chrome application/extension.
Stars: ✭ 106 (+292.59%)
Mutual labels:  mac

Countly C++ SDK

travis build status

This repository contains the portable Countly C++ SDK.

What's Countly?

Countly is an innovative, real-time, open source mobile analytics and push notifications platform. It collects data from mobile devices, and visualizes this information to analyze mobile application usage and end-user behavior. There are two parts of Countly: the server that collects and analyzes data, and mobile SDK that sends this data. Both parts are open source with different licensing terms.

About

This repository includes the Countly C++ SDK.

Need help? See Countly SDK for C++ documentation at Countly Resources, or ask us on our Countly Analytics Community Slack channel.

Security

Security is very important to us. If you discover any issue regarding security, please disclose the information responsibly by sending an email to [email protected] and not by creating a GitHub issue.

Dependencies and building

Countly C++ SDK has been designed to work with very few dependencies in order to be available on most platforms. In order to build this SDK, you need:

  • a C++ compiler with C++14 support
  • libcurl (with openssl) and its headers if you are on *nix
  • cmake >= 3.13

First, clone the repository with its submodules:

git clone --recursive https://github.com/Countly/countly-sdk-cpp

If you want to use SQLite to store session data persistently, build sqlite:

# assuming we are on project root
cd vendor/sqlite
cmake -D BUILD_SHARED_LIBS=1 -B build . # out of source build, we don't like clutter :)
# we define `BUILD_SHARED_LIBS` because sqlite's cmake file compiles statically by default for some reason
cd build
make # you might want to add something like -j8 to parallelize the build process

The cmake build flow is pretty straightforward:

# assuming we are on project root again
ccmake -B build . # this will launch a TUI, configure the build as you see fit
cd build
make

Usage

Typical use is:

#include "countly.hpp"
using namespace cly;

int main(int argc, char *argv[]) {
	Countly& ct = Countly::getInstance();
	// OS, OS_version, device, resolution, carrier, app_version);
	ct.SetMetrics("Windows 10", "10.22", "Mac", "800x600", "Carrier", "1.0");
	ct.SetCustomUserDetails({{"Account Type", "Basic"}, {"Employer", "Company4"}});
	// Server and port
	ct.Start("abf2034f975393fa994d1cf8adf9a93e4a29ac29", "https://myserver.com", 403);
	ct.SetMaxEventsPerMessage(40);
	ct.SetMinUpdatePeriod(2000);

	ct.RecordEvent("MyCustomEvent", 123);
	ct.RecordEvent("MyCustomEvent", 17);
	ct.RecordEvent("MyCustomEvent", 34);
	ct.RecordEvent("AnotherCustomEvent", 644, 13.3);

	// Your program is supposed to do something..

	return 0;
}

Testing

Build with the option COUNTLY_BUILD_TESTS on to build an executable that will run the tests:

cmake -D COUNTLY_BUILD_TESTS=1 -B build . # or do it interactively with ccmake
cd build
make
./countly-tests

To run unit tests associated with 'SQLITE' and 'Custom SHA-256' build executable with the options COUNTLY_USE_SQLITE and COUNTLY_BUILD_TESTS:

cmake -DCOUNTLY_BUILD_TESTS=1 -DCOUNTLY_USE_SQLITE=1 -DCOUNTLY_USE_CUSTOM_SHA256=1 -B build

Other Github resources

This SDK needs one of the following Countly Editions to work:

For more information about Countly Enterprise Edition, see comparison of different Countly editions

There are also other Countly SDK repositories (both official and community supported) on Countly resources.

How can I help you with your efforts?

Glad you asked. We need ideas, feedback and constructive comments. All your suggestions will be taken care with utmost importance. We are on Twitter and Facebook if you would like to keep up with our fast progress!

Badges

If you like Countly, why not use one of our badges and give a link back to us, so others know about this wonderful platform?

Countly - Product Analytics

<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/dark.svg" alt="Countly - Product Analytics" /></a>

Countly - Product Analytics

<a href="https://count.ly/f/badge" rel="nofollow"><img style="width:145px;height:60px" src="https://count.ly/badges/light.svg" alt="Countly - Product Analytics" /></a>

Support

For Community support, visit http://community.count.ly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].