Skip to content
Feralin

Developers

Swift / iOS / macOS: quickstart

Install and first-use steps for sending events to Feralin with Swift / iOS / macOS. Code samples come from the SDK's own README and statuses from the capability record.

Install

Feralin 0.3.0 is published on SPM; install it with your package manager using the command below.

// Package.swift
.package(url: "https://github.com/feralincom/sdk.git", exact: "0.3.0")
// hedef bağımlılığı
.product(name: "Feralin", package: "sdk")
// Package.swift
.package(path: "../sdks/swift")
// hedef bağımlılığı
.product(name: "Feralin", package: "Feralin")

First use

import Feralin

let client = try FeralinClient(configuration: .init(
    projectKey: "pk_live_...",
    collectURL: "https://collect.example.com",
    consent: Consent(analytics: kullaniciAnalitikIzniVerdi)
))

try await client.track("order_completed", properties: ["order_id": "ord_1", "amount": 249.9], userID: "user_42")
let sonuc = try await client.flush()   // ağ hatasında fırlatmaz, sonuç sonuc.error içinde
await client.close()

Code samples are taken as they are from sdks/swift/README.md; comments inside may be in Turkish. You create the project key in the dashboard.

Capabilities

Swift / iOS / macOS capability status
CapabilityStatus
Event sendingPartial
Batch sendingPartial
Consent handlingPartial
IdentityPartial
AttributionPartial
Deep linksPlanned
RevenuePartial
Error capturePartial
Session replayNot applicable
TracingPlanned

Verification chain

Swift / iOS / macOS verification chain
LinkStatus
SourcePartial
BuildPartial
TestPartial
Registry publicationPassed
Clean installPassed
Event receiptPassed
DocumentationPassed
Super Admin proofNot started

Passed means local evidence: source, build and tests ran. Registry publication and Super Admin proof are separate links; the SDK is not called ready until each has passed.