Skip to content

Commit a3b4506

Browse files
authored
Merge branch 'master' into programaticViews/part2
2 parents 22dc84c + d373329 commit a3b4506

27 files changed

+116
-100
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# These owners will be the default owners for everything in
22
# the repo. Unless a later match takes precedence
33

4-
* @pMalvasio @glm4 @CamilaMoscatelli @mato2593 @germanStabile @kstoletniy @fpiruzi @LetoFranco @LeandroHiga @FLTravieso @danialepaco @agerace @camipera-rootstrap
4+
* @pMalvasio @glm4 @CamilaMoscatelli @mato2593 @germanStabile @kstoletniy @fpiruzi @LetoFranco @LeandroHiga @danialepaco @fconelli @fnicola1 @DaegoDev @JUNIOR140889 @SofiaCantero24

Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
platform :ios, '11.4'
1+
platform :ios, '14.0'
22
use_frameworks!
33
inhibit_all_warnings!
44

@@ -25,6 +25,6 @@ target 'ios-base' do
2525

2626
target 'ios-baseUITests' do
2727
inherit! :complete
28-
pod 'Swifter', '~> 1.4.7'
28+
pod 'Swifter', '~> 1.5.0'
2929
end
3030
end

Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ PODS:
106106
- R.swift.Library (5.0.1)
107107
- RSFontSizes (1.0.2):
108108
- Device (~> 3.1.2)
109-
- Swifter (1.4.7)
109+
- Swifter (1.5.0)
110110
- SwiftLint (0.43.1)
111111

112112
DEPENDENCIES:
@@ -119,7 +119,7 @@ DEPENDENCIES:
119119
- IQKeyboardManagerSwift (~> 6.1.1)
120120
- R.swift (~> 5.0.3)
121121
- RSFontSizes (~> 1.0.2)
122-
- Swifter (~> 1.4.7)
122+
- Swifter (~> 1.5.0)
123123
- SwiftLint (~> 0.43.1)
124124

125125
SPEC REPOS:
@@ -166,9 +166,9 @@ SPEC CHECKSUMS:
166166
R.swift: f5a87643b91ea569d23d6afb3eee9c743edde239
167167
R.swift.Library: cfe85d569d9bae6cb262922db130e7c3a7a5fad1
168168
RSFontSizes: cf14ae41c2807b66573f7064528ccff8c98251c9
169-
Swifter: 2327ef5d872c638aebab79646ce494af508b0c8f
169+
Swifter: e71dd674404923d7f03ebb03f3f222d1c570bc8e
170170
SwiftLint: 99f82d07b837b942dd563c668de129a03fc3fb52
171171

172-
PODFILE CHECKSUM: 9bf8204f31e4c13e914fa6af761a3874db46b336
172+
PODFILE CHECKSUM: 0466151c1673f2ab6ca3ea6aebefa12d898a7fbd
173173

174174
COCOAPODS: 1.11.2

ios-base.xcodeproj/project.pbxproj

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@
985985
DEVELOPMENT_TEAM = WNU857N39T;
986986
GCC_C_LANGUAGE_STANDARD = gnu11;
987987
INFOPLIST_FILE = "ios-baseUITests/Info.plist";
988-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
988+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
989989
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
990990
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
991991
MTL_FAST_MATH = YES;
@@ -1014,7 +1014,7 @@
10141014
DEVELOPMENT_TEAM = WNU857N39T;
10151015
GCC_C_LANGUAGE_STANDARD = gnu11;
10161016
INFOPLIST_FILE = "ios-baseUITests/Info.plist";
1017-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1017+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
10181018
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10191019
MTL_FAST_MATH = YES;
10201020
PRODUCT_BUNDLE_IDENTIFIER = "com.rootstrap.ios-baseUITests";
@@ -1041,7 +1041,7 @@
10411041
DEVELOPMENT_TEAM = WNU857N39T;
10421042
GCC_C_LANGUAGE_STANDARD = gnu11;
10431043
INFOPLIST_FILE = "ios-baseUITests/Info.plist";
1044-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1044+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
10451045
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10461046
MTL_FAST_MATH = YES;
10471047
PRODUCT_BUNDLE_IDENTIFIER = "com.rootstrap.ios-baseUITests";
@@ -1102,7 +1102,7 @@
11021102
GCC_WARN_UNUSED_FUNCTION = YES;
11031103
GCC_WARN_UNUSED_VARIABLE = YES;
11041104
INFOPLIST_PREPROCESS = NO;
1105-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
1105+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
11061106
MTL_ENABLE_DEBUG_INFO = YES;
11071107
ONLY_ACTIVE_ARCH = YES;
11081108
SDKROOT = iphoneos;
@@ -1129,7 +1129,7 @@
11291129
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
11301130
GOOGLE_SERVICES_FILE = "GoogleService-Debug-Info";
11311131
INFOPLIST_FILE = "${PROJECT_BASE_NAME}/Info.plist";
1132-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1132+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
11331133
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
11341134
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_DOMAIN}.${PROJECT_BASE_NAME}-${CONFIGURATION}";
11351135
PRODUCT_NAME = "ios-base-Debug";
@@ -1158,7 +1158,7 @@
11581158
DEVELOPMENT_TEAM = WNU857N39T;
11591159
GCC_C_LANGUAGE_STANDARD = gnu11;
11601160
INFOPLIST_FILE = "ios-baseUITests/Info.plist";
1161-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1161+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
11621162
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
11631163
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
11641164
MTL_FAST_MATH = YES;
@@ -1191,7 +1191,7 @@
11911191
"${SRCROOT}/Pods/Firebase/CoreOnly/Sources",
11921192
);
11931193
INFOPLIST_FILE = "ios-baseUnitTests/Info.plist";
1194-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1194+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
11951195
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
11961196
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
11971197
MTL_FAST_MATH = YES;
@@ -1252,7 +1252,7 @@
12521252
GCC_WARN_UNUSED_FUNCTION = YES;
12531253
GCC_WARN_UNUSED_VARIABLE = YES;
12541254
INFOPLIST_PREPROCESS = NO;
1255-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
1255+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
12561256
MTL_ENABLE_DEBUG_INFO = YES;
12571257
ONLY_ACTIVE_ARCH = YES;
12581258
SDKROOT = iphoneos;
@@ -1304,7 +1304,7 @@
13041304
GCC_WARN_UNUSED_FUNCTION = YES;
13051305
GCC_WARN_UNUSED_VARIABLE = YES;
13061306
INFOPLIST_PREPROCESS = NO;
1307-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
1307+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
13081308
MTL_ENABLE_DEBUG_INFO = NO;
13091309
SDKROOT = iphoneos;
13101310
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
@@ -1331,7 +1331,7 @@
13311331
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13321332
GOOGLE_SERVICES_FILE = "GoogleService-Debug-Info";
13331333
INFOPLIST_FILE = "${PROJECT_BASE_NAME}/Info.plist";
1334-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1334+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
13351335
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
13361336
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_DOMAIN}.${PROJECT_BASE_NAME}-${CONFIGURATION}";
13371337
PRODUCT_NAME = "${PROJECT_BASE_NAME}-${CONFIGURATION}";
@@ -1362,7 +1362,7 @@
13621362
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
13631363
GOOGLE_SERVICES_FILE = "GoogleService-Info";
13641364
INFOPLIST_FILE = "${PROJECT_BASE_NAME}/Info.plist";
1365-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1365+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
13661366
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
13671367
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_DOMAIN}.${PROJECT_BASE_NAME}";
13681368
PRODUCT_NAME = "${PROJECT_BASE_NAME}";
@@ -1394,7 +1394,7 @@
13941394
"${SRCROOT}/Pods/Firebase/CoreOnly/Sources",
13951395
);
13961396
INFOPLIST_FILE = "ios-baseUnitTests/Info.plist";
1397-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1397+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
13981398
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
13991399
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
14001400
MTL_FAST_MATH = YES;
@@ -1425,7 +1425,7 @@
14251425
"${SRCROOT}/Pods/Firebase/CoreOnly/Sources",
14261426
);
14271427
INFOPLIST_FILE = "ios-baseUnitTests/Info.plist";
1428-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1428+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
14291429
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
14301430
MTL_FAST_MATH = YES;
14311431
PRODUCT_BUNDLE_IDENTIFIER = "com.rootstrap.ios-baseUnitTests";
@@ -1454,7 +1454,7 @@
14541454
"${SRCROOT}/Pods/Firebase/CoreOnly/Sources",
14551455
);
14561456
INFOPLIST_FILE = "ios-baseUnitTests/Info.plist";
1457-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1457+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
14581458
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
14591459
MTL_FAST_MATH = YES;
14601460
PRODUCT_BUNDLE_IDENTIFIER = "com.rootstrap.ios-baseUnitTests";
@@ -1513,7 +1513,7 @@
15131513
GCC_WARN_UNUSED_FUNCTION = YES;
15141514
GCC_WARN_UNUSED_VARIABLE = YES;
15151515
INFOPLIST_PREPROCESS = NO;
1516-
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
1516+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
15171517
MTL_ENABLE_DEBUG_INFO = YES;
15181518
ONLY_ACTIVE_ARCH = YES;
15191519
SDKROOT = iphoneos;
@@ -1540,7 +1540,7 @@
15401540
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
15411541
GOOGLE_SERVICES_FILE = "GoogleService-Staging-Info";
15421542
INFOPLIST_FILE = "${PROJECT_BASE_NAME}/Info.plist";
1543-
IPHONEOS_DEPLOYMENT_TARGET = 11.4;
1543+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
15441544
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
15451545
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_DOMAIN}.${PROJECT_BASE_NAME}-${CONFIGURATION}";
15461546
PRODUCT_NAME = "${PROJECT_BASE_NAME}-${CONFIGURATION}";

ios-base/AppDelegate.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
4747
_ application: UIApplication, open url: URL,
4848
sourceApplication: String?, annotation: Any
4949
) -> Bool {
50-
return ApplicationDelegate.shared.application(application, open: url,
51-
sourceApplication: sourceApplication,
52-
annotation: annotation)
50+
ApplicationDelegate.shared.application(
51+
application, open: url,
52+
sourceApplication: sourceApplication,
53+
annotation: annotation
54+
)
5355
}
5456

5557
func unexpectedLogout() {
5658
UserDataManager.deleteUser()
5759
SessionManager.deleteSession()
58-
//Clear any local data if needed
59-
//Take user to onboarding if needed, do NOT redirect the user
60+
// Clear any local data if needed
61+
// Take user to onboarding if needed, do NOT redirect the user
6062
// if is already in the landing to avoid losing the current VC stack state.
6163
if window?.rootViewController is HomeViewController {
6264
AppNavigator.shared.navigate(to: OnboardingRoutes.firstScreen, with: .changeRoot)

ios-base/Common/Models/AuthViewModelStateDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import Foundation
1010
import UIKit
1111

12-
protocol NetworkStatusDelegate: class {
12+
protocol NetworkStatusDelegate: AnyObject {
1313
func networkStatusChanged(to networkStatus: NetworkState)
1414
}
1515

ios-base/Common/Protocols/ActivityIndicatorPresenter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import UIKit
1010

11-
protocol ActivityIndicatorPresenter: class {
11+
protocol ActivityIndicatorPresenter: AnyObject {
1212
var activityIndicator: UIActivityIndicatorView { get }
1313
func showActivityIndicator(_ show: Bool)
1414
}

ios-base/Common/Views/PlaceholderTextView.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ class PlaceholderTextView: UITextView {
4444
textColor = text == placeholder ? placeholderColor : fontColor
4545
}
4646

47-
convenience init(
48-
frame: CGRect, placeholder: String = "", placeholderColor: UIColor = .lightGray
47+
init(
48+
frame: CGRect,
49+
placeholder: String,
50+
placeholderColor: UIColor = .lightGray
4951
) {
50-
self.init(frame: frame)
52+
super.init(frame: frame, textContainer: nil)
5153
self.placeholderColor = placeholderColor
5254
self.placeholder = placeholder
5355
if let txtC = textColor {

ios-base/Extensions/ColorExtension.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
import UIKit
1010

1111
extension UIColor {
12-
12+
13+
// swiftlint:disable force_unwrapping
1314
static let buttonBackground = UIColor(named: "buttonBackground")!
1415
static let deleteButton = UIColor(named: "deleteButton")!
1516
static let facebookButton = UIColor(named: "facebookButton")!
1617
static let mainTitle = UIColor(named: "mainTitle")!
1718
static let redirectButtonTitle = UIColor(named: "redirectButtonTitle")!
1819
static let screenBackground = UIColor(named: "screenBackground")!
20+
// swiftlint:enable force_unwrapping
1921
}

ios-base/Extensions/DataExtension.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
import Foundation
1010

11-
//Helper to retrieve the right string value for base64 API uploaders
11+
// Helper to retrieve the right string value for base64 API uploaders
1212
extension Data {
1313
func asBase64Param(withType type: MimeType = .jpeg) -> String {
14-
return "data:\(type.rawValue);base64,\(self.base64EncodedString())"
14+
"data:\(type.rawValue);base64,\(self.base64EncodedString())"
1515
}
1616
}

ios-base/Extensions/DictionaryExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import Foundation
1010

11-
//+ Operator definition for Dictionary types
11+
// + Operator definition for Dictionary types
1212

1313
func + <K, V> (left: [K: V], right: [K: V]) -> [K: V] {
1414
var merge = left

ios-base/Extensions/FontExtension.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import UIKit
1010
import RSFontSizes
1111

1212
extension UIFont {
13-
static let h1Regular: UIFont = .font(size: .h1).withWeight(.regular)
14-
static let h2Regular: UIFont = .font(size: .h2).withWeight(.regular)
15-
static let h3Regular: UIFont = .font(size: .h3).withWeight(.regular)
16-
static let h1Medium: UIFont = .font(size: .h1).withWeight(.medium)
17-
static let h2Medium: UIFont = .font(size: .h2).withWeight(.regular)
18-
static let h3Medium: UIFont = .font(size: .h3).withWeight(.regular)
13+
static let h1Regular: UIFont = .font(size: .heading1).withWeight(.regular)
14+
static let h2Regular: UIFont = .font(size: .heading2).withWeight(.regular)
15+
static let h3Regular: UIFont = .font(size: .heading3).withWeight(.regular)
16+
static let h1Medium: UIFont = .font(size: .heading1).withWeight(.medium)
17+
static let h2Medium: UIFont = .font(size: .heading2).withWeight(.regular)
18+
static let h3Medium: UIFont = .font(size: .heading3).withWeight(.regular)
1919

2020
private func withWeight(_ weight: UIFont.Weight) -> UIFont {
2121
var attributes = fontDescriptor.fontAttributes
@@ -41,8 +41,8 @@ extension UIFont {
4141
}
4242

4343
public enum Sizes: CGFloat {
44-
case h1 = 32.0
45-
case h2 = 16.0
46-
case h3 = 15.0
44+
case heading1 = 32.0
45+
case heading2 = 16.0
46+
case heading3 = 15.0
4747
}
4848
}

ios-base/Extensions/StringExtension.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@ extension String {
1717
}
1818

1919
var hasPunctuationCharacters: Bool {
20-
return rangeOfCharacter(from: CharacterSet.punctuationCharacters) != nil
20+
rangeOfCharacter(from: CharacterSet.punctuationCharacters) != nil
2121
}
2222

2323
var hasNumbers: Bool {
24-
return rangeOfCharacter(from: CharacterSet(charactersIn: "0123456789")) != nil
24+
rangeOfCharacter(from: CharacterSet(charactersIn: "0123456789")) != nil
2525
}
2626

2727
var localized: String {
28-
return self.localize()
28+
self.localize()
2929
}
3030

3131
func localize(comment: String = "") -> String {
32-
return NSLocalizedString(self, comment: comment)
32+
NSLocalizedString(self, comment: comment)
3333
}
3434

3535
var validFilename: String {
3636
guard !isEmpty else { return "emptyFilename" }
3737
return addingPercentEncoding(withAllowedCharacters: .alphanumerics) ?? "emptyFilename"
3838
}
3939

40-
//Regex fulfill RFC 5322 Internet Message format
40+
// Regex fulfill RFC 5322 Internet Message format
4141
func isEmailFormatted() -> Bool {
4242
// swiftlint:disable line_length
4343
let emailRegex = "[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?"

ios-base/Extensions/ViewExtension.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ import Foundation
1010
import UIKit
1111

1212
extension UIView {
13+
1314
// MARK: - Instance methods
14-
//Change the default values for params as you wish
15+
16+
// Change the default values for params as you wish
1517
func addBorder(color: UIColor = UIColor.black, weight: CGFloat = 1.0) {
1618
layer.borderColor = color.cgColor
1719
layer.borderWidth = weight
@@ -23,13 +25,14 @@ extension UIView {
2325
}
2426

2527
var typeName: String {
26-
return String(describing: type(of: self))
28+
String(describing: type(of: self))
2729
}
2830

2931
func instanceFromNib(withName name: String) -> UIView? {
30-
return UINib(nibName: name,
31-
bundle: nil).instantiate(withOwner: self,
32-
options: nil).first as? UIView
32+
UINib(
33+
nibName: name,
34+
bundle: nil
35+
).instantiate(withOwner: self, options: nil).first as? UIView
3336
}
3437

3538
func addNibView(
@@ -91,7 +94,8 @@ extension UIView {
9194
///
9295
/// - Parameters:
9396
/// - view: UIView on which the view will be centered horizontally
94-
/// - withOffset: CGPoint indicating the horizontal and vertical displacement of the view
97+
/// - withOffset: CGPoint indicating the horizontal
98+
/// and vertical displacement of the view
9599
func center(_ view: UIView, withOffset offset: CGPoint = .zero) {
96100
centerHorizontally(with: view, withOffset: offset.x)
97101
centerVertically(with: view, withOffset: offset.y)

0 commit comments

Comments
 (0)