Migrating from v1.13.0 to v1.14.0
v1.14.0 has one breaking change: BlinkEngageSDK.start(debugMode:) is now annotated @MainActor. This is a compile-time change only — it surfaces a constraint the method always had at runtime. No behavior changes.
Who is affected
| Call site | Impact |
|---|---|
AppDelegate.application(_:didFinishLaunchingWithOptions:) | None — already on main actor |
SwiftUI App body or initializer | None — already on main actor |
| Objective-C | None — @MainActor is transparent to ObjC callers |
| Swift nonisolated function | Compile error |
Swift Task { } without actor inheritance | Compile error |
Most integrations are unaffected. If you do not see a compile error after updating, no action is needed.
Fix
Mark the calling function @MainActor, or use MainActor.assumeIsolated { } if you already guarantee the main thread through other means.
Option A — annotate the caller
// v1.13.0 (compiled but could crash at runtime if off main thread)
func bootstrap() {
BlinkEngageSDK.start(debugMode: false)
}
// v1.14.0
@MainActor
func bootstrap() {
BlinkEngageSDK.start(debugMode: false)
}
Option B — assert main thread at the call site
Use this only when you are certain the call is already on the main thread but the compiler cannot verify it (for example, a callback from a third-party library that documents main-thread delivery but is not annotated).
MainActor.assumeIsolated {
BlinkEngageSDK.start(debugMode: false)
}
MainActor.assumeIsolated traps at runtime if called off the main thread — it is an assertion, not a dispatch. Prefer annotating the caller unless you have a specific reason to use this form.