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
| Capability | Status |
|---|---|
| Event sending | Partial |
| Batch sending | Partial |
| Consent handling | Partial |
| Identity | Partial |
| Attribution | Partial |
| Deep links | Planned |
| Revenue | Partial |
| Error capture | Partial |
| Session replay | Not applicable |
| Tracing | Planned |
Verification chain
| Link | Status |
|---|---|
| Source | Partial |
| Build | Partial |
| Test | Partial |
| Registry publication | Passed |
| Clean install | Passed |
| Event receipt | Passed |
| Documentation | Passed |
| Super Admin proof | Not 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.