File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11Pod ::Spec . new do |s |
22 s . name = 'ApphudSDK'
3- s . version = '4.0.3 '
3+ s . version = '4.0.4 '
44 s . summary = 'Build and Measure In-App Subscriptions on iOS.'
55 s . description = 'Apphud covers every aspect when it comes to In-App Subscriptions from integration to analytics on iOS and Android.'
66 s . homepage = 'https://github.com/apphud/ApphudSDK'
Original file line number Diff line number Diff line change @@ -374,10 +374,17 @@ extension ApphudInternal {
374374 }
375375
376376 internal func flushUserProperties( force: Bool , completion: ( ( Bool ) -> Void ) ? = nil ) {
377+ let completeOnMain : ( Bool ) -> Void = { result in
378+ guard let completion else { return }
379+ Task { @MainActor in
380+ completion ( result)
381+ }
382+ }
383+
377384 Task {
378385 let values = await self . preparePropertiesParams ( isAudience: force)
379386 guard let params = values. 0 , let properties = values. 1 else {
380- completion ? ( false )
387+ completeOnMain ( false )
381388 return
382389 }
383390
@@ -395,7 +402,7 @@ extension ApphudInternal {
395402 apphudLog ( " User Properties update failed: \( error? . localizedDescription ?? " " ) with code: \( code) " )
396403 }
397404
398- completion ? ( result)
405+ completeOnMain ( result)
399406 }
400407 }
401408 }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import Foundation
1414import UserNotifications
1515import SwiftUI
1616
17- internal let apphud_sdk_version = " 4.0.3 "
17+ internal let apphud_sdk_version = " 4.0.4 "
1818
1919// MARK: - Initialization
2020
You can’t perform that action at this time.
0 commit comments