All Projects → Countly → countly-sample-ios

Countly / countly-sample-ios

Licence: MIT license
Sample iOS projects to demonstrate how to use Countly SDKs. For Android sample, check Android repository and documentation.

Programming Languages

objective c
16641 projects - #2 most used programming language
swift
15916 projects
shell
77523 projects

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.

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].