// swift-tools-version: 5.8
import PackageDescription

let package = Package(
    name: "localytics-react-native",
    platforms: [
        .iOS(.v12)
    ],
    products: [
        .library(
            name: "LLLocalyticsReactNative",
            targets: ["LLLocalyticsReactNative"]
        )
    ],
    dependencies: [
        .package(url: "https://github.com/localytics/Localytics-swiftpm.git", from: "7.1.1")
    ],
    targets: [
        .target(
            name: "LLLocalyticsReactNative",
            dependencies: [
                .product(name: "Localytics", package: "localytics-swiftpm")
            ],
            path: "ios",
            exclude: [
                "LLLocalytics.xcodeproj",
                "ReactNativeHeaders",
                "ReactNativeHeadersCore",
                "ReactNativeYoga",
            ],
            publicHeadersPath: ".",
            cSettings: [
                // Symlinks created by host app Podfile after `pod install` (see README).
                .headerSearchPath("ReactNativeHeaders"),
                .headerSearchPath("ReactNativeHeadersCore"),
                .headerSearchPath("ReactNativeYoga"),
                .headerSearchPath("PluginLibrary"),
            ]
        )
    ]
)
