From 7a5be12065cf239cce3cf9bc7082206a7089a1fc Mon Sep 17 00:00:00 2001 From: brave-builds <45370463+brave-builds@users.noreply.github.com> Date: Fri, 6 Sep 2024 02:54:39 +0100 Subject: [PATCH] [iOS] - Fix Receipt Linking in TestFlight (uplift to 1.70.x) (#25457) Uplift of #25443 (squashed) to beta --- .../BraveStore/Subscription/SDK/BraveStoreSDK.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ios/brave-ios/Sources/BraveStore/Subscription/SDK/BraveStoreSDK.swift b/ios/brave-ios/Sources/BraveStore/Subscription/SDK/BraveStoreSDK.swift index ac3e1db8c50d..35f9472bcac5 100644 --- a/ios/brave-ios/Sources/BraveStore/Subscription/SDK/BraveStoreSDK.swift +++ b/ios/brave-ios/Sources/BraveStore/Subscription/SDK/BraveStoreSDK.swift @@ -76,6 +76,15 @@ public enum BraveStoreProduct: String, AppStoreProduct, CaseIterable { /// Leo Yearly AppStore SKU case leoYearly + public init?(rawValue: String) { + if let value = Self.allCases.first(where: { $0.rawValue == rawValue }) { + self = value + return + } + + return nil + } + /// The Title of the SKU Group public var subscriptionGroup: String { switch self {