Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Commit 1d74dff

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents d966f31 + 320eefd commit 1d74dff

22 files changed

+83
-65
lines changed

Podfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ target 'WordPressAuthenticator' do
1717
##
1818
pod 'Gridicons', '~> 0.15'
1919
pod 'WordPressUI', '~> 1.0'
20-
pod 'WordPressKit', '~> 1.0'
21-
pod 'WordPressShared', '~> 1.0'
20+
pod 'WordPressKit', '~> 1.4.1-beta.3'
21+
pod 'WordPressShared', '~> 1.1.1-beta.4'
2222
pod 'wpxmlrpc', '~> 0.8'
2323

2424
## Third party libraries
2525
## =====================
2626
##
2727
pod '1PasswordExtension', '1.8.5'
28-
pod 'Alamofire', '4.7.2'
28+
pod 'Alamofire', '4.7.3'
2929
pod 'CocoaLumberjack', '3.4.2'
3030
pod 'GoogleSignInRepacked', '4.1.2'
3131
pod 'lottie-ios', '2.5.0'

Podfile.lock

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- 1PasswordExtension (1.8.5)
3-
- Alamofire (4.7.2)
3+
- Alamofire (4.7.3)
44
- CocoaLumberjack (3.4.2):
55
- CocoaLumberjack/Default (= 3.4.2)
66
- CocoaLumberjack/Extensions (= 3.4.2)
@@ -45,22 +45,22 @@ PODS:
4545
- Specta (1.0.7)
4646
- SVProgressHUD (2.2.5)
4747
- UIDeviceIdentifier (0.5.0)
48-
- WordPressKit (1.1):
49-
- Alamofire (~> 4.7)
48+
- WordPressKit (1.4.1-beta.3):
49+
- Alamofire (~> 4.7.3)
5050
- CocoaLumberjack (= 3.4.2)
5151
- NSObject-SafeExpectations (= 0.0.3)
5252
- UIDeviceIdentifier (~> 0.4)
53-
- WordPressShared (~> 1.0.3)
53+
- WordPressShared (~> 1.1.1-beta.4)
5454
- wpxmlrpc (= 0.8.3)
55-
- WordPressShared (1.0.8):
55+
- WordPressShared (1.1.1-beta.4):
5656
- CocoaLumberjack (~> 3.4)
5757
- FormatterKit/TimeIntervalFormatter (= 1.8.2)
5858
- WordPressUI (1.0.6)
5959
- wpxmlrpc (0.8.3)
6060

6161
DEPENDENCIES:
6262
- 1PasswordExtension (= 1.8.5)
63-
- Alamofire (= 4.7.2)
63+
- Alamofire (= 4.7.3)
6464
- CocoaLumberjack (= 3.4.2)
6565
- Expecta (= 1.0.6)
6666
- GoogleSignInRepacked (= 4.1.2)
@@ -73,8 +73,8 @@ DEPENDENCIES:
7373
- Specta (= 1.0.7)
7474
- SVProgressHUD (= 2.2.5)
7575
- UIDeviceIdentifier (~> 0.4)
76-
- WordPressKit (~> 1.0)
77-
- WordPressShared (~> 1.0)
76+
- WordPressKit (~> 1.4.1-beta.3)
77+
- WordPressShared (~> 1.1.1-beta.4)
7878
- WordPressUI (~> 1.0)
7979
- wpxmlrpc (~> 0.8)
8080

@@ -103,7 +103,7 @@ SPEC REPOS:
103103

104104
SPEC CHECKSUMS:
105105
1PasswordExtension: 0e95bdea64ec8ff2f4f693be5467a09fac42a83d
106-
Alamofire: e4fa87002c137ba2d8d634d2c51fabcda0d5c223
106+
Alamofire: c7287b6e5d7da964a70935e5db17046b7fde6568
107107
CocoaLumberjack: db7cc9e464771f12054c22ff6947c5a58d43a0fd
108108
Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
109109
FormatterKit: 4b8f29acc9b872d5d12a63efb560661e8f2e1b98
@@ -118,11 +118,11 @@ SPEC CHECKSUMS:
118118
Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
119119
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
120120
UIDeviceIdentifier: a959a6d4f51036b4180dd31fb26483a820f1cc46
121-
WordPressKit: a24baaa783c3a221f2d9a51c19318cbb27333373
122-
WordPressShared: 063e1e8b1a7aaf635abf17f091a2d235a068abdc
121+
WordPressKit: 1fecd89dc42115fe55640d49b9f6e905a94c6a70
122+
WordPressShared: fc613aa29351c73677c421daacb36eacf53f100d
123123
WordPressUI: af141587ec444f9af753a00605bd0d3f14d8d8a3
124124
wpxmlrpc: bfc572f62ce7ee897f6f38b098d2ba08732ecef4
125125

126-
PODFILE CHECKSUM: adec9882e25404ab01a7a461fcdd3ddd937d5ba6
126+
PODFILE CHECKSUM: 7ea7cc44c0d95a36ac49e9513022c014a975e8d5
127127

128128
COCOAPODS: 1.5.3

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# WordPressAuthenticator-iOS
2+
3+
WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps.
4+
5+
This framework encapsulates everything required to display the Authentication UI and perform authentication against WordPress.com and WordPress.org sites.
6+
7+
Plus: WordPress.com *signup* is supported.
8+
9+
## Integrating the Library with CocoaPods
10+
11+
WordPressAuthenticator is available through [CocoaPods](http://cocoapods.org). To install
12+
it, simply add the following line to your Podfile:
13+
14+
```bash
15+
pod "WordPressAuthenticator"
16+
```

WordPressAuthenticator.podspec

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "WordPressAuthenticator"
3-
s.version = "1.0.6"
3+
s.version = "1.1.0"
44
s.summary = "WordPressAuthenticator implements an easy and elegant way to authenticate your WordPress Apps."
55

66
s.description = <<-DESC
@@ -12,9 +12,9 @@ Pod::Spec.new do |s|
1212

1313
s.homepage = "http://apps.wordpress.com"
1414
s.license = "GPLv2"
15-
s.author = { "Jorge Leandro Perez" => "jorge.perez@automattic.com" }
15+
s.author = { "WordPress" => "mobile@automattic.com" }
1616
s.platform = :ios, "10.0"
17-
s.swift_version = '4.0'
17+
s.swift_version = '4.2'
1818
s.source = { :git => "https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git", :tag => s.version.to_s }
1919
s.source_files = 'WordPressAuthenticator/**/*.{h,m,swift}'
2020
s.private_header_files = "WordPressAuthenticator/Private/*.h"
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
2525
s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO' }
2626

2727
s.dependency '1PasswordExtension', '1.8.5'
28-
s.dependency 'Alamofire', '4.7.2'
28+
s.dependency 'Alamofire', '4.7.3'
2929
s.dependency 'CocoaLumberjack', '3.4.2'
3030
s.dependency 'lottie-ios', '2.5.0'
3131
s.dependency 'NSURL+IDN', '0.3'
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
3535
s.dependency 'Gridicons', '~> 0.15'
3636
s.dependency 'GoogleSignInRepacked', '4.1.2'
3737
s.dependency 'WordPressUI', '~> 1.0'
38-
s.dependency 'WordPressKit', '~> 1.0'
39-
s.dependency 'WordPressShared', '~> 1.0'
38+
s.dependency 'WordPressKit', '~> 1.4.1-beta.2'
39+
s.dependency 'WordPressShared', '~> 1.1.1-beta.4'
4040
s.dependency 'wpxmlrpc', '~> 0.8'
4141
end

WordPressAuthenticator.xcodeproj/project.pbxproj

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -617,10 +617,12 @@
617617
TargetAttributes = {
618618
B5ED78F3207E976500A8FD8C = {
619619
CreatedOnToolsVersion = 9.3;
620+
LastSwiftMigration = 1000;
620621
ProvisioningStyle = Automatic;
621622
};
622623
B5ED78FC207E976500A8FD8C = {
623624
CreatedOnToolsVersion = 9.3;
625+
LastSwiftMigration = 1000;
624626
ProvisioningStyle = Automatic;
625627
};
626628
};
@@ -1031,7 +1033,7 @@
10311033
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
10321034
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
10331035
SKIP_INSTALL = YES;
1034-
SWIFT_VERSION = 4.0;
1036+
SWIFT_VERSION = 4.2;
10351037
TARGETED_DEVICE_FAMILY = "1,2";
10361038
};
10371039
name = Debug;
@@ -1055,7 +1057,7 @@
10551057
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
10561058
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
10571059
SKIP_INSTALL = YES;
1058-
SWIFT_VERSION = 4.0;
1060+
SWIFT_VERSION = 4.2;
10591061
TARGETED_DEVICE_FAMILY = "1,2";
10601062
};
10611063
name = Release;
@@ -1070,7 +1072,7 @@
10701072
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10711073
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
10721074
PRODUCT_NAME = "$(TARGET_NAME)";
1073-
SWIFT_VERSION = 4.0;
1075+
SWIFT_VERSION = 4.2;
10741076
TARGETED_DEVICE_FAMILY = "1,2";
10751077
};
10761078
name = Debug;
@@ -1085,7 +1087,7 @@
10851087
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10861088
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
10871089
PRODUCT_NAME = "$(TARGET_NAME)";
1088-
SWIFT_VERSION = 4.0;
1090+
SWIFT_VERSION = 4.2;
10891091
TARGETED_DEVICE_FAMILY = "1,2";
10901092
};
10911093
name = Release;
@@ -1165,7 +1167,7 @@
11651167
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
11661168
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
11671169
SKIP_INSTALL = YES;
1168-
SWIFT_VERSION = 4.0;
1170+
SWIFT_VERSION = 4.2;
11691171
TARGETED_DEVICE_FAMILY = "1,2";
11701172
};
11711173
name = "Release-Internal";
@@ -1180,7 +1182,7 @@
11801182
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
11811183
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
11821184
PRODUCT_NAME = "$(TARGET_NAME)";
1183-
SWIFT_VERSION = 4.0;
1185+
SWIFT_VERSION = 4.2;
11841186
TARGETED_DEVICE_FAMILY = "1,2";
11851187
};
11861188
name = "Release-Internal";
@@ -1260,7 +1262,7 @@
12601262
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticator;
12611263
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
12621264
SKIP_INSTALL = YES;
1263-
SWIFT_VERSION = 4.0;
1265+
SWIFT_VERSION = 4.2;
12641266
TARGETED_DEVICE_FAMILY = "1,2";
12651267
};
12661268
name = "Release-Alpha";
@@ -1275,7 +1277,7 @@
12751277
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
12761278
PRODUCT_BUNDLE_IDENTIFIER = com.automattic.WordPressAuthenticatorTests;
12771279
PRODUCT_NAME = "$(TARGET_NAME)";
1278-
SWIFT_VERSION = 4.0;
1280+
SWIFT_VERSION = 4.2;
12791281
TARGETED_DEVICE_FAMILY = "1,2";
12801282
};
12811283
name = "Release-Alpha";

WordPressAuthenticator/Authenticator/WordPressAuthenticator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ import WordPressUI
126126

127127
let storyboard = UIStoryboard(name: "Login", bundle: bundle)
128128
if let controller = storyboard.instantiateInitialViewController() {
129-
if let childController = controller.childViewControllers.first as? LoginPrologueViewController {
129+
if let childController = controller.children.first as? LoginPrologueViewController {
130130
childController.loginFields.restrictToWPCom = restrictToWPCom
131131
childController.showCancel = showCancel
132132
}

WordPressAuthenticator/Extensions/String+Underline.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ extension String {
1616
let underlineForegroundColor = underlineColor ?? foregroundColor
1717

1818
let underlinedString = NSMutableAttributedString(string: firstPart, attributes: [.foregroundColor: foregroundColor])
19-
underlinedString.append(NSAttributedString(string: underlinePart, attributes: [.underlineStyle: NSUnderlineStyle.styleSingle.rawValue, .foregroundColor: underlineForegroundColor]))
19+
underlinedString.append(NSAttributedString(string: underlinePart, attributes: [.underlineStyle: NSUnderlineStyle.single.rawValue, .foregroundColor: underlineForegroundColor]))
2020
underlinedString.append(NSAttributedString(string: lastPart, attributes: [.foregroundColor: foregroundColor]))
2121

2222
return underlinedString

WordPressAuthenticator/Extensions/WPStyleGuide+Login.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extension WPStyleGuide {
3939
}
4040

4141
let onePasswordButton = UIButton(type: .custom)
42-
onePasswordButton.setImage(.onePasswordImage, for: UIControlState())
42+
onePasswordButton.setImage(.onePasswordImage, for: .normal)
4343
onePasswordButton.sizeToFit()
4444

4545
textField.rightView = onePasswordButton
@@ -56,7 +56,7 @@ extension WPStyleGuide {
5656
}
5757

5858
let onePasswordButton = UIButton(type: .custom)
59-
onePasswordButton.setImage(.onePasswordImage, for: UIControlState())
59+
onePasswordButton.setImage(.onePasswordImage, for: .normal)
6060
onePasswordButton.sizeToFit()
6161
onePasswordButton.setContentHuggingPriority(.required, for: .horizontal)
6262
onePasswordButton.setContentCompressionResistancePriority(.required, for: .horizontal)
@@ -88,7 +88,7 @@ extension WPStyleGuide {
8888
/// - note: iOS won't return UIFontWeightMedium for dynamic system font :(
8989
/// So instead get the dynamic font size, then ask for the non-dynamic font at that size
9090
///
91-
class func mediumWeightFont(forStyle style: UIFontTextStyle, maximumPointSize: CGFloat = WPStyleGuide.maxFontSize) -> UIFont {
91+
class func mediumWeightFont(forStyle style: UIFont.TextStyle, maximumPointSize: CGFloat = WPStyleGuide.maxFontSize) -> UIFont {
9292
let fontToGetSize = WPStyleGuide.fontForTextStyle(style)
9393
let maxAllowedFontSize = CGFloat.minimum(fontToGetSize.pointSize, maximumPointSize)
9494
return UIFont.systemFont(ofSize: maxAllowedFontSize, weight: .medium)

WordPressAuthenticator/NUX/NUXButton.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import WordPressUI
99
}
1010

1111
@objc let activityIndicator: UIActivityIndicatorView = {
12-
let indicator = UIActivityIndicatorView(activityIndicatorStyle: .white)
12+
let indicator = UIActivityIndicatorView(style: .white)
1313
indicator.hidesWhenStopped = true
1414
return indicator
1515
}()
@@ -68,7 +68,7 @@ import WordPressUI
6868
open override func awakeFromNib() {
6969
super.awakeFromNib()
7070
configureAppearance()
71-
activityIndicator.activityIndicatorViewStyle = .gray
71+
activityIndicator.style = .gray
7272
}
7373

7474
/// Setup: shorter reference for style

WordPressAuthenticator/NUX/NUXButtonViewController.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ open class NUXButtonViewController: UIViewController {
6161

6262
private func configure(button: NUXButton?, withConfig buttonConfig: NUXButtonConfig?) {
6363
if let buttonConfig = buttonConfig, let button = button {
64-
button.setTitle(buttonConfig.title, for: UIControlState())
64+
button.setTitle(buttonConfig.title, for: .normal)
6565
button.accessibilityIdentifier = buttonConfig.accessibilityIdentifier ?? accessibilityIdentifier(for: buttonConfig.title)
6666
button.isPrimary = buttonConfig.isPrimary
6767
button.isHidden = false
@@ -161,9 +161,9 @@ extension NUXButtonViewController {
161161
containerView.addSubview(view)
162162
containerView.pinSubviewToAllEdges(view)
163163

164-
willMove(toParentViewController: parentViewController)
165-
parentViewController.addChildViewController(self)
166-
didMove(toParentViewController: parentViewController)
164+
willMove(toParent: parentViewController)
165+
parentViewController.addChild(self)
166+
didMove(toParent: parentViewController)
167167
}
168168

169169
/// Returns a new NUXButtonViewController Instance

0 commit comments

Comments
 (0)