Skip to content

Datadog SDK for iOS - Swift and Objective-C.

License

Notifications You must be signed in to change notification settings

flashcatcloud/fc-sdk-ios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8,075 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flashcat SDK for iOS and tvOS

Swift Platform License

Swift and Objective-C libraries to interact with Flashcat on iOS and tvOS.

About

This SDK is forked from Datadog iOS SDK and customized for Flashcat Cloud. It provides observability features including Real User Monitoring (RUM), distributed tracing, and crash reporting.

Key Differences from Datadog SDK

  • Endpoint: Data is sent to Flashcat Cloud (flashcat.cloud) instead of Datadog
  • Site Configuration: Uses FlashcatSite with .cn and .staging options
  • Naming: Distribution names are renamed (e.g., FlashcatCore, FlashcatRUM, FlashcatTrace), while Swift module imports remain Datadog*
  • Disabled Modules: DatadogLogs, DatadogSessionReplay, DatadogFlags, DatadogProfiling are currently not available

Available Modules

Module Description
FlashcatCore Core SDK functionality and initialization
FlashcatRUM Real User Monitoring for views, actions, resources, and errors
FlashcatTrace Distributed tracing with OpenTelemetry support
FlashcatCrashReporting Crash detection and reporting
FlashcatWebViewTracking WebView tracking for hybrid mobile applications

Installation

Swift Package Manager

Add the following to your Package.swift:

dependencies: [
    .package(url: "https://github.com/flashcatcloud/fc-sdk-ios.git", from: "0.4.0")
]

Then add the products you need:

.target(
    name: "YourApp",
    dependencies: [
        .product(name: "FlashcatCore", package: "fc-sdk-ios"),
        .product(name: "FlashcatRUM", package: "fc-sdk-ios"),
        .product(name: "FlashcatTrace", package: "fc-sdk-ios"),
        .product(name: "FlashcatCrashReporting", package: "fc-sdk-ios"),
        .product(name: "FlashcatWebViewTracking", package: "fc-sdk-ios"),
    ]
)

CocoaPods

Add to your Podfile:

pod 'FlashcatCore'
pod 'FlashcatRUM'
pod 'FlashcatTrace'
pod 'FlashcatCrashReporting'
pod 'FlashcatWebViewTracking'

Getting Started

Initialization

import DatadogCore

Datadog.initialize(
    with: Datadog.Configuration(
        clientToken: "<YOUR_CLIENT_TOKEN>",
        env: "production",
        site: .cn  // or .staging
    ),
    trackingConsent: .granted
)

RUM (Real User Monitoring)

import DatadogRUM

RUM.enable(with: RUM.Configuration(applicationID: "<YOUR_APP_ID>"))

Trace (Distributed Tracing)

import DatadogTrace

Trace.enable()

Crash Reporting

import DatadogCrashReporting

CrashReporting.enable()

WebView Tracking

Track web views in hybrid mobile applications:

import DatadogWebViewTracking
import WebKit

let webView = WKWebView(...)
WebViewTracking.enable(webView: webView)

Documentation

Contributing

Pull requests are welcome. First, open an issue to discuss what you would like to change. For more information, read the Contributing Guide.

License

Apache License, v2.0

This project is forked from Datadog iOS SDK which is also licensed under Apache 2.0.

Acknowledgments

This SDK is based on the excellent work of the Datadog team. We are grateful for their open-source contribution.

About

Datadog SDK for iOS - Swift and Objective-C.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 93.9%
  • C 1.8%
  • Python 1.2%
  • Shell 1.2%
  • C++ 0.9%
  • Objective-C 0.6%
  • Other 0.4%