Skip to content

Commit f08d503

Browse files
committed
Remove dependency on MRX
1 parent d7725dc commit f08d503

File tree

8 files changed

+15
-49
lines changed

8 files changed

+15
-49
lines changed

Authenticator/Classes/OTPSegmentedControlCell.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2323
//
2424

25-
#import "MRXTableViewCell.h"
25+
@import UIKit;
2626

2727

28-
@interface OTPSegmentedControlCell : MRXTableViewCell
28+
@interface OTPSegmentedControlCell : UITableViewCell
2929

3030
@property (nonatomic, readonly) UISegmentedControl *segmentedControl;
3131

Authenticator/Classes/OTPTextFieldCell.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2323
//
2424

25-
#import "MRXTableViewCell.h"
25+
@import UIKit;
2626

2727

28-
@interface OTPTextFieldCell : MRXTableViewCell
28+
@interface OTPTextFieldCell : UITableViewCell
2929

3030
@property (nonatomic, readonly) UITextField *textField;
3131

Authenticator/Classes/OTPTokenCell.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@
2222
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2323
//
2424

25-
#import <MRX/MRXTableViewCell.h>
25+
@import UIKit;
2626
@class OTPToken;
2727

2828

29-
@interface OTPTokenCell : MRXTableViewCell
29+
@interface OTPTokenCell : UITableViewCell
3030

3131
@property (nonatomic, strong) OTPToken *token;
3232

Authenticator/Classes/OTPTokenEntryViewController.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
230230
- (OTPSegmentedControlCell *)tokenTypeCell
231231
{
232232
if (!_tokenTypeCell) {
233-
_tokenTypeCell = [OTPSegmentedControlCell cell];
233+
_tokenTypeCell = [OTPSegmentedControlCell new];
234234
[_tokenTypeCell.segmentedControl insertSegmentWithTitle:@"Time Based" atIndex:OTPTokenTypeIndexTimer animated:NO];
235235
[_tokenTypeCell.segmentedControl insertSegmentWithTitle:@"Counter Based" atIndex:OTPTokenTypeIndexCounter animated:NO];
236236
_tokenTypeCell.segmentedControl.selectedSegmentIndex = OTPTokenTypeIndexTimer;
@@ -241,7 +241,7 @@ - (OTPSegmentedControlCell *)tokenTypeCell
241241
- (OTPTextFieldCell *)issuerCell
242242
{
243243
if (!_issuerCell) {
244-
_issuerCell = [OTPTextFieldCell cell];
244+
_issuerCell = [OTPTextFieldCell new];
245245
_issuerCell.textLabel.text = @"Issuer";
246246
_issuerCell.textField.placeholder = @"Some Website";
247247
_issuerCell.textField.delegate = self;
@@ -253,7 +253,7 @@ - (OTPTextFieldCell *)issuerCell
253253
- (OTPTextFieldCell *)accountNameCell
254254
{
255255
if (!_accountNameCell) {
256-
_accountNameCell = [OTPTextFieldCell cell];
256+
_accountNameCell = [OTPTextFieldCell new];
257257
_accountNameCell.textLabel.text = @"Account Name";
258258
_accountNameCell.textField.placeholder = @"user@example.com";
259259
_accountNameCell.textField.delegate = self;
@@ -268,7 +268,7 @@ - (OTPTextFieldCell *)accountNameCell
268268
- (OTPTextFieldCell *)secretKeyCell
269269
{
270270
if (!_secretKeyCell) {
271-
_secretKeyCell = [OTPTextFieldCell cell];
271+
_secretKeyCell = [OTPTextFieldCell new];
272272
_secretKeyCell.textLabel.text = @"Secret Key";
273273
_secretKeyCell.textField.placeholder = @"•••• •••• •••• ••••";
274274
_secretKeyCell.textField.delegate = self;
@@ -282,7 +282,7 @@ - (OTPTextFieldCell *)secretKeyCell
282282
- (OTPSegmentedControlCell *)digitCountCell
283283
{
284284
if (!_digitCountCell) {
285-
_digitCountCell = [OTPSegmentedControlCell cell];
285+
_digitCountCell = [OTPSegmentedControlCell new];
286286
[_digitCountCell.segmentedControl insertSegmentWithTitle:@"6 Digits" atIndex:OTPTokenDigitsIndex6 animated:NO];
287287
[_digitCountCell.segmentedControl insertSegmentWithTitle:@"7 Digits" atIndex:OTPTokenDigitsIndex7 animated:NO];
288288
[_digitCountCell.segmentedControl insertSegmentWithTitle:@"8 Digits" atIndex:OTPTokenDigitsIndex8 animated:NO];
@@ -294,7 +294,7 @@ - (OTPSegmentedControlCell *)digitCountCell
294294
- (OTPSegmentedControlCell *)algorithmCell
295295
{
296296
if (!_algorithmCell) {
297-
_algorithmCell = [OTPSegmentedControlCell cell];
297+
_algorithmCell = [OTPSegmentedControlCell new];
298298
[_algorithmCell.segmentedControl insertSegmentWithTitle:@"SHA-1" atIndex:OTPTokenAlgorithmIndexSHA1 animated:NO];
299299
[_algorithmCell.segmentedControl insertSegmentWithTitle:@"SHA-256" atIndex:OTPTokenAlgorithmIndexSHA256 animated:NO];
300300
[_algorithmCell.segmentedControl insertSegmentWithTitle:@"SHA-512" atIndex:OTPTokenAlgorithmIndexSHA512 animated:NO];

Authenticator/Classes/OTPTokenListViewController.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ - (void)viewDidLoad
6161
self.title = @"Authenticator";
6262
self.view.backgroundColor = [UIColor otpBackgroundColor];
6363

64+
[self.tableView registerClass:[OTPTokenCell class] forCellReuseIdentifier:NSStringFromClass([OTPTokenCell class])];
65+
6466
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
6567
self.tableView.indicatorStyle = UIScrollViewIndicatorStyleWhite;
6668

@@ -127,7 +129,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
127129

128130
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
129131
{
130-
OTPTokenCell *cell = [OTPTokenCell cellForTableView:tableView];
132+
OTPTokenCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([OTPTokenCell class]) forIndexPath:indexPath];
131133
cell.token = self.tokenManager.tokens[(NSUInteger)indexPath.row];
132134
return cell;
133135
}

Authenticator/Resources/Settings.bundle/Acknowledgements.plist

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,6 @@
1616
<key>FooterText</key>
1717
<string>The MIT License (MIT)
1818
19-
Copyright (c) 2013 Matt Rubin
20-
21-
Permission is hereby granted, free of charge, to any person obtaining a copy of
22-
this software and associated documentation files (the "Software"), to deal in
23-
the Software without restriction, including without limitation the rights to
24-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
25-
the Software, and to permit persons to whom the Software is furnished to do so,
26-
subject to the following conditions:
27-
28-
The above copyright notice and this permission notice shall be included in all
29-
copies or substantial portions of the Software.
30-
31-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
32-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
33-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
34-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
35-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
36-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37-
</string>
38-
<key>Title</key>
39-
<string>MRX</string>
40-
<key>Type</key>
41-
<string>PSGroupSpecifier</string>
42-
</dict>
43-
<dict>
44-
<key>FooterText</key>
45-
<string>The MIT License (MIT)
46-
4719
Copyright (c) 2013-2014 Matt Rubin
4820
4921
Permission is hereby granted, free of charge, to any person obtaining a copy

Podfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ platform :ios, '7.0'
33
pod 'OneTimePassword', '~> 1.0'
44
pod 'SVProgressHUD', '~> 1.0'
55
pod 'UIColor+Categories', '~> 0.2'
6-
pod 'MRX', :git => 'https://github.com/mattrubin/MRX.git'
76

87
post_install do | installer |
98
require 'fileutils'

Podfile.lock

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,17 @@
11
PODS:
22
- Base32 (1.0.2)
3-
- MRX (0.0.1)
43
- OneTimePassword (1.0.0):
54
- Base32 (~> 1.0.2)
65
- SVProgressHUD (1.0)
76
- UIColor+Categories (0.2)
87

98
DEPENDENCIES:
10-
- MRX (from `https://github.com/mattrubin/MRX.git`)
119
- OneTimePassword (~> 1.0)
1210
- SVProgressHUD (~> 1.0)
1311
- UIColor+Categories (~> 0.2)
1412

15-
EXTERNAL SOURCES:
16-
MRX:
17-
:git: https://github.com/mattrubin/MRX.git
18-
1913
SPEC CHECKSUMS:
2014
Base32: a0ef6e90e721130c474cc970a4d98a6cbf16ce85
21-
MRX: e6a1bbf7c2f2b1349d039f2da0aa8da71fb08d9a
2215
OneTimePassword: 5948ec8303247b449532fc553f7e01defc0e72e6
2316
SVProgressHUD: 5034c6e22b8c2ca3e09402e48d41ed0340aa1c50
2417
UIColor+Categories: 9770206090196452ff5d115b3e3dbdfcdedbc2f3

0 commit comments

Comments
 (0)