diff --git a/swift-sdk/Internal/in-app/InAppManager.swift b/swift-sdk/Internal/in-app/InAppManager.swift index 88b287bd..e84d580e 100644 --- a/swift-sdk/Internal/in-app/InAppManager.swift +++ b/swift-sdk/Internal/in-app/InAppManager.swift @@ -316,7 +316,7 @@ class InAppManager: NSObject, IterableInternalInAppManagerProtocol { callback: ITBURLCallback? = nil) { ITBInfo() - if message.content is IterableJsonInAppContent { + if message.isJsonOnly { // JSON Only messages do not need to be shown updateMessage(message, didProcessTrigger: true, consumed: consume) if consume { diff --git a/swift-sdk/Internal/in-app/InAppPersistence.swift b/swift-sdk/Internal/in-app/InAppPersistence.swift index 55a97e1b..960c8daf 100644 --- a/swift-sdk/Internal/in-app/InAppPersistence.swift +++ b/swift-sdk/Internal/in-app/InAppPersistence.swift @@ -242,10 +242,6 @@ extension IterableInAppMessage: Codable { case type } - private var isJsonOnly: Bool { - return jsonOnly - } - public convenience init(from decoder: Decoder) { guard let container = try? decoder.container(keyedBy: CodingKeys.self) else { ITBError("Can not decode, returning default") @@ -301,6 +297,10 @@ extension IterableInAppMessage: Codable { self.consumed = consumed } + var isJsonOnly: Bool { + return jsonOnly + } + public func encode(to encoder: Encoder) { var container = encoder.container(keyedBy: CodingKeys.self)