Skip to content

Commit 1c15c17

Browse files
Merge pull request #8 from GoodNotes/arturo/fix-ui-config
[iOS] Fix for UI Config Mapping decoding error
2 parents cf8a9a0 + 788014c commit 1c15c17

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Sources/Networking/Responses/CustomerInfoResponse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct CustomerInfoResponse {
2929
extension CustomerInfoResponse {
3030

3131
struct UIConfig {
32-
var paywall: String
32+
var paywall: String?
3333
}
3434

3535
struct Subscriber {

Sources/Purchasing/CustomerInfoMetadata.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ public final class CustomerInfoMetadata: NSObject {
55
@objc public let paywallConfig: CustomerInfoPaywallConfig?
66

77
init?(from uiConfigMapping: CustomerInfoResponse.UIConfig?) {
8-
guard let uiConfigMapping else { return nil }
9-
self.paywallConfig = .init(paywallId: uiConfigMapping.paywall)
8+
guard let uiConfigMapping, let paywallId = uiConfigMapping.paywall else { return nil }
9+
self.paywallConfig = .init(paywallId: paywallId)
1010
}
1111
}
1212

0 commit comments

Comments
 (0)