comparison Simoleon/Helpers/SubscribeButton.swift @ 47:75c1a05176f6

Refactor code
author Dennis Concepción Martín <dennisconcepcionmartin@gmail.com>
date Mon, 26 Jul 2021 20:08:20 +0100
parents d25b02d439d4
children c7b6249ab745
comparison
equal deleted inserted replaced
46:ce4eb7416b41 47:75c1a05176f6
40 } 40 }
41 41
42 private func fetchMonthlySubscription() { 42 private func fetchMonthlySubscription() {
43 Purchases.shared.offerings { (offerings, error) in 43 Purchases.shared.offerings { (offerings, error) in
44 if let product = offerings?.current?.monthly?.product { 44 if let product = offerings?.current?.monthly?.product {
45 self.price = formatCurrency(product.priceLocale, product.price) 45 price = formatCurrency(product.priceLocale, product.price)
46 showingPrice = true 46 showingPrice = true
47 } 47 }
48 48
49 if let error = error as NSError? { 49 if let error = error as NSError? {
50 alertTitle = error.localizedDescription 50 alertTitle = error.localizedDescription