Added
- Added optional
shouldLog(level:) -> BooltoIterableLogDelegate. Defaults totruewhen not implemented. Lets the delegate short-circuit log calls before any message formatting work happens.DefaultLogDelegateroutes itsminLogLevelfilter through this, andNoneLogDelegatereturnsfalsefor every level.
Fixed
- Fixed a memory leak in
NetworkMonitorwhereNWPathMonitorand the monitor wrapper were retained for the lifetime of the app across foreground/background cycles.start()is now idempotent, capturesselfweakly inpathUpdateHandler, andstop()reliably cancels and releases the monitor. Resolves GitHub issue #867. - Fixed a Swift access race in
Pending/Fulfillflagged by Thread Sanitizer. All reads and writes ofresult,successCallbacks, anderrorCallbacksnow run on a private serial queue, with callbacks invoked outside the critical section so re-entrant registrations cannot deadlock. Also fixes a latent O(N²) firing path when registering callbacks against an already-resolvedPending. Resolves GitHub issue #767. - Fixed orphaned
Pendingchains in the JWT auth retry path. When token refresh hits the retry cap, is paused, or runs after logout, callers are now notified through a newonRetryExhaustedcallback instead of being silently dropped, preventing upstream awaiters from hanging forever.
Changed
IterableAPI.disableDeviceForCurrentUseranddisableDeviceForAllUsersare now routed through the offline queue, so adisableDevicecall made while offline is automatically retried when connectivity returns. The original user identity is captured at call time, so the queued request still targets the correct user after logout or user switch. QueueddisableDevicetasks are also preserved across logout while other queued work is still purged.- Cached the
DateFormatterused byIterableLogUtilas aprivate static letand skip message formatting entirely when the log delegate filters the level out. Fixes a 2.4–3.2s main-thread hang observed on foreground transitions in apps with a restrictiveminLogLevel.