# appsflyersdk/appsflyerframework architecture

> Architecture diagram of the GitHub repository appsflyersdk/appsflyerframework, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/appsflyersdk/appsflyerframework
- Repository: https://github.com/appsflyersdk/appsflyerframework

## Overview

Based on your project’s file tree and README, you’re working with an iOS SDK framework (AppsFlyerFramework) that is published in multiple package formats (Cocoapods, Carthage, and Swift Package Manager). The main purpose of the project is to provide an SDK integration solution for AppsFlyer, with variations for static/dynamic linking and a “Strict” (no IDFA collection) option.

##### Main Components
- SDK Core Library: This is the heart of the framework. It includes the compiled binary code that gets integrated into host iOS (or related platform) apps.
- Integration Methods:
– Cocoapods: Represented by the Podspec file (AppsFlyerFramework.podspec) and installation instructions.
– Carthage: Indicated by the dedicated “Carthage” folder containing JSON files that point to binary artifacts.
– Swift Package Manager (SPM): Shown through Package.swift and the provided SPM integration steps in the README.
- Resources and Configurations:
– Resources folder containing “PrivacyInfo.xcprivacy.”
– CHANGELOG, LICENSE, and other metadata files.
- GitHub and CI/CD:
– GitHub workflows (such as the “close-support-issue.yml” file) that help support issue management.
– Issue templates for handling user issues and support tickets.
- Support and Documentation:
– README outlining integration instructions, support links, and external documentation for integration.

##### Relationships and Interactions
- The “SDK Core Library” interacts with embedded resources that might influence runtime behaviors (e.g., privacy configuration).
- CI/CD pipelines (performing tasks like closing support issues) interact with the repository maintenance/issue management nodes.
- External documentation/support channels (links in the README) should be represented as nodes connecting the SDK to user support.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Each package manager integration (and even separate repository URLs in SPM for different linking methods) is clearly distinguished.
- Extensibility: The provided issue templates, workflows, and metadata files demonstrate how the project is maintained, suggesting a continuous integration and support model.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Integration Methods (Top Layer)
    subgraph "Integration Methods"
        CP["Cocoapods Integration"]:::integration
        CAR["Carthage Integration"]:::integration
        SPM["Swift Package Manager Integration"]:::integration
    end

    %% Core SDK Node (Center)
    CP -->|"integrates"| CORE["AppsFlyer SDK Core Library"]:::core
    CAR -->|"integrates"| CORE
    SPM -->|"integrates"| CORE

    %% Binary Variants (Below Core)
    CORE -->|"provides"| STD["Static/Dynamic Linking"]:::variant
    STD -->|"alternative"| STRICT["Strict Mode (NoIDFA)"]:::variant

    %% Resources & Configurations (Left Branch)
    RES["Resources & Configurations"]:::resource
    RES -->|"configures"| CORE

    %% Support and CI/CD (Right Branch)
    WORK["CI/CD Workflows"]:::support
    IT1["Issue Template (AppsFlyer)"]:::support
    IT2["Issue Template (Custom)"]:::support
    DOC["Support & Documentation"]:::support

    WORK -->|"feeds"| DOC
    IT1 -->|"feeds"| DOC
    IT2 -->|"feeds"| DOC
    DOC -->|"supports"| CORE

    %% Click Events
    click CP "https://github.com/appsflyersdk/appsflyerframework/blob/master/AppsFlyerFramework.podspec"
    click CAR "https://github.com/appsflyersdk/appsflyerframework/tree/master/Carthage/"
    click SPM "https://github.com/appsflyersdk/appsflyerframework/blob/master/Package.swift"
    click RES "https://github.com/appsflyersdk/appsflyerframework/blob/master/Resources/PrivacyInfo.xcprivacy"
    click WORK "https://github.com/appsflyersdk/appsflyerframework/blob/master/.github/workflows/close-support-issue.yml"
    click IT1 "https://github.com/appsflyersdk/appsflyerframework/blob/master/.github/ISSUE_TEMPLATE/appsflyer-issue-template.md"
    click IT2 "https://github.com/appsflyersdk/appsflyerframework/blob/master/.github/ISSUE_TEMPLATE/custom.md"
    click DOC "https://github.com/appsflyersdk/appsflyerframework/blob/master/README.md"

    %% Styles
    classDef integration fill:#F9D5E5,stroke:#333,stroke-width:2px;
    classDef core fill:#CFE2F3,stroke:#333,stroke-width:2px;
    classDef variant fill:#D9EAD3,stroke:#333,stroke-width:2px;
    classDef resource fill:#FCE5CD,stroke:#333,stroke-width:2px;
    classDef support fill:#EAD1DC,stroke:#333,stroke-width:2px;
```
