# Platform support

> The operating systems, toolchains and modules each Herald SDK supports, the other platforms, and how to install them.

The Herald SDK is a native library for iOS and a set of modules for Android. Both platforms expose the same calls, with the same names and the same argument order.

## Support matrix

| | iOS | Android |
|---|---|---|
| Minimum OS | iOS 16 | Android 8.0 (API level 26) |
| Language | Swift. The package builds in Swift 6 language mode; your app can use Swift 5 or 6. | Kotlin (built with Kotlin 2.0.21), Java 17 bytecode |
| Build tools | Xcode 16 or later (Swift tools version 6.0) | Android Gradle Plugin 8 (built with 8.7), compileSdk 35 |
| Package format | Swift Package Manager | Gradle modules (AAR) from JitPack |
| Default UI views | SwiftUI | Jetpack Compose |
| Push service | Apple Push Notification service (APNs) | Firebase Cloud Messaging (FCM) |
| Current version | 0.6.0 | 0.6.0 |

## Modules

| Platform | Module | What it does | Runtime dependencies |
|---|---|---|---|
| iOS | `HeraldSDK` | Identity, events, attributes, sessions, push token registration, push open handling, content card data, in-app message rules | Apple system frameworks only |
| iOS | `HeraldUI` | Default content card feed and in-app message views in SwiftUI | `HeraldSDK` |
| iOS | `HeraldNotificationService` | Images and action buttons in push notifications, from a Notification Service Extension | Foundation and UserNotifications only, so it links into an app extension |
| iOS | `HeraldLiveActivity` | Live Activity attributes and widget, from a widget extension | Apple system frameworks only |
| iOS | `HeraldGeofence` | Opt-in geofence monitoring (0.7.0, not released yet). See [Geofences](/docs/concepts/geofences). | `HeraldSDK`, CoreLocation |
| iOS | `HeraldPushStory` | Push stories, from a Notification Content Extension (0.7.0+) | `HeraldNotificationService` and Apple system frameworks only |
| Android | `herald-core` | The same responsibilities as `HeraldSDK` | `kotlinx-coroutines-android` 1.8.1 |
| Android | `herald-ui` | Default content card feed and in-app message views in Compose | Compose BOM 2024.09.02, Material 3, `activity-compose` 1.9.2 |
| Android | `herald-fcm` | FCM messaging service, token sync, notification display, Live Updates | `firebase-messaging` 24.0.3 |
| Android | `herald-geofence` | Opt-in geofence monitoring (0.7.0, not released yet). Adds no permissions. See [Geofences](/docs/concepts/geofences). | `play-services-location` 21.3.0 |

`herald-core` adds three permissions to your merged manifest: `INTERNET`, `ACCESS_NETWORK_STATE` and `POST_NOTIFICATIONS`. From 0.7.0, `herald-fcm` adds `POST_PROMOTED_NOTIFICATIONS` for [Live Updates](/docs/live-activities/android).

## Other platforms

| Platform | Status |
|---|---|
| React Native | Available, installed from git: `@herald/react-native`, a wrapper over the iOS and Android SDKs. See [Quickstart: React Native](/docs/overview/quickstart-react-native). |
| Flutter | Available, installed from git. The `herald_flutter` plugin wraps the native SDKs. See [Install on Flutter](/docs/overview/install-flutter). |
| Unity | Available from git: the `com.herald.sdk` package wraps the iOS and Android SDKs. See [Install on Unity](/docs/overview/install-unity). |
| Web | Planned. Browser push through Herald's web push script works today. |

## Install

Both SDKs are open source under the Apache License 2.0. The iOS package is at `https://github.com/ender1311/herald-ios` and the Android modules are at `https://github.com/ender1311/herald-android`, published through JitPack.

:::tabs
::tab ios
In Xcode, choose **File > Add Package Dependencies**, enter `https://github.com/ender1311/herald-ios` and add the `HeraldSDK` and `HeraldUI` libraries to your app target. Add `HeraldNotificationService` to your Notification Service Extension target only. In a `Package.swift` manifest:

```swift
dependencies: [
    .package(url: "https://github.com/ender1311/herald-ios", from: "0.6.0"),
],
targets: [
    .target(name: "Lumen", dependencies: [
        .product(name: "HeraldSDK", package: "herald-ios"),
        .product(name: "HeraldUI", package: "herald-ios"),
    ]),
]
```
::tab android
```kotlin
// settings.gradle.kts
dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://jitpack.io") }
    }
}

// app/build.gradle.kts
dependencies {
    implementation("com.github.ender1311.herald-android:herald-core:0.6.0")
    implementation("com.github.ender1311.herald-android:herald-ui:0.6.0")
    implementation("com.github.ender1311.herald-android:herald-fcm:0.6.0")
}
```
:::

Version numbers follow the policy on [Versioning and support](/docs/operations/versioning-and-support).

## Next

- [Quickstart: iOS](/docs/overview/quickstart-ios)
- [Install on Flutter](/docs/overview/install-flutter)
