Sample iOS projects to demonstrate how to use Countly SDKs. For Android sample, check Android repository and documentation.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
countly-sdk-ios @ 8a1a7de
ios-swift
ios
macos
tvos
watchos
.gitignore
.gitmodules
LICENSE.md
README.md
build_test.sh

README.md

Countly sample test application

This repository includes sample iOS, iOS-Swift, watchOS, tvOS and macOS projects to demonstrate how to use Countly iOS SDK. It can be used to:

  • Send a sample push notification
  • Generate events with values and segmentations with count, sum, duration
  • Send a sample user profile
  • Send a custom user property
  • Send a view (automatic or manual)
  • Generate a crash (e.g out of bounds, null pointer, kill, etc or a custom crash log)

iOS-sample-app

Countly iOS SDK is added as a git submodule. Hence, you should do:

	git submodule update --init

after you cloned this repository to get the latest Countly iOS SDK.

Steps to deploy and send a sample push notification

  1. Download demo here.
  • This repository includes samples for each platform. For iOS, use ios
  • SDK is added to project as a git submodule. You just need to fetch it.
  1. Change application configuration as follows:
  • Change Bundle ID CodeSigning configurations according to your developer account configurations.
  • Change Countly server URL and AppID: config.appKey = @"YOUR_APP_KEY"; config.host = @"https://YOUR_COUNTLY_SERVER";
  • Enable push notifications: config.features = @[CLYPushNotifications];
  1. Create your push notification certificate and upload your Countly server.

  2. Run your application. From the list on the screen, choose "Ask for Notification Permission", and confirm.

  3. Push token will automatically be sent to Countly server. From this point forward, you will be able to send a push notification to that device.

  4. You can also send events, sample crashes, sample user profiles, and many more.