# adobe/aepsdk-edge-ios architecture

> Architecture diagram of the GitHub repository adobe/aepsdk-edge-ios, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adobe/aepsdk-edge-ios
- Repository: https://github.com/adobe/aepsdk-edge-ios

## Overview

AEPEdge is an Adobe Experience Platform Mobile SDK extension that sends mobile experience data to the Edge Network. The main path is an app submitting an Experience Event through the extension; the extension queues and processes hits, builds a request, selects an endpoint, and sends it to Edge. Responses are handled back through the network response handler, which supports event callbacks and returned state payloads. The README establishes the product role and SDK dependencies; source-index references and excerpts support the internal relationships shown. Some unsampled integrations are omitted rather than inferred.

Main entry points: [`Sources/Edge.swift`](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/Edge.swift) (Edge extension), [`Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift) (Hit processor), [`Sources/EdgeNetworkHandlers/EdgeNetworkService.swift`](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeNetworkService.swift) (Network service), [`Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift`](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift) (Batching hit queue)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["SDK entry and events"]
  node_edge["Edge extension<br/>[Edge.swift]"]
  node_public_api["Public event API"]
  node_experience_event["Experience Event"]
  node_xdm["XDM protocols<br/>[XDMProtocols.swift]"]
  node_completion["Completion manager"]
end

subgraph group_processing["Hit processing"]
  node_batch_config["Batching configuration"]
  node_hit_queue["Batching hit queue"]
  node_hit_processor["Hit processor"]
  node_consent_hit["Consent hit"]
end

subgraph group_transport["Network transport"]
  node_request_builder["Request builder"]
  node_endpoint["Endpoint selection<br/>[EdgeEndpoint.swift]"]
  node_network["Network service"]
  node_response_handler["Response handler"]
end

subgraph group_state["Consent and response state"]
  node_state["Edge state<br/>[EdgeState.swift]"]
  node_shared_state["Shared state reader"]
  node_store_payload["Store payload manager"]
end

node_app(("Mobile app"))
node_edge_network(("Adobe Edge Network"))
node_data_store[("SDK data store")]
node_core_services(("AEPCore and AEPServices"))
node_identity(("Edge identity extension"))

node_app -->|"submits events"| node_public_api
node_public_api -->|"routes events"| node_edge
node_public_api -->|"accepts event"| node_experience_event
node_experience_event -->|"supports XDM"| node_xdm
node_edge -->|"queues hits"| node_hit_queue
node_edge -->|"uses processor"| node_hit_processor
node_edge -->|"updates state"| node_state
node_edge -->|"reads shared state"| node_shared_state
node_hit_queue -->|"uses settings"| node_batch_config
node_hit_queue -->|"submits hits"| node_hit_processor
node_state -->|"updates consent"| node_hit_queue
node_hit_processor -->|"builds requests"| node_request_builder
node_hit_processor -->|"registers waiting events"| node_response_handler
node_hit_processor -->|"sends hits"| node_network
node_hit_processor -->|"reads shared state"| node_shared_state
node_request_builder -->|"loads stored payloads"| node_store_payload
node_network -->|"selects endpoint"| node_endpoint
node_network -->|"posts requests"| node_edge_network
node_network -->|"delivers responses"| node_response_handler
node_response_handler -->|"completes callbacks"| node_completion
node_response_handler -->|"updates stored payloads"| node_store_payload
node_store_payload -->|"reads and writes"| node_data_store
node_consent_hit -->|"processed as hit"| node_hit_processor
node_core_services -->|"provides event handling"| node_edge
node_identity -.->|"provides identity management"| node_edge

click node_edge "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/Edge.swift"
click node_public_api "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/Edge%2BPublicAPI.swift"
click node_experience_event "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/ExperienceEvent.swift"
click node_xdm "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/xdm/XDMProtocols.swift"
click node_state "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeState.swift"
click node_shared_state "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/SharedStateReader.swift"
click node_batch_config "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeBatchingConfig.swift"
click node_hit_queue "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift"
click node_hit_processor "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift"
click node_request_builder "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/RequestBuilder.swift"
click node_endpoint "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeEndpoint.swift"
click node_network "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeNetworkService.swift"
click node_response_handler "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift"
click node_completion "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/CompletionHandlersManager.swift"
click node_store_payload "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/StoreResponsePayloadManager.swift"
click node_consent_hit "https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/ConsentEdgeHit.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_edge,node_public_api,node_experience_event,node_xdm,node_completion toneBlue
class node_batch_config,node_hit_queue,node_hit_processor,node_consent_hit,node_data_store toneAmber
class node_request_builder,node_endpoint,node_network,node_response_handler toneMint
class node_state,node_shared_state,node_store_payload toneRose
class node_app,node_edge_network,node_core_services,node_identity toneIndigo
```

## Components

### SDK entry and events

- [Edge extension](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/Edge.swift): `Sources/Edge.swift`
- [Public event API](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/Edge%2BPublicAPI.swift): `Sources/Edge+PublicAPI.swift`
- [Experience Event](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/ExperienceEvent.swift): `Sources/ExperienceEvent.swift`
- [XDM protocols](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/xdm/XDMProtocols.swift): `Sources/xdm/XDMProtocols.swift`
- [Completion manager](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/CompletionHandlersManager.swift): `Sources/EdgeNetworkHandlers/CompletionHandlersManager.swift`

### Hit processing

- [Batching configuration](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeBatchingConfig.swift): `Sources/EdgeNetworkHandlers/EdgeBatchingConfig.swift`
- [Batching hit queue](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift): `Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift`
- [Hit processor](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift): `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`
- [Consent hit](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/ConsentEdgeHit.swift): `Sources/EdgeNetworkHandlers/ConsentEdgeHit.swift`

### Network transport

- [Request builder](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/RequestBuilder.swift): `Sources/EdgeNetworkHandlers/RequestBuilder.swift`
- [Endpoint selection](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeEndpoint.swift): `Sources/EdgeNetworkHandlers/EdgeEndpoint.swift`
- [Network service](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/EdgeNetworkService.swift): `Sources/EdgeNetworkHandlers/EdgeNetworkService.swift`
- [Response handler](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift): `Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift`

### Consent and response state

- [Edge state](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeState.swift): `Sources/EdgeState.swift`
- [Shared state reader](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/SharedStateReader.swift): `Sources/EdgeNetworkHandlers/SharedStateReader.swift`
- [Store payload manager](https://github.com/adobe/aepsdk-edge-ios/blob/main/Sources/EdgeNetworkHandlers/StoreResponsePayloadManager.swift): `Sources/EdgeNetworkHandlers/StoreResponsePayloadManager.swift`

### Other components

- **Mobile app**
- **Adobe Edge Network**
- **SDK data store**
- **AEPCore and AEPServices**
- **Edge identity extension**

## Connections

- Mobile app → Public event API: submits events (evidence: `README.md`)
- Public event API → Edge extension: routes events (evidence: `Sources/Edge+PublicAPI.swift`)
- Public event API → Experience Event: accepts event (evidence: `Sources/Edge+PublicAPI.swift`)
- Experience Event → XDM protocols: supports XDM (evidence: `Sources/ExperienceEvent.swift`)
- Edge extension → Batching hit queue: queues hits (evidence: `Sources/Edge.swift`)
- Edge extension → Hit processor: uses processor (evidence: `Sources/Edge.swift`)
- Edge extension → Edge state: updates state (evidence: `Sources/Edge.swift`)
- Edge extension → Shared state reader: reads shared state (evidence: `Sources/Edge.swift`)
- Batching hit queue → Batching configuration: uses settings (evidence: `Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift`)
- Batching hit queue → Hit processor: submits hits (evidence: `Sources/EdgeNetworkHandlers/EdgeBatchingHitQueue.swift`)
- Edge state → Batching hit queue: updates consent (evidence: `Sources/EdgeState.swift`)
- Hit processor → Request builder: builds requests (evidence: `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`)
- Hit processor → Response handler: registers waiting events (evidence: `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`)
- Hit processor → Network service: sends hits (evidence: `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`)
- Hit processor → Shared state reader: reads shared state (evidence: `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`)
- Request builder → Store payload manager: loads stored payloads (evidence: `Sources/EdgeNetworkHandlers/RequestBuilder.swift`)
- Network service → Endpoint selection: selects endpoint (evidence: `Sources/EdgeNetworkHandlers/EdgeNetworkService.swift`)
- Network service → Adobe Edge Network: posts requests (evidence: `README.md`)
- Network service → Response handler: delivers responses (evidence: `Sources/EdgeNetworkHandlers/EdgeNetworkService.swift`)
- Response handler → Completion manager: completes callbacks (evidence: `Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift`)
- Response handler → Store payload manager: updates stored payloads (evidence: `Sources/EdgeNetworkHandlers/NetworkResponseHandler.swift`)
- Store payload manager → SDK data store: reads and writes (evidence: `Sources/EdgeNetworkHandlers/StoreResponsePayloadManager.swift`)
- Consent hit → Hit processor: processed as hit (evidence: `Sources/EdgeNetworkHandlers/EdgeHitProcessor.swift`)
- AEPCore and AEPServices → Edge extension: provides event handling (evidence: `README.md`)
- Edge identity extension → Edge extension: provides identity management (evidence: `README.md`)
