Skip to content

Commit 6fa9110

Browse files
author
Jason Rodriguez
committed
updates to also include SPM bundle
1 parent 21469b7 commit 6fa9110

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

LTHPasscodeViewController/LTHPasscodeViewController.m

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@
1414

1515
#define LTHFailedAttemptLabelHeight [_failedAttemptLabel.text sizeWithAttributes: @{NSFontAttributeName : _labelFont}].height
1616

17+
//#ifndef LTHPasscodeViewControllerStrings
18+
//#define LTHPasscodeViewControllerStrings(key) \
19+
//NSString *localizedString = [[NSBundle bundleWithPath:[[NSBundle bundleForClass:[LTHPasscodeViewController class]] pathForResource:@"LTHPasscodeViewController" ofType:@"bundle"]] localizedStringForKey:(key) value:@"" table:_localizationTableName] \
20+
//printf(localizedString); \
21+
//if ([localizedString length] == 0) { \
22+
// printf([SWIFTPM_MODULE_BUNDLE localizedStringForKey: (key) value:@"" table:_localizationTableName]); \
23+
// return [SWIFTPM_MODULE_BUNDLE localizedStringForKey: (key) value:@"" table:_localizationTableName] \
24+
//} else { \
25+
// return localizedString \
26+
//}
27+
//#endif
28+
1729
#ifndef LTHPasscodeViewControllerStrings
1830
#define LTHPasscodeViewControllerStrings(key) \
19-
[[NSBundle bundleWithPath:[[NSBundle bundleForClass:[LTHPasscodeViewController class]] pathForResource:@"LTHPasscodeViewController" ofType:@"bundle"]] localizedStringForKey:(key) value:@"" table:_localizationTableName]
31+
[[[NSBundle bundleWithPath:[[NSBundle bundleForClass:[LTHPasscodeViewController class]] pathForResource:@"LTHPasscodeViewController" ofType:@"bundle"]] localizedStringForKey:(key) value:@"" table:_localizationTableName] length] == 0 ? [SWIFTPM_MODULE_BUNDLE localizedStringForKey: (key) value:@"" table:_localizationTableName] : [[NSBundle bundleWithPath:[[NSBundle bundleForClass:[LTHPasscodeViewController class]] pathForResource:@"LTHPasscodeViewController" ofType:@"bundle"]] localizedStringForKey:(key) value:@"" table:_localizationTableName]
2032
#endif
21-
2233
// MARK: Please read
2334
/*
2435
Using windows[0] instead of keyWindow due to an issue with UIAlertViews / UIActionSheets - displaying the lockscreen when an alertView / actionSheet is visible, or displaying one after the lockscreen is visible results in a few cases:
@@ -147,6 +158,7 @@ + (void)useKeychain:(BOOL)useKeychain {
147158

148159

149160
#pragma mark - Private methods
161+
150162
- (void)_close {
151163
if (_displayedAsLockScreen) [self _dismissMe];
152164
else [self _cancelAndDismissMe];

0 commit comments

Comments
 (0)