Mercurial > public > simoleon
comparison Simoleon/Helpers/CurrencySelector.swift @ 128:87f02d4f9c26
Add custom build configuration
Now I can add logic when the app is built under the Screenshots scheme
author | Dennis Concepcion Martin <dennisconcepcionmartin@gmail.com> |
---|---|
date | Mon, 16 Aug 2021 18:21:39 +0100 |
parents | 587924519d3b |
children | 6eac99e99b96 |
comparison
equal
deleted
inserted
replaced
127:0e693e85db9b | 128:87f02d4f9c26 |
---|---|
38 var body: some View { | 38 var body: some View { |
39 NavigationView { | 39 NavigationView { |
40 VStack { | 40 VStack { |
41 SearchBar(placeholder: "Search...", text: $searchCurrency) | 41 SearchBar(placeholder: "Search...", text: $searchCurrency) |
42 .padding() | 42 .padding() |
43 .accessibilityIdentifier("CurrencySearchBar") | |
43 | 44 |
44 List { | 45 List { |
45 if entitlementIsActive { | 46 if entitlementIsActive { |
46 ForEach(searchResults, id: \.self) { currencyPair in | 47 ForEach(searchResults, id: \.self) { currencyPair in |
47 Button(action: { | 48 Button(action: { |
95 } | 96 } |
96 } | 97 } |
97 | 98 |
98 // Check if user subscription is active | 99 // Check if user subscription is active |
99 private func checkEntitlement() { | 100 private func checkEntitlement() { |
100 #if DEBUG | 101 #if SCREENSHOTS |
101 entitlementIsActive = true | 102 entitlementIsActive = true |
102 #else | 103 #else |
103 Purchases.shared.purchaserInfo { (purchaserInfo, error) in | 104 Purchases.shared.purchaserInfo { (purchaserInfo, error) in |
104 if purchaserInfo?.entitlements["all"]?.isActive == true { | 105 if purchaserInfo?.entitlements["all"]?.isActive == true { |
105 entitlementIsActive = true | 106 entitlementIsActive = true |