flurry / flurry-ios-sdk

Flurry iOS SDK CocoaPods
Apache License 2.0
155 stars 65 forks source link

Flurry SDK

pod platform license

Table of Contents

Installation

To install FlurrySDK from CocoaPods, please follow the instructions below. Remember to include use_frameworks! if your app target is in Swift.

iOS

To enable Flurry Analytics:

pod 'Flurry-iOS-SDK/FlurrySDK'

To enable Flurry Ad serving:

pod 'Flurry-iOS-SDK/FlurrySDK'
pod 'Flurry-iOS-SDK/FlurryAds'

To enable Flurry Config:

pod 'Flurry-iOS-SDK/FlurryConfig'

To enable Flurry Messaging:

pod 'Flurry-iOS-SDK/FlurryMessaging'

watchOS

To use FlurrySDK for Apple Watch 2.x Extension:

target 'Your Apple Watch 2.x Extension Target' do 
  platform :watchos, '2.0'
  pod 'Flurry-iOS-SDK/FlurrySDK'
end   

tvOS

To use FlurrySDK for tvOS apps:

target 'Your tvOS Application' do
  platform :tvos, '10.0'
  pod 'Flurry-iOS-SDK/FlurrySDK'
end

To enable Flurry Messaging for tvOS:

pod 'Flurry-iOS-SDK/FlurryMessaging'

Requirements

Examples

Listed below are brief examples of initializing and using Flurry in your project. For detailed instructions, please check our documentation.

Initialize Flurry

Log Events

Use this to log normal events and timed events in your app.

Log Error (iOS/tvOS)

Use this to log exceptions and/or errors that occur in your app. Flurry will report the first 10 errors that occur in each session.

Flurry.log(errorId: "ERROR_NAME", message: "ERROR_MESSAGE", exception: e)

Track User Demographics (iOS/tvOS)

After identifying the user, use this to log the user’s assigned ID, username, age and gender in your system.

Flurry.set(userId: "USER_ID")
Flurry.set(age: 20)
Flurry.set(gender: "f") // "f" for female and "m" for male

Session Origins and Attributes (iOS/tvOS)

This allows you to specify session origin and deep link attached to each session, or add a custom parameterized session parameters. You can also add an SDK origin specified by origin name and origin version.

Flurry.add(sessionOriginName: "SESSION_ORIGIN")
Flurry.add(sessionOriginName: "SESSION_ORIGIN", deepLink: "DEEP_LINK")
Flurry.sessionProperties(["key": "value"])
Flurry.add(originName: "ORIGIN_NAME", originVersion: "ORIGIN_VERSION")
Flurry.add(originName: "ORIGIN_NAME", originVersion: "ORIGIN_VERSION", parameters: ["key": "value"])

Support

License

Copyright (c) 2021 Yahoo. All rights reserved.

This project is licensed under the terms of the Apache 2.0 open source license. Please refer to LICENSE for the full terms. Your use of Flurry is governed by Flurry Terms of Service.