Skip to content

Commit

Permalink
[MOB-9233] Updated code according to the new discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 7, 2025
1 parent f55b0b9 commit 5734dc9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion swift-sdk/Core/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ enum JsonKey {
static let packageName = "packageName"
static let sdkVersion = "SDKVersion"
static let content = "content"
static let payload = "payload"
static let jsonOnly = "jsonOnly"
}

Expand Down
2 changes: 1 addition & 1 deletion swift-sdk/Internal/in-app/InAppMessageParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct InAppMessageParser {
let content: IterableInAppContent
let jsonOnly = (json[JsonKey.InApp.jsonOnly] as? Int ?? 0) == 1

switch InAppContentParser.parse(contentDict: contentDict, jsonOnly: jsonOnly) {
switch InAppContentParser.parse(contentDict: contentDict) {
case let .success(parsedContent):
content = parsedContent
case let .failure(reason):
Expand Down
4 changes: 0 additions & 4 deletions swift-sdk/Internal/in-app/InAppPersistence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,6 @@ extension IterableInAppMessage: Codable {
try? container.encode(read, forKey: .read)
try? container.encode(priorityLevel, forKey: .priorityLevel)

if content is IterableJsonInAppContent {
try? container.encode(1, forKey: .jsonOnly)
}

if let inboxMetadata = inboxMetadata {
try? container.encode(inboxMetadata, forKey: .inboxMetadata)
}
Expand Down

0 comments on commit 5734dc9

Please sign in to comment.