Offline queue
.product(name: "CimkaOffline", package: "cimka-sdk-ios")import CimkaCoreimport CimkaOffline
Cimka.initialize()CimkaOffline.register()How it works
Section titled “How it works”When a crash, trace, screen, network or device-audit log can’t be delivered, it is appended to a file in the app’s Caches directory (one newline-delimited JSON file per log type). On the next app launch, once the SDK is ready, queued logs are resent and removed when delivered.
- Each file is capped at 2 MB; when the cap is reached the oldest half is dropped.
- Click and lifecycle events are not queued.
Custom store
Section titled “Custom store”CimkaOffline.register() installs a file-backed store. To provide your own backend, conform to CimkaOfflineStore and register it directly:
public protocol CimkaOfflineStore: AnyObject { func save(bucket: String, json: String) func readAll(bucket: String) -> [String] func clear(bucket: String) func exists(bucket: String) -> Bool}
Cimka.registerOfflineStore(MyStore())