├── MacPass.plist ├── Makefile ├── README.md ├── Tweak.h ├── Tweak.xm ├── control ├── customimagepicker ├── CustomImagePicker.plist ├── CustomImagePicker.xm └── Makefile ├── layout └── Library │ └── Application Support │ └── MacPass │ ├── ProfilePicture.png │ ├── clear@2x.png │ ├── clear@3x.png │ ├── exit.png │ ├── respring.png │ ├── safemode.png │ ├── unlock@2x.png │ └── unlock@3x.png ├── macpassprefs ├── MACPASSPreferences.h ├── MACPASSPreferences.m ├── Makefile ├── Resources │ ├── CHANGELOG.png │ ├── CHANGELOG@2x.png │ ├── CHANGELOG@3x.png │ ├── CHECKMARK.png │ ├── CHECKMARK@2x.png │ ├── CHECKMARK@3x.png │ ├── Info.plist │ ├── PAYPAL.png │ ├── PAYPAL@2x.png │ ├── PAYPAL@3x.png │ ├── Root.plist │ ├── TWITTER.png │ ├── TWITTER@2x.png │ ├── TWITTER@3x.png │ ├── banner.png │ ├── changelogControllerIcon.png │ ├── headerIcon@2x.png │ ├── headerIcon@3x.png │ ├── icon@2x.png │ └── icon@3x.png └── entry.plist └── packages └── com.nahtedetihw.macpass_1.3_iphoneos-arm.deb /MacPass.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:13.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | DEBUG = 0 5 | 6 | FINALPACKAGE = 1 7 | 8 | PREFIX=$(THEOS)/toolchain/Xcode.xctoolchain/usr/bin/ 9 | 10 | SYSROOT=$(THEOS)/sdks/iphoneos14.0.sdk 11 | 12 | include $(THEOS)/makefiles/common.mk 13 | 14 | TWEAK_NAME = MacPass 15 | $(TWEAK_NAME)_FILES = Tweak.xm 16 | $(TWEAK_NAME)_EXTRA_FRAMEWORKS += Cephei 17 | $(TWEAK_NAME)_LIBRARIES += sparkcolourpicker imagepicker 18 | $(TWEAK_NAME)_CFLAGS = -fobjc-arc 19 | $(TWEAK_NAME)_FRAMEWORKS = UIKit 20 | 21 | SUBPROJECTS += macpassprefs 22 | SUBPROJECTS += customimagepicker 23 | 24 | after-install:: 25 | install.exec "sbreload" 26 | 27 | include $(THEOS_MAKE_PATH)/tweak.mk 28 | include $(THEOS_MAKE_PATH)/aggregate.mk -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![download](https://i.ibb.co/hV0ztHj/banner.png) 2 | 3 | 4 | # MacPass 5 | 6 | ## MacOS login screen for iOS! 7 | 8 | ### MacPass is confirmed to work on iOS 14, but could be compatible with iOS 13 as well but untested. 9 | 10 | * Join my Discord today to report any issues: https://discord.gg/64kVRNzKnF 11 | 12 | ### Source Code 13 | https://github.com/nahtedetihw/MacPass 14 | 15 | ### Follow 16 | 17 | * [ETHN](https://twitter.com/ethanwhited) - follow me for more up to date info, or ask me anything. 18 | 19 | * [Email](mailto:ethanwhited2208@gmail.com) - open to any questions or concerns. 20 | 21 | * [Repo](https://nahtedetihw.github.io) - Repo containing MacPass 22 | -------------------------------------------------------------------------------- /Tweak.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | #import 6 | #import 7 | #include 8 | 9 | @interface MTAlarm : NSObject 10 | @property (getter=isFiring,nonatomic,readonly) BOOL firing; 11 | @end 12 | 13 | @interface MTAlarmCache : NSObject 14 | @property(nonatomic, retain)MTAlarm* nextAlarm; 15 | @end 16 | 17 | @interface MTAlarmManager : NSObject 18 | @property(nonatomic, retain)MTAlarmCache* cache; 19 | @end 20 | 21 | @interface SBScheduledAlarmObserver : NSObject { 22 | MTAlarmManager* _alarmManager; 23 | } 24 | + (id)sharedInstance; 25 | @end 26 | 27 | @interface CSPresentationViewController : UIViewController 28 | @property (getter=isPresentingContent,nonatomic,readonly) BOOL presentingContent; 29 | @end 30 | 31 | @interface NCNotificationStructuredListViewController : UIViewController 32 | @property (nonatomic,readonly) BOOL hasVisibleContent; 33 | - (void)updateStartup; 34 | @end 35 | 36 | @interface UIPopoverPresentationController (Private) 37 | @property (assign,setter=_setPopoverBackgroundStyle:,nonatomic) long long _popoverBackgroundStyle; 38 | @property (assign,setter=_setBackgroundBlurDisabled:,nonatomic) BOOL _backgroundBlurDisabled; 39 | @property (assign,setter=_setShouldHideArrow:,getter=_shouldHideArrow,nonatomic) BOOL _shouldHideArrow; 40 | @property (setter=_setSourceOverlayView:,getter=_sourceOverlayView,nonatomic,retain) UIView * sourceOverlayView; 41 | -(void)setArrowBackgroundColor:(id)arg1 ; 42 | -(id)_backgroundView; 43 | -(Class)_defaultChromeViewClass; 44 | @end 45 | 46 | @interface RespringViewController : UIViewController 47 | @end 48 | 49 | @implementation RespringViewController 50 | - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller 51 | traitCollection:(UITraitCollection *)traitCollection { 52 | return UIModalPresentationNone; 53 | } 54 | @end 55 | 56 | @interface SafeModeViewController : UIViewController 57 | @end 58 | 59 | @implementation SafeModeViewController 60 | - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller 61 | traitCollection:(UITraitCollection *)traitCollection { 62 | return UIModalPresentationNone; 63 | } 64 | @end 65 | 66 | @interface _UIBackdropView : UIView 67 | -(id)initWithFrame:(CGRect)arg1 autosizesToFitSuperview:(BOOL)arg2 settings:(id)arg3 ; 68 | -(id)initWithSettings:(id)arg1 ; 69 | -(id)initWithStyle:(long long)arg1 ; 70 | - (void)setBlurFilterWithRadius:(float)arg1 blurQuality:(id)arg2 blurHardEdges:(int)arg3; 71 | - (void)setBlurFilterWithRadius:(float)arg1 blurQuality:(id)arg2; 72 | - (void)setBlurHardEdges:(int)arg1; 73 | - (void)setBlurQuality:(id)arg1; 74 | - (void)setBlurRadius:(float)arg1; 75 | - (void)setBlurRadiusSetOnce:(BOOL)arg1; 76 | - (void)setBlursBackground:(BOOL)arg1; 77 | - (void)setBlursWithHardEdges:(BOOL)arg1; 78 | @end 79 | 80 | @interface _UIBackdropViewSettings : NSObject 81 | @property (assign,getter=isEnabled,nonatomic) BOOL enabled; 82 | @property (assign,nonatomic) double blurRadius; 83 | @property (nonatomic,copy) NSString * blurQuality; 84 | @property (assign,nonatomic) BOOL usesBackdropEffectView; 85 | -(id)initWithDefaultValues; 86 | +(id)settingsForStyle:(long long)arg1 ; 87 | @end 88 | 89 | @interface CSPasscodeViewController : UIViewController 90 | @property (nonatomic, strong) _UIBackdropViewSettings *settingsPasscodeBackground; 91 | @property (nonatomic, strong) _UIBackdropView *blurViewPasscodeBackground; 92 | @property (nonatomic, strong) UIView *profilePictureContainerView; 93 | @property (nonatomic, strong) UIImageView *profilePictureView; 94 | @property (nonatomic, strong) UILabel *usernameLabel; 95 | @property (nonatomic, strong) UITextField *textField; 96 | @property (nonatomic, strong) UITapGestureRecognizer *tapGesture; 97 | @property (nonatomic, strong) UIButton *unlockButton; 98 | @property (nonatomic, strong) UIButton *clearButton; 99 | @property (nonatomic, strong) _UIBackdropViewSettings *settingsTextField; 100 | @property (nonatomic, strong) _UIBackdropView *blurViewTextField; 101 | @property (nonatomic, strong) UIButton *respringButton; 102 | @property (nonatomic, strong) _UIBackdropViewSettings *settingsRespring; 103 | @property (nonatomic, strong) _UIBackdropView *blurViewRespring; 104 | @property (nonatomic, strong) UILabel *respringLabel; 105 | @property (nonatomic, strong) UIButton *exitButton; 106 | @property (nonatomic, strong) _UIBackdropViewSettings *settingsExit; 107 | @property (nonatomic, strong) _UIBackdropView *blurViewExit; 108 | @property (nonatomic, strong) UILabel *exitLabel; 109 | @property (nonatomic, strong) UIButton *safeModeButton; 110 | @property (nonatomic, strong) _UIBackdropViewSettings *settingsSafeMode; 111 | @property (nonatomic, strong) _UIBackdropView *blurViewSafeMode; 112 | @property (nonatomic, strong) UILabel *safeModeLabel; 113 | @property (nonatomic, strong) NSTimer *searchTimer; 114 | - (void)attemptUnlock; 115 | - (void)autoUnlock; 116 | - (void)clearText; 117 | - (void)dismiss; 118 | - (void)unlockWithFaceID; 119 | - (void)exitPasscode; 120 | - (void)respring; 121 | - (void)safeMode; 122 | - (void)wrongPasscode; 123 | - (void)beginEditing; 124 | - (void)endEditing; 125 | - (void)respringShowPopup:(UIButton *)sender; 126 | - (void)respringNo; 127 | - (void)respringYes; 128 | - (void)safeModeShowPopup:(UIButton *)sender; 129 | - (void)safeModeNo; 130 | - (void)safeModeYes; 131 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string; 132 | -(void)textFieldDidChange :(UITextField *)textField; 133 | - (void) searchForKeyword:(NSTimer *)timer; 134 | - (void)unlockWithTouchID; 135 | @end 136 | 137 | @interface CSCoverSheetViewController : UIViewController 138 | @property (nonatomic,readonly) CSPresentationViewController * mainPagePresentationViewController; 139 | @property (assign,getter=isShowingMediaControls,nonatomic) BOOL showingMediaControls; 140 | @property (nonatomic,readonly) BOOL hasContentAboveCoverSheet; 141 | -(BOOL)_isShowingChargingModal; 142 | - (void)updateStartup; 143 | -(BOOL)_isRemoteContentPresentedInUnlockMode; 144 | -(BOOL)isHostingAnApp; 145 | @end 146 | 147 | @interface SBUIProudLockIconView : UIView 148 | - (void)passcodeVisible; 149 | - (void)passcodeNotVisible; 150 | @end 151 | 152 | @interface CSProudLockViewController : UIViewController 153 | - (void)passcodeVisible; 154 | - (void)passcodeNotVisible; 155 | @end 156 | 157 | @interface SBSimplePasscodeEntryFieldButton : UIButton 158 | -(void)setRevealed:(BOOL)arg1 animated:(BOOL)arg2; 159 | - (void)passcodeVisible; 160 | - (void)passcodeNotVisible; 161 | @end 162 | 163 | @interface SBUIPasscodeBiometricAuthenticationView : UIView 164 | @property (nonatomic, strong) UILabel *faceIDLabel; 165 | @end 166 | 167 | @interface SBUIPasscodeLockNumberPad : UIView 168 | -(void)setVisible:(BOOL)arg1 animated:(BOOL)arg2; 169 | - (void)passcodeVisible; 170 | - (void)passcodeNotVisible; 171 | @end 172 | 173 | @interface SBUIPasscodeLockViewWithKeypad : UIView 174 | @end 175 | 176 | @interface CSPasscodeBackgroundView : UIView 177 | - (void)passcodeVisible; 178 | - (void)passcodeNotVisible; 179 | @end 180 | 181 | @interface SBUISimpleFixedDigitPasscodeEntryField : UIView 182 | - (void)passcodeVisible; 183 | - (void)passcodeNotVisible; 184 | @end 185 | 186 | @interface SBLockScreenManager : NSObject 187 | @property (nonatomic,readonly) CSCoverSheetViewController * coverSheetViewController; 188 | + (id)sharedInstance; 189 | - (BOOL)isLockScreenVisible; 190 | - (BOOL)isUILocked; 191 | - (BOOL)unlockUIFromSource:(int)arg1 withOptions:(id)arg2; 192 | - (void)attemptUnlockWithPasscode:(id)arg1 finishUIUnlock:(BOOL)arg2 completion:(id)arg3; 193 | -(void)setPasscodeVisible:(BOOL)arg1 animated:(BOOL)arg2; 194 | -(BOOL)_isPasscodeVisible; 195 | -(void)attemptUnlockWithMesa; 196 | - (void)showMacPass; 197 | @end 198 | 199 | @interface SBUIPasscodeLockViewBase : UIView 200 | -(NSString *)passcode; 201 | - (void)savePasscode; 202 | @end 203 | 204 | @interface SBUIAlphanumericPasscodeEntryField : UIView 205 | @end 206 | 207 | @interface SBUIPasscodeTextField : UIView 208 | @end 209 | -------------------------------------------------------------------------------- /Tweak.xm: -------------------------------------------------------------------------------- 1 | #import "Tweak.h" 2 | 3 | // Some things were used from Diary by Litten 4 | // https://github.com/schneelittchen/Diary 5 | // https://twitter.com/schneelittchen 6 | 7 | static NSMutableDictionary *colorDictionary; 8 | 9 | static NSString *nsNotificationString = @"com.nahtedetihw.macpassprefs/preferences.changed"; 10 | 11 | HBPreferences *preferences; 12 | BOOL enabled; 13 | BOOL enableAutomaticUnlock; 14 | BOOL enableAutomaticUnlockFaceID; 15 | BOOL showOnStartup; 16 | BOOL startWithKeyboard; 17 | NSString *usernameString; 18 | NSData *profilePicture; 19 | NSInteger passcodeType; 20 | CGFloat blurOpacity; 21 | NSNumber *passcodeCharacters; 22 | UIViewController *respringPopController; 23 | UIViewController *safeModePopController; 24 | BOOL canShowStartup; 25 | BOOL isShowingMedia; 26 | BOOL isShowingNotifs; 27 | BOOL isShowingAlarm; 28 | BOOL isShowingCharging; 29 | BOOL isShowingApp; 30 | 31 | static bool isiPad() { 32 | if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) { 33 | return YES; 34 | } 35 | return NO; 36 | } 37 | 38 | static bool isBabyDevice() { 39 | if ([[UIScreen mainScreen] nativeBounds].size.height <= 1334) { 40 | return YES; 41 | } 42 | return NO; 43 | } 44 | 45 | 46 | %group MacPass 47 | 48 | %hook NCNotificationStructuredListViewController 49 | - (void)viewDidLoad { 50 | %orig; 51 | 52 | NSTimer *nowPlayingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(updateStartup) userInfo:nil repeats:YES]; 53 | [[NSRunLoop mainRunLoop] addTimer:nowPlayingTimer forMode:NSDefaultRunLoopMode]; 54 | } 55 | 56 | %new 57 | - (void)updateStartup { 58 | if (self.hasVisibleContent == YES) { 59 | isShowingNotifs = YES; 60 | } else { 61 | isShowingNotifs = NO; 62 | } 63 | } 64 | %end 65 | 66 | %hook SBLockScreenManager 67 | -(void)_handleBacklightLevelWillChange:(id)arg1 { 68 | %orig; 69 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1.0 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{ 70 | [self showMacPass]; 71 | }); 72 | } 73 | 74 | %new 75 | - (void)showMacPass { 76 | if (isShowingMedia == YES) return; 77 | if (isShowingNotifs == YES) return; 78 | if (isShowingAlarm == YES) return; 79 | if (isShowingCharging == YES) return; 80 | if (isShowingApp == YES) return; 81 | if (showOnStartup && [self isLockScreenVisible] && [self _isPasscodeVisible] == NO) [self setPasscodeVisible:YES animated:YES]; 82 | } 83 | %end 84 | 85 | %hook CSCoverSheetViewController 86 | - (void)viewDidLoad { 87 | %orig; 88 | 89 | NSTimer *nowPlayingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(updateStartup) userInfo:nil repeats:YES]; 90 | [[NSRunLoop mainRunLoop] addTimer:nowPlayingTimer forMode:NSDefaultRunLoopMode]; 91 | } 92 | 93 | -(void)_transitionChargingViewToVisible:(BOOL)arg1 showBattery:(BOOL)arg2 animated:(BOOL)arg3 { 94 | %orig; 95 | if (arg1 == YES) { 96 | isShowingCharging = YES; 97 | } else { 98 | isShowingCharging = NO; 99 | } 100 | } 101 | 102 | %new 103 | - (void)updateStartup { 104 | if (self.showingMediaControls == YES) { 105 | isShowingMedia = YES; 106 | } else { 107 | isShowingMedia = NO; 108 | } 109 | if (self.isHostingAnApp == YES) { 110 | isShowingApp = YES; 111 | } else { 112 | isShowingApp = NO; 113 | } 114 | if ([[[[[%c(SBScheduledAlarmObserver) sharedInstance] valueForKey:@"_alarmManager"] cache] nextAlarm] isFiring] == YES) { 115 | isShowingAlarm = YES; 116 | } else { 117 | isShowingAlarm = NO; 118 | } 119 | } 120 | %end 121 | 122 | %hook CSLockScreenSettings 123 | -(BOOL)autoDismissUnlockedLockScreen { 124 | if (enableAutomaticUnlockFaceID) { 125 | if (isShowingMedia == YES) return NO; 126 | if (isShowingNotifs == YES) return NO; 127 | if (isShowingAlarm == YES) return NO; 128 | if (isShowingCharging == YES) return NO; 129 | if (isShowingApp == YES) return NO; 130 | return YES; 131 | } 132 | return %orig; 133 | } 134 | %end 135 | 136 | %hook CSPasscodeViewController 137 | %property (nonatomic, strong) _UIBackdropViewSettings *settingsPasscodeBackground; 138 | %property (nonatomic, strong) _UIBackdropView *blurViewPasscodeBackground; 139 | %property (nonatomic, strong) UIView *profilePictureContainerView; 140 | %property (nonatomic, strong) UIImageView *profilePictureView; 141 | %property (nonatomic, strong) UILabel *usernameLabel; 142 | %property (nonatomic, strong) UITextField *textField; 143 | %property (nonatomic, strong) UITapGestureRecognizer *tapGesture; 144 | %property (nonatomic, strong) UIButton *unlockButton; 145 | %property (nonatomic, strong) UIButton *clearButton; 146 | %property (nonatomic, strong) _UIBackdropViewSettings *settingsTextField; 147 | %property (nonatomic, strong) _UIBackdropView *blurViewTextField; 148 | %property (nonatomic, strong) UIButton *respringButton; 149 | %property (nonatomic, strong) _UIBackdropViewSettings *settingsRespring; 150 | %property (nonatomic, strong) _UIBackdropView *blurViewRespring; 151 | %property (nonatomic, strong) UILabel *respringLabel; 152 | %property (nonatomic, strong) UIButton *exitButton; 153 | %property (nonatomic, strong) _UIBackdropViewSettings *settingsExit; 154 | %property (nonatomic, strong) _UIBackdropView *blurViewExit; 155 | %property (nonatomic, strong) UILabel *exitLabel; 156 | %property (nonatomic, strong) UIButton *safeModeButton; 157 | %property (nonatomic, strong) _UIBackdropViewSettings *settingsSafeMode; 158 | %property (nonatomic, strong) _UIBackdropView *blurViewSafeMode; 159 | %property (nonatomic, strong) UILabel *safeModeLabel; 160 | %property (nonatomic, strong) NSTimer *searchTimer; 161 | - (void)viewDidLoad { 162 | %orig; 163 | 164 | self.view.alpha = 0; 165 | 166 | self.settingsPasscodeBackground = [_UIBackdropViewSettings settingsForStyle:2]; 167 | 168 | self.blurViewPasscodeBackground = [[_UIBackdropView alloc] initWithSettings:self.settingsPasscodeBackground]; 169 | self.blurViewPasscodeBackground.frame = self.view.frame; 170 | self.blurViewPasscodeBackground.alpha = blurOpacity; 171 | self.blurViewPasscodeBackground.clipsToBounds = YES; 172 | self.view.clipsToBounds = YES; 173 | self.blurViewPasscodeBackground.userInteractionEnabled = NO; 174 | [self.view insertSubview:self.blurViewPasscodeBackground atIndex:0]; 175 | 176 | self.blurViewPasscodeBackground.translatesAutoresizingMaskIntoConstraints = false; 177 | [self.blurViewPasscodeBackground.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor constant:0].active = YES; 178 | [self.blurViewPasscodeBackground.leftAnchor constraintEqualToAnchor:self.view.leftAnchor constant:0].active = YES; 179 | [self.blurViewPasscodeBackground.rightAnchor constraintEqualToAnchor:self.view.rightAnchor constant:0].active = YES; 180 | [self.blurViewPasscodeBackground.topAnchor constraintEqualToAnchor:self.view.topAnchor constant:0].active = YES; 181 | 182 | if (isBabyDevice()) { 183 | self.profilePictureContainerView = [[UIView alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,120,120)]; 184 | } else { 185 | self.profilePictureContainerView = [[UIView alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,175,175)]; 186 | } 187 | self.profilePictureContainerView.layer.masksToBounds = NO; 188 | if (self.profilePictureView.image != nil) { 189 | self.profilePictureContainerView.layer.shadowOffset = CGSizeMake(0, 10); 190 | self.profilePictureContainerView.layer.shadowRadius = 6; 191 | self.profilePictureContainerView.layer.shadowOpacity = 0.1; 192 | } 193 | [self.view addSubview:self.profilePictureContainerView]; 194 | 195 | if (isBabyDevice() == YES) { 196 | self.profilePictureContainerView.translatesAutoresizingMaskIntoConstraints = false; 197 | [self.profilePictureContainerView.widthAnchor constraintEqualToConstant:120].active = true; 198 | [self.profilePictureContainerView.heightAnchor constraintEqualToConstant:120].active = true; 199 | [self.profilePictureContainerView.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 200 | [self.profilePictureContainerView.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-190].active = true; 201 | } else { 202 | self.profilePictureContainerView.translatesAutoresizingMaskIntoConstraints = false; 203 | [self.profilePictureContainerView.widthAnchor constraintEqualToConstant:175].active = true; 204 | [self.profilePictureContainerView.heightAnchor constraintEqualToConstant:175].active = true; 205 | [self.profilePictureContainerView.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 206 | [self.profilePictureContainerView.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-190].active = true; 207 | } 208 | 209 | if (isBabyDevice()) { 210 | self.profilePictureView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,120,120)]; 211 | } else { 212 | self.profilePictureView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,175,175)]; 213 | } 214 | self.profilePictureView.image = [UIImage imageWithData:profilePicture]; 215 | self.profilePictureView.layer.masksToBounds = YES; 216 | self.profilePictureView.layer.cornerRadius = self.profilePictureView.frame.size.height/2; 217 | if (self.profilePictureView.image != nil) { 218 | self.profilePictureView.layer.borderWidth = 0.2; 219 | self.profilePictureView.layer.borderColor = [[UIColor whiteColor] colorWithAlphaComponent:0.4].CGColor; 220 | } 221 | self.profilePictureView.contentMode = UIViewContentModeScaleAspectFill; 222 | [self.profilePictureContainerView addSubview:self.profilePictureView]; 223 | 224 | if (isBabyDevice() == YES) { 225 | self.profilePictureView.translatesAutoresizingMaskIntoConstraints = false; 226 | [self.profilePictureView.widthAnchor constraintEqualToConstant:120].active = true; 227 | [self.profilePictureView.heightAnchor constraintEqualToConstant:120].active = true; 228 | [self.profilePictureView.centerXAnchor constraintEqualToAnchor:self.profilePictureContainerView.centerXAnchor constant:0].active = true; 229 | [self.profilePictureView.centerYAnchor constraintEqualToAnchor:self.profilePictureContainerView.centerYAnchor constant:0].active = true; 230 | } else { 231 | self.profilePictureView.translatesAutoresizingMaskIntoConstraints = false; 232 | [self.profilePictureView.widthAnchor constraintEqualToConstant:175].active = true; 233 | [self.profilePictureView.heightAnchor constraintEqualToConstant:175].active = true; 234 | [self.profilePictureView.centerXAnchor constraintEqualToAnchor:self.profilePictureContainerView.centerXAnchor constant:0].active = true; 235 | [self.profilePictureView.centerYAnchor constraintEqualToAnchor:self.profilePictureContainerView.centerYAnchor constant:0].active = true; 236 | } 237 | 238 | self.usernameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,200,40)]; 239 | self.usernameLabel.text = usernameString; 240 | self.usernameLabel.textAlignment = NSTextAlignmentCenter; 241 | self.usernameLabel.font = [UIFont boldSystemFontOfSize:24]; 242 | self.usernameLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 243 | [self.view addSubview:self.usernameLabel]; 244 | 245 | if (isBabyDevice() == YES) { 246 | self.usernameLabel.translatesAutoresizingMaskIntoConstraints = false; 247 | [self.usernameLabel.widthAnchor constraintEqualToConstant:150].active = true; 248 | [self.usernameLabel.heightAnchor constraintEqualToConstant:30].active = true; 249 | [self.usernameLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 250 | [self.usernameLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-100].active = true; 251 | } else { 252 | self.usernameLabel.translatesAutoresizingMaskIntoConstraints = false; 253 | [self.usernameLabel.widthAnchor constraintEqualToConstant:200].active = true; 254 | [self.usernameLabel.heightAnchor constraintEqualToConstant:40].active = true; 255 | [self.usernameLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 256 | [self.usernameLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-70].active = true; 257 | } 258 | 259 | self.tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismiss)]; 260 | [self.tapGesture setNumberOfTapsRequired:1]; 261 | [self.tapGesture setNumberOfTouchesRequired:1]; 262 | [self.view addGestureRecognizer:self.tapGesture]; 263 | 264 | if (isBabyDevice()) { 265 | self.textField = [[UITextField alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y, 180, 40)]; 266 | } else { 267 | self.textField = [[UITextField alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y, 200, 40)]; 268 | } 269 | 270 | self.textField.placeholder = @"Enter Passcode"; 271 | self.textField.textAlignment = NSTextAlignmentCenter; 272 | self.textField.delegate = self; 273 | if (passcodeType == 0) { 274 | if (isiPad() == YES) { 275 | self.textField.keyboardType = UIKeyboardTypeDecimalPad; 276 | } else { 277 | self.textField.keyboardType = UIKeyboardTypeNumberPad; 278 | } 279 | } else if (passcodeType == 1) { 280 | self.textField.keyboardType = UIKeyboardTypeASCIICapable; 281 | } 282 | 283 | if (enableAutomaticUnlock) [self.textField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged]; 284 | 285 | [self.textField setAttributedPlaceholder:[[NSAttributedString alloc] initWithString:@"Enter Passcode" attributes:@{NSForegroundColorAttributeName:[[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.2], NSFontAttributeName : [UIFont boldSystemFontOfSize:16.0]}]]; 286 | [[UITextField appearance] setTintColor:[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]]; 287 | self.textField.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 288 | self.textField.clearsOnBeginEditing = NO; 289 | [self.textField setSecureTextEntry:YES]; 290 | 291 | self.unlockButton = [UIButton buttonWithType:UIButtonTypeCustom]; 292 | [self.unlockButton setImage:[[UIImage imageWithContentsOfFile:@"/Library/Application Support/MacPass/unlock.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 293 | [self.unlockButton addTarget:self action:@selector(attemptUnlock) 294 | forControlEvents:UIControlEventTouchUpInside]; 295 | self.unlockButton.tintColor = [[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.5]; 296 | 297 | self.textField.rightView = self.unlockButton; 298 | self.textField.rightViewMode = UITextFieldViewModeAlways; 299 | 300 | self.clearButton = [UIButton buttonWithType:UIButtonTypeCustom]; 301 | UIImage *clearImage = [[UIImage imageWithContentsOfFile:@"/Library/Application Support/MacPass/clear.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; 302 | [self.clearButton setImage:clearImage forState:UIControlStateNormal]; 303 | [self.clearButton addTarget:self action:@selector(clearText) 304 | forControlEvents:UIControlEventTouchUpInside]; 305 | self.clearButton.tintColor = [[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.5]; 306 | 307 | self.textField.leftView = self.clearButton; 308 | self.textField.leftViewMode = UITextFieldViewModeAlways; 309 | 310 | [self.view addSubview:self.textField]; 311 | 312 | if (isBabyDevice() == YES) { 313 | self.textField.translatesAutoresizingMaskIntoConstraints = false; 314 | [self.textField.widthAnchor constraintEqualToConstant:180].active = true; 315 | [self.textField.heightAnchor constraintEqualToConstant:40].active = true; 316 | [self.textField.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 317 | [self.textField.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-40].active = true; 318 | } else { 319 | self.textField.translatesAutoresizingMaskIntoConstraints = false; 320 | [self.textField.widthAnchor constraintEqualToConstant:200].active = true; 321 | [self.textField.heightAnchor constraintEqualToConstant:40].active = true; 322 | [self.textField.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 323 | [self.textField.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:-10].active = true; 324 | } 325 | 326 | self.settingsTextField = [_UIBackdropViewSettings settingsForStyle:4005]; 327 | 328 | self.blurViewTextField = [[_UIBackdropView alloc] initWithSettings:self.settingsTextField]; 329 | self.blurViewTextField.frame = self.textField.frame; 330 | self.blurViewTextField.layer.masksToBounds = YES; 331 | self.blurViewTextField.layer.cornerRadius = self.textField.frame.size.height/2; 332 | [self.textField insertSubview:self.blurViewTextField atIndex:0]; 333 | 334 | if (isBabyDevice()) { 335 | self.blurViewTextField.translatesAutoresizingMaskIntoConstraints = false; 336 | [self.blurViewTextField.widthAnchor constraintEqualToConstant:180].active = true; 337 | [self.blurViewTextField.heightAnchor constraintEqualToConstant:40].active = true; 338 | [self.blurViewTextField.centerXAnchor constraintEqualToAnchor:self.textField.centerXAnchor constant:0].active = true; 339 | [self.blurViewTextField.centerYAnchor constraintEqualToAnchor:self.textField.centerYAnchor constant:0].active = true; 340 | } else { 341 | self.blurViewTextField.translatesAutoresizingMaskIntoConstraints = false; 342 | [self.blurViewTextField.widthAnchor constraintEqualToConstant:200].active = true; 343 | [self.blurViewTextField.heightAnchor constraintEqualToConstant:40].active = true; 344 | [self.blurViewTextField.centerXAnchor constraintEqualToAnchor:self.textField.centerXAnchor constant:0].active = true; 345 | [self.blurViewTextField.centerYAnchor constraintEqualToAnchor:self.textField.centerYAnchor constant:0].active = true; 346 | } 347 | 348 | self.respringButton = [UIButton buttonWithType:UIButtonTypeCustom]; 349 | [self.respringButton setBackgroundImage:[[UIImage imageWithContentsOfFile:@"/Library/Application Support/MacPass/respring.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 350 | self.respringButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 351 | self.respringButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 352 | [self.respringButton setContentMode:UIViewContentModeCenter]; 353 | [self.respringButton addTarget:self action:@selector(respringShowPopup:) 354 | forControlEvents:UIControlEventTouchUpInside]; 355 | if (isBabyDevice()) { 356 | self.respringButton.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 357 | } else { 358 | self.respringButton.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 359 | } 360 | self.respringButton.layer.masksToBounds = YES; 361 | self.respringButton.layer.cornerRadius = self.respringButton.frame.size.height/2; 362 | self.respringButton.tintColor = [[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.5]; 363 | [self.view addSubview:self.respringButton]; 364 | 365 | if (isBabyDevice() == YES) { 366 | self.respringButton.translatesAutoresizingMaskIntoConstraints = false; 367 | [self.respringButton.widthAnchor constraintEqualToConstant:40].active = true; 368 | [self.respringButton.heightAnchor constraintEqualToConstant:40].active = true; 369 | [self.respringButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 370 | [self.respringButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 371 | } else { 372 | self.respringButton.translatesAutoresizingMaskIntoConstraints = false; 373 | [self.respringButton.widthAnchor constraintEqualToConstant:50].active = true; 374 | [self.respringButton.heightAnchor constraintEqualToConstant:50].active = true; 375 | [self.respringButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 376 | [self.respringButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 377 | } 378 | 379 | self.settingsRespring = [_UIBackdropViewSettings settingsForStyle:4005]; 380 | 381 | self.blurViewRespring = [[_UIBackdropView alloc] initWithSettings:self.settingsRespring]; 382 | if (isBabyDevice()) { 383 | self.blurViewRespring.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 384 | } else { 385 | self.blurViewRespring.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 386 | } 387 | self.blurViewRespring.layer.masksToBounds = YES; 388 | self.blurViewRespring.layer.cornerRadius = self.respringButton.frame.size.height/2; 389 | [self.view insertSubview:self.blurViewRespring belowSubview:self.respringButton]; 390 | 391 | if (isBabyDevice() == YES) { 392 | self.blurViewRespring.translatesAutoresizingMaskIntoConstraints = false; 393 | [self.blurViewRespring.widthAnchor constraintEqualToConstant:40].active = true; 394 | [self.blurViewRespring.heightAnchor constraintEqualToConstant:40].active = true; 395 | [self.blurViewRespring.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 396 | [self.blurViewRespring.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 397 | } else { 398 | self.blurViewRespring.translatesAutoresizingMaskIntoConstraints = false; 399 | [self.blurViewRespring.widthAnchor constraintEqualToConstant:50].active = true; 400 | [self.blurViewRespring.heightAnchor constraintEqualToConstant:50].active = true; 401 | [self.blurViewRespring.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 402 | [self.blurViewRespring.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 403 | } 404 | 405 | self.respringLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,80,20)]; 406 | self.respringLabel.text = @"Respring"; 407 | self.respringLabel.textAlignment = NSTextAlignmentCenter; 408 | self.respringLabel.font = [UIFont boldSystemFontOfSize:12]; 409 | self.respringLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 410 | [self.view addSubview:self.respringLabel]; 411 | 412 | if (isBabyDevice()) { 413 | self.respringLabel.translatesAutoresizingMaskIntoConstraints = false; 414 | [self.respringLabel.widthAnchor constraintEqualToConstant:80].active = true; 415 | [self.respringLabel.heightAnchor constraintEqualToConstant:20].active = true; 416 | [self.respringLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 417 | [self.respringLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 418 | } else { 419 | self.respringLabel.translatesAutoresizingMaskIntoConstraints = false; 420 | [self.respringLabel.widthAnchor constraintEqualToConstant:80].active = true; 421 | [self.respringLabel.heightAnchor constraintEqualToConstant:20].active = true; 422 | [self.respringLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:0].active = true; 423 | [self.respringLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:250].active = true; 424 | } 425 | 426 | self.exitButton = [UIButton buttonWithType:UIButtonTypeCustom]; 427 | [self.exitButton setBackgroundImage:[[UIImage imageWithContentsOfFile:@"/Library/Application Support/MacPass/exit.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 428 | self.exitButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 429 | self.exitButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 430 | [self.exitButton setContentMode:UIViewContentModeCenter]; 431 | [self.exitButton addTarget:self action:@selector(exitPasscode) 432 | forControlEvents:UIControlEventTouchUpInside]; 433 | if (isBabyDevice()) { 434 | self.exitButton.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 435 | } else { 436 | self.exitButton.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 437 | } 438 | self.exitButton.layer.masksToBounds = YES; 439 | self.exitButton.layer.cornerRadius = self.exitButton.frame.size.height/2; 440 | self.exitButton.tintColor = [[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.5]; 441 | [self.view addSubview:self.exitButton]; 442 | 443 | if (isBabyDevice() == YES) { 444 | self.exitButton.translatesAutoresizingMaskIntoConstraints = false; 445 | [self.exitButton.widthAnchor constraintEqualToConstant:40].active = true; 446 | [self.exitButton.heightAnchor constraintEqualToConstant:40].active = true; 447 | [self.exitButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-80].active = true; 448 | [self.exitButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 449 | } else { 450 | self.exitButton.translatesAutoresizingMaskIntoConstraints = false; 451 | [self.exitButton.widthAnchor constraintEqualToConstant:50].active = true; 452 | [self.exitButton.heightAnchor constraintEqualToConstant:50].active = true; 453 | [self.exitButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-100].active = true; 454 | [self.exitButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 455 | } 456 | 457 | self.settingsExit = [_UIBackdropViewSettings settingsForStyle:4005]; 458 | 459 | self.blurViewExit = [[_UIBackdropView alloc] initWithSettings:self.settingsExit]; 460 | if (isBabyDevice()) { 461 | self.blurViewExit.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 462 | } else { 463 | self.blurViewExit.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 464 | } 465 | self.blurViewExit.layer.masksToBounds = YES; 466 | self.blurViewExit.layer.cornerRadius = self.exitButton.frame.size.height/2; 467 | [self.view insertSubview:self.blurViewExit belowSubview:self.exitButton]; 468 | 469 | if (isBabyDevice() == YES) { 470 | self.blurViewExit.translatesAutoresizingMaskIntoConstraints = false; 471 | [self.blurViewExit.widthAnchor constraintEqualToConstant:40].active = true; 472 | [self.blurViewExit.heightAnchor constraintEqualToConstant:40].active = true; 473 | [self.blurViewExit.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-80].active = true; 474 | [self.blurViewExit.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 475 | } else { 476 | self.blurViewExit.translatesAutoresizingMaskIntoConstraints = false; 477 | [self.blurViewExit.widthAnchor constraintEqualToConstant:50].active = true; 478 | [self.blurViewExit.heightAnchor constraintEqualToConstant:50].active = true; 479 | [self.blurViewExit.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-100].active = true; 480 | [self.blurViewExit.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 481 | } 482 | 483 | self.exitLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,80,20)]; 484 | self.exitLabel.text = @"Go Back"; 485 | self.exitLabel.textAlignment = NSTextAlignmentCenter; 486 | self.exitLabel.font = [UIFont boldSystemFontOfSize:12]; 487 | self.exitLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 488 | [self.view addSubview:self.exitLabel]; 489 | 490 | if (isBabyDevice()) { 491 | self.exitLabel.translatesAutoresizingMaskIntoConstraints = false; 492 | [self.exitLabel.widthAnchor constraintEqualToConstant:80].active = true; 493 | [self.exitLabel.heightAnchor constraintEqualToConstant:20].active = true; 494 | [self.exitLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-80].active = true; 495 | [self.exitLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 496 | } else { 497 | self.exitLabel.translatesAutoresizingMaskIntoConstraints = false; 498 | [self.exitLabel.widthAnchor constraintEqualToConstant:80].active = true; 499 | [self.exitLabel.heightAnchor constraintEqualToConstant:20].active = true; 500 | [self.exitLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:-100].active = true; 501 | [self.exitLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:250].active = true; 502 | } 503 | 504 | self.safeModeButton = [UIButton buttonWithType:UIButtonTypeCustom]; 505 | [self.safeModeButton setBackgroundImage:[[UIImage imageWithContentsOfFile:@"/Library/Application Support/MacPass/safemode.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 506 | self.safeModeButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 507 | self.safeModeButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 508 | [self.safeModeButton setContentMode:UIViewContentModeCenter]; 509 | [self.safeModeButton addTarget:self action:@selector(safeModeShowPopup:) 510 | forControlEvents:UIControlEventTouchUpInside]; 511 | if (isBabyDevice()) { 512 | self.safeModeButton.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 513 | } else { 514 | self.safeModeButton.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 515 | } 516 | self.safeModeButton.layer.masksToBounds = YES; 517 | self.safeModeButton.layer.cornerRadius = self.safeModeButton.frame.size.height/2; 518 | self.safeModeButton.tintColor = [[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] colorWithAlphaComponent:0.5]; 519 | [self.view addSubview:self.safeModeButton]; 520 | 521 | if (isBabyDevice() == YES) { 522 | self.safeModeButton.translatesAutoresizingMaskIntoConstraints = false; 523 | [self.safeModeButton.widthAnchor constraintEqualToConstant:40].active = true; 524 | [self.safeModeButton.heightAnchor constraintEqualToConstant:40].active = true; 525 | [self.safeModeButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:80].active = true; 526 | [self.safeModeButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 527 | } else { 528 | self.safeModeButton.translatesAutoresizingMaskIntoConstraints = false; 529 | [self.safeModeButton.widthAnchor constraintEqualToConstant:50].active = true; 530 | [self.safeModeButton.heightAnchor constraintEqualToConstant:50].active = true; 531 | [self.safeModeButton.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:100].active = true; 532 | [self.safeModeButton.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 533 | } 534 | 535 | self.settingsSafeMode = [_UIBackdropViewSettings settingsForStyle:4005]; 536 | 537 | self.blurViewSafeMode = [[_UIBackdropView alloc] initWithSettings:self.settingsSafeMode]; 538 | if (isBabyDevice()) { 539 | self.blurViewSafeMode.frame = CGRectMake(self.view.center.x,self.view.center.y,40,40); 540 | } else { 541 | self.blurViewSafeMode.frame = CGRectMake(self.view.center.x,self.view.center.y,50,50); 542 | } 543 | self.blurViewSafeMode.layer.masksToBounds = YES; 544 | self.blurViewSafeMode.layer.cornerRadius = self.safeModeButton.frame.size.height/2; 545 | [self.view insertSubview:self.blurViewSafeMode belowSubview:self.safeModeButton]; 546 | 547 | if (isBabyDevice() == YES) { 548 | self.blurViewSafeMode.translatesAutoresizingMaskIntoConstraints = false; 549 | [self.blurViewSafeMode.widthAnchor constraintEqualToConstant:40].active = true; 550 | [self.blurViewSafeMode.heightAnchor constraintEqualToConstant:40].active = true; 551 | [self.blurViewSafeMode.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:80].active = true; 552 | [self.blurViewSafeMode.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:150].active = true; 553 | } else { 554 | self.blurViewSafeMode.translatesAutoresizingMaskIntoConstraints = false; 555 | [self.blurViewSafeMode.widthAnchor constraintEqualToConstant:50].active = true; 556 | [self.blurViewSafeMode.heightAnchor constraintEqualToConstant:50].active = true; 557 | [self.blurViewSafeMode.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:100].active = true; 558 | [self.blurViewSafeMode.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 559 | } 560 | 561 | self.safeModeLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.center.x,self.view.center.y,80,20)]; 562 | self.safeModeLabel.text = @"Safe Mode"; 563 | self.safeModeLabel.textAlignment = NSTextAlignmentCenter; 564 | self.safeModeLabel.font = [UIFont boldSystemFontOfSize:12]; 565 | self.safeModeLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 566 | [self.view addSubview:self.safeModeLabel]; 567 | 568 | if (isBabyDevice()) { 569 | self.safeModeLabel.translatesAutoresizingMaskIntoConstraints = false; 570 | [self.safeModeLabel.widthAnchor constraintEqualToConstant:80].active = true; 571 | [self.safeModeLabel.heightAnchor constraintEqualToConstant:20].active = true; 572 | [self.safeModeLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:80].active = true; 573 | [self.safeModeLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:200].active = true; 574 | } else { 575 | self.safeModeLabel.translatesAutoresizingMaskIntoConstraints = false; 576 | [self.safeModeLabel.widthAnchor constraintEqualToConstant:80].active = true; 577 | [self.safeModeLabel.heightAnchor constraintEqualToConstant:20].active = true; 578 | [self.safeModeLabel.centerXAnchor constraintEqualToAnchor:self.view.centerXAnchor constant:100].active = true; 579 | [self.safeModeLabel.centerYAnchor constraintEqualToAnchor:self.view.centerYAnchor constant:250].active = true; 580 | } 581 | 582 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(unlockWithFaceID) name:@"MacPassPasscodeAuthentication" object:nil]; 583 | 584 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(unlockWithTouchID) name:@"MacPassPasscodeAuthentication" object:nil]; 585 | } 586 | 587 | %new 588 | -(void)textFieldDidChange :(UITextField *)textField { 589 | if (self.searchTimer != nil) { 590 | [self.searchTimer invalidate]; 591 | self.searchTimer = nil; 592 | } 593 | self.searchTimer = [NSTimer scheduledTimerWithTimeInterval: 0.8 target: self selector: @selector(searchForKeyword:) userInfo: self.textField.text repeats: NO]; 594 | } 595 | 596 | %new 597 | - (void) searchForKeyword:(NSTimer *)timer { 598 | NSString *keyword = (NSString*)timer.userInfo; 599 | 600 | [[%c(SBLockScreenManager) sharedInstance] attemptUnlockWithPasscode:keyword finishUIUnlock:1 completion:nil]; 601 | if (![[%c(SBLockScreenManager) sharedInstance] isUILocked]) [self dismiss]; 602 | } 603 | 604 | %new 605 | - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { 606 | NSString *updatedString = [self.textField.text stringByReplacingCharactersInRange:range withString:string]; 607 | self.textField.text = updatedString; 608 | 609 | NSRange selectedRange = NSMakeRange(range.location + string.length, 0); 610 | UITextPosition* from = [self.textField positionFromPosition:self.textField.beginningOfDocument offset:selectedRange.location]; 611 | UITextPosition* to = [self.textField positionFromPosition:from offset:selectedRange.length]; 612 | self.textField.selectedTextRange = [self.textField textRangeFromPosition:from toPosition:to]; 613 | 614 | [self.textField sendActionsForControlEvents:UIControlEventEditingChanged]; 615 | return NO; 616 | } 617 | 618 | - (void)viewDidAppear:(BOOL)animated { 619 | %orig; 620 | if ([[%c(SBLockScreenManager) sharedInstance] isLockScreenVisible] && startWithKeyboard) [self.textField becomeFirstResponder]; 621 | } 622 | 623 | - (void)viewWillAppear:(BOOL)animated { 624 | %orig; 625 | 626 | self.view.alpha = 0; 627 | [UIView animateWithDuration:0.3 delay:0 options:nil animations:^{ 628 | self.view.alpha = 1; 629 | } completion:nil]; 630 | 631 | [[NSNotificationCenter defaultCenter] postNotificationName:@"MacPassPasscodeVisible" object:nil]; 632 | } 633 | 634 | - (void)viewWillDisappear:(BOOL)animated { 635 | %orig; 636 | [self dismiss]; 637 | [self dismissViewControllerAnimated:respringPopController completion:nil]; 638 | [self dismissViewControllerAnimated:safeModePopController completion:nil]; 639 | 640 | [UIView animateWithDuration:0.3 delay:0 options:nil animations:^{ 641 | self.view.alpha = 0; 642 | } completion:nil]; 643 | 644 | [[NSNotificationCenter defaultCenter] postNotificationName:@"MacPassPasscodeNotVisible" object:nil]; 645 | } 646 | 647 | %new 648 | - (void)attemptUnlock { 649 | if ([self.textField.text length] != [passcodeCharacters integerValue]) [self wrongPasscode]; 650 | if ([self.textField.text length] == [passcodeCharacters integerValue]) [[%c(SBLockScreenManager) sharedInstance] attemptUnlockWithPasscode:[NSString stringWithFormat:@"%@", self.textField.text] finishUIUnlock:1 completion:nil]; 651 | if ([[%c(SBLockScreenManager) sharedInstance] isUILocked]) [self wrongPasscode]; 652 | if (![[%c(SBLockScreenManager) sharedInstance] isUILocked]) [self dismiss]; 653 | AudioServicesPlaySystemSound(1519); 654 | } 655 | 656 | %new 657 | - (void)clearText { 658 | [self.textField setText:@""]; 659 | AudioServicesPlaySystemSound(1519); 660 | } 661 | 662 | %new 663 | - (void)wrongPasscode { 664 | CAKeyframeAnimation *anim = [CAKeyframeAnimation animationWithKeyPath:@"transform"]; 665 | anim.values = @[[NSValue valueWithCATransform3D:CATransform3DMakeTranslation(-5.0f, 0.0f, 0.0f)], 666 | [NSValue valueWithCATransform3D:CATransform3DMakeTranslation( 5.0f, 0.0f, 0.0f)]]; 667 | anim.autoreverses = YES; 668 | anim.repeatCount = 2.0f; 669 | anim.duration = 0.07f; 670 | [self.textField.layer addAnimation:anim forKey:@"shake"]; 671 | 672 | [self.textField setText:@""]; 673 | AudioServicesPlaySystemSound(1521); 674 | } 675 | 676 | %new 677 | - (void)dismiss { 678 | [self.textField endEditing:YES]; 679 | [self.textField resignFirstResponder]; 680 | } 681 | 682 | %new 683 | - (void)exitPasscode { 684 | AudioServicesPlaySystemSound(1519); 685 | 686 | [self.textField endEditing:YES]; 687 | [self.textField resignFirstResponder]; 688 | [[%c(SBLockScreenManager) sharedInstance] setPasscodeVisible:NO animated:YES]; 689 | } 690 | 691 | %new 692 | - (void)unlockWithFaceID { 693 | if (enableAutomaticUnlockFaceID) [[%c(SBLockScreenManager) sharedInstance] unlockUIFromSource:17 withOptions:nil]; 694 | } 695 | 696 | %new 697 | - (void)unlockWithTouchID { 698 | [[%c(SBLockScreenManager) sharedInstance] unlockUIFromSource:0 withOptions:nil]; 699 | } 700 | 701 | %new 702 | - (void)respringShowPopup:(UIButton *)sender { 703 | 704 | respringPopController = [[UIViewController alloc] init]; 705 | respringPopController.modalPresentationStyle = UIModalPresentationPopover; 706 | respringPopController.preferredContentSize = CGSizeMake(200,130); 707 | UILabel *respringPopLabel = [[UILabel alloc] init]; 708 | respringPopLabel.frame = CGRectMake(20, 20, 160, 60); 709 | respringPopLabel.numberOfLines = 2; 710 | respringPopLabel.textAlignment = NSTextAlignmentCenter; 711 | respringPopLabel.adjustsFontSizeToFitWidth = YES; 712 | respringPopLabel.font = [UIFont boldSystemFontOfSize:20]; 713 | respringPopLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 714 | respringPopLabel.text = @"Are you sure you want to respring?"; 715 | [respringPopController.view addSubview:respringPopLabel]; 716 | 717 | UIButton *respringYesButton = [UIButton buttonWithType:UIButtonTypeCustom]; 718 | [respringYesButton addTarget:self 719 | action:@selector(respringYes) 720 | forControlEvents:UIControlEventTouchUpInside]; 721 | [respringYesButton setBackgroundImage:[UIImage systemImageNamed:@"checkmark.circle.fill"] forState:UIControlStateNormal]; 722 | respringYesButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 723 | respringYesButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 724 | [respringYesButton setContentMode:UIViewContentModeCenter]; 725 | respringYesButton.tintColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 726 | //[respringYesButton setTitle:@"Yes" forState:UIControlStateNormal]; 727 | respringYesButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 728 | [respringYesButton setTitleColor:[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] forState:UIControlStateNormal]; 729 | respringYesButton.frame = CGRectMake(145, 80, 20, 20); 730 | [respringPopController.view addSubview:respringYesButton]; 731 | 732 | UIButton *respringNoButton = [UIButton buttonWithType:UIButtonTypeCustom]; 733 | [respringNoButton addTarget:self 734 | action:@selector(respringNo) 735 | forControlEvents:UIControlEventTouchUpInside]; 736 | [respringNoButton setBackgroundImage:[UIImage systemImageNamed:@"xmark.circle.fill"] forState:UIControlStateNormal]; 737 | respringNoButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 738 | respringNoButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 739 | [respringNoButton setContentMode:UIViewContentModeCenter]; 740 | respringNoButton.tintColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 741 | //[respringNoButton setTitle:@"No" forState:UIControlStateNormal]; 742 | respringNoButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 743 | [respringNoButton setTitleColor:[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] forState:UIControlStateNormal]; 744 | respringNoButton.frame = CGRectMake(45, 80, 20, 20); 745 | [respringPopController.view addSubview:respringNoButton]; 746 | 747 | UIPopoverPresentationController *respringPopover = respringPopController.popoverPresentationController; 748 | RespringViewController *vc = [[RespringViewController alloc] init]; 749 | respringPopover.delegate = vc; 750 | [respringPopover _setBackgroundBlurDisabled:YES]; 751 | respringPopover.permittedArrowDirections = UIPopoverArrowDirectionDown; 752 | respringPopover.sourceView = sender; 753 | respringPopover.sourceRect = CGRectMake(0, 0, sender.frame.size.width, sender.frame.size.height); 754 | respringPopover.backgroundColor = [UIColor clearColor]; 755 | 756 | _UIBackdropViewSettings *settingsRespringPop = [_UIBackdropViewSettings settingsForStyle:4005]; 757 | 758 | _UIBackdropView *blurViewRespringPop = [[_UIBackdropView alloc] initWithFrame:respringPopController.view.frame autosizesToFitSuperview:YES settings:settingsRespringPop]; 759 | blurViewRespringPop.layer.masksToBounds = YES; 760 | respringPopController.view.clipsToBounds = YES; 761 | [respringPopController.view insertSubview:blurViewRespringPop atIndex:0]; 762 | 763 | [self presentViewController:respringPopController animated:YES completion:nil]; 764 | 765 | AudioServicesPlaySystemSound(1519); 766 | 767 | } 768 | 769 | %new 770 | - (void)respringNo { 771 | [self dismissViewControllerAnimated:respringPopController completion:nil]; 772 | 773 | AudioServicesPlaySystemSound(1519); 774 | } 775 | 776 | %new 777 | - (void)respringYes { 778 | AudioServicesPlaySystemSound(1519); 779 | 780 | pid_t pid; 781 | const char* args[] = {"sbreload", NULL}; 782 | posix_spawn(&pid, "/usr/bin/sbreload", NULL, NULL, (char* const*)args, NULL); 783 | } 784 | 785 | %new 786 | - (void)safeModeShowPopup:(UIButton *)sender { 787 | 788 | safeModePopController = [[UIViewController alloc] init]; 789 | safeModePopController.modalPresentationStyle = UIModalPresentationPopover; 790 | safeModePopController.view.frame = CGRectMake(0,0,200,130); 791 | safeModePopController.preferredContentSize = CGSizeMake(200,130); 792 | UILabel *safeModePopLabel = [[UILabel alloc] init]; 793 | safeModePopLabel.frame = CGRectMake(20, 20, 160, 60); 794 | safeModePopLabel.numberOfLines = 2; 795 | safeModePopLabel.textAlignment = NSTextAlignmentCenter; 796 | safeModePopLabel.adjustsFontSizeToFitWidth = YES; 797 | safeModePopLabel.font = [UIFont boldSystemFontOfSize:20]; 798 | safeModePopLabel.textColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 799 | safeModePopLabel.text = @"Are you sure you want to enter safe mode?"; 800 | [safeModePopController.view addSubview:safeModePopLabel]; 801 | 802 | UIButton *safeModeYesButton = [UIButton buttonWithType:UIButtonTypeCustom]; 803 | [safeModeYesButton addTarget:self 804 | action:@selector(safeModeYes) 805 | forControlEvents:UIControlEventTouchUpInside]; 806 | [safeModeYesButton setBackgroundImage:[UIImage systemImageNamed:@"checkmark.circle.fill"] forState:UIControlStateNormal]; 807 | safeModeYesButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 808 | safeModeYesButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 809 | [safeModeYesButton setContentMode:UIViewContentModeCenter]; 810 | safeModeYesButton.tintColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 811 | //[safeModeYesButton setTitle:@"Yes" forState:UIControlStateNormal]; 812 | safeModeYesButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 813 | [safeModeYesButton setTitleColor:[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] forState:UIControlStateNormal]; 814 | safeModeYesButton.frame = CGRectMake(145, 80, 20, 20); 815 | [safeModePopController.view addSubview:safeModeYesButton]; 816 | 817 | UIButton *safeModeNoButton = [UIButton buttonWithType:UIButtonTypeCustom]; 818 | [safeModeNoButton addTarget:self 819 | action:@selector(safeModeNo) 820 | forControlEvents:UIControlEventTouchUpInside]; 821 | [safeModeNoButton setBackgroundImage:[UIImage systemImageNamed:@"xmark.circle.fill"] forState:UIControlStateNormal]; 822 | safeModeNoButton.imageEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 823 | safeModeNoButton.titleEdgeInsets = UIEdgeInsetsMake(-2,-2,-2,-2); 824 | [safeModeNoButton setContentMode:UIViewContentModeCenter]; 825 | safeModeNoButton.tintColor = [SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"]; 826 | //[safeModeNoButton setTitle:@"No" forState:UIControlStateNormal]; 827 | safeModeNoButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 828 | [safeModeNoButton setTitleColor:[SparkColourPickerUtils colourWithString:[colorDictionary objectForKey:@"tintColor"] withFallback:@"#FFFFFF"] forState:UIControlStateNormal]; 829 | safeModeNoButton.frame = CGRectMake(45, 80, 20, 20); 830 | [safeModePopController.view addSubview:safeModeNoButton]; 831 | 832 | UIPopoverPresentationController *safeModePopover = safeModePopController.popoverPresentationController; 833 | SafeModeViewController *vc = [[SafeModeViewController alloc] init]; 834 | safeModePopover.delegate = vc; 835 | [safeModePopover _setBackgroundBlurDisabled:YES]; 836 | safeModePopover.permittedArrowDirections = UIPopoverArrowDirectionDown; 837 | safeModePopover.sourceView = self.safeModeButton; 838 | safeModePopover.sourceRect = CGRectMake(0,0,self.safeModeButton.frame.size.width,self.safeModeButton.frame.size.height); 839 | safeModePopover.backgroundColor = [UIColor clearColor]; 840 | [safeModePopover setArrowBackgroundColor:[UIColor clearColor]]; 841 | 842 | _UIBackdropViewSettings *settingsSafeModePop = [_UIBackdropViewSettings settingsForStyle:4005]; 843 | 844 | _UIBackdropView *blurViewSafeModePop = [[_UIBackdropView alloc] initWithFrame:safeModePopController.view.frame autosizesToFitSuperview:YES settings:settingsSafeModePop]; 845 | blurViewSafeModePop.layer.masksToBounds = YES; 846 | [safeModePopController.view insertSubview:blurViewSafeModePop atIndex:0]; 847 | 848 | [self presentViewController:safeModePopController animated:YES completion:nil]; 849 | 850 | AudioServicesPlaySystemSound(1519); 851 | 852 | } 853 | 854 | %new 855 | - (void)safeModeNo { 856 | [self dismissViewControllerAnimated:safeModePopController completion:nil]; 857 | 858 | AudioServicesPlaySystemSound(1519); 859 | } 860 | 861 | %new 862 | - (void)safeModeYes { 863 | AudioServicesPlaySystemSound(1519); 864 | 865 | pid_t pid; 866 | const char *args[] = {"killall", "-SEGV", "SpringBoard", NULL}; 867 | posix_spawn(&pid, "/usr/bin/killall", NULL, NULL, (char * const *)args, NULL); 868 | } 869 | %end 870 | 871 | %hook SBUIProudLockIconView 872 | -(void)layoutSubviews { 873 | %orig; 874 | 875 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeVisible) name:@"MacPassPasscodeVisible" object:nil]; 876 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeNotVisible) name:@"MacPassPasscodeNotVisible" object:nil]; 877 | } 878 | 879 | %new 880 | - (void)passcodeVisible { 881 | [self.superview setHidden:YES]; 882 | [self setHidden:YES]; 883 | } 884 | 885 | %new 886 | - (void)passcodeNotVisible { 887 | NSDictionary *diaryDict = [NSDictionary dictionaryWithContentsOfFile:@"/var/mobile/Library/Preferences/love.litten.diarypreferences.plist"]; 888 | if ([[diaryDict objectForKey:@"Enabled"] boolValue] == YES && [[diaryDict objectForKey:@"enableHello"] boolValue] == YES) { 889 | [self.superview setHidden:YES]; 890 | [self setHidden:YES]; 891 | } else { 892 | [self.superview setHidden:NO]; 893 | [self setHidden:NO]; 894 | } 895 | } 896 | %end 897 | 898 | %hook SBDashBoardBiometricUnlockController 899 | 900 | - (void)setAuthenticated:(BOOL)arg1 { 901 | %orig; 902 | if (arg1) [[NSNotificationCenter defaultCenter] postNotificationName:@"MacPassPasscodeAuthentication" object:nil]; 903 | } 904 | %end 905 | 906 | %hook CSPasscodeBackgroundView 907 | - (id)initWithFrame:(CGRect)frame { 908 | self = %orig; 909 | 910 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeVisible) name:@"MacPassPasscodeVisible" object:nil]; 911 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeNotVisible) name:@"MacPassPasscodeNotVisible" object:nil]; 912 | 913 | return self; 914 | } 915 | 916 | %new 917 | - (void)passcodeVisible { 918 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 919 | self.alpha = 0; 920 | self.hidden = YES; 921 | } completion:nil]; 922 | } 923 | 924 | %new 925 | - (void)passcodeNotVisible { 926 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 927 | self.alpha = 0; 928 | self.hidden = YES; 929 | } completion:nil]; 930 | } 931 | %end 932 | 933 | %hook SBUIPasscodeBiometricAuthenticationView 934 | -(void)_updateConstraints { 935 | %orig; 936 | self.faceIDLabel.hidden = YES; 937 | } 938 | %end 939 | 940 | %hook SBUIPasscodeLockViewWithKeypad 941 | - (void)updateStatusText:(id)arg1 subtitle:(id)arg2 animated:(BOOL)arg3 { 942 | %orig(nil, nil, NO); 943 | } 944 | %end 945 | 946 | %hook SBUIPasscodeLockViewBase 947 | -(void)_setStatusText:(id)arg1 { 948 | %orig(nil); 949 | } 950 | -(void)_setStatusSubtitleText:(id)arg1 { 951 | %orig(nil); 952 | } 953 | -(BOOL)_canRecognizeBiometricAuthentication { 954 | BOOL bio = %orig; 955 | if (enableAutomaticUnlockFaceID) { 956 | return YES; 957 | } else { 958 | return NO; 959 | } 960 | return bio; 961 | } 962 | -(BOOL)showsCancelButton { 963 | return NO; 964 | } 965 | -(BOOL)showsEmergencyCallButton { 966 | return NO; 967 | } 968 | %end 969 | 970 | %hook SBUIAlphanumericPasscodeEntryField 971 | - (void)willMoveToWindow:(id)arg1 { 972 | %orig; 973 | [self removeFromSuperview]; 974 | } 975 | %end 976 | 977 | %hook SBUIPasscodeTextField 978 | - (void)willMoveToWindow:(id)arg1 { 979 | %orig; 980 | [self removeFromSuperview]; 981 | } 982 | %end 983 | 984 | %hook SBUIPasscodeLockViewSimpleFixedDigitKeyPad 985 | - (void)setStatusText:(id)arg1 { 986 | %orig(nil); 987 | } 988 | %end 989 | 990 | %hook SBSimplePasscodeEntryFieldButton 991 | 992 | - (void)layoutSubviews { 993 | %orig; 994 | 995 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeVisible) name:@"MacPassPasscodeVisible" object:nil]; 996 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeNotVisible) name:@"MacPassPasscodeNotVisible" object:nil]; 997 | } 998 | 999 | %new 1000 | - (void)passcodeVisible { 1001 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1002 | self.alpha = 0; 1003 | self.hidden = YES; 1004 | } completion:nil]; 1005 | } 1006 | 1007 | %new 1008 | - (void)passcodeNotVisible { 1009 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1010 | self.alpha = 1; 1011 | self.hidden = NO; 1012 | } completion:nil]; 1013 | } 1014 | %end 1015 | 1016 | %hook SBUISimpleFixedDigitPasscodeEntryField 1017 | 1018 | - (void)layoutSubviews { 1019 | %orig; 1020 | 1021 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeVisible) name:@"MacPassPasscodeVisible" object:nil]; 1022 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeNotVisible) name:@"MacPassPasscodeNotVisible" object:nil]; 1023 | } 1024 | 1025 | %new 1026 | - (void)passcodeVisible { 1027 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1028 | self.alpha = 0; 1029 | self.hidden = YES; 1030 | } completion:nil]; 1031 | } 1032 | 1033 | %new 1034 | - (void)passcodeNotVisible { 1035 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1036 | self.alpha = 0; 1037 | self.hidden = YES; 1038 | } completion:nil]; 1039 | } 1040 | %end 1041 | 1042 | %hook SBUIPasscodeLockNumberPad 1043 | 1044 | - (void)layoutSubviews { 1045 | %orig; 1046 | 1047 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeVisible) name:@"MacPassPasscodeVisible" object:nil]; 1048 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(passcodeNotVisible) name:@"MacPassPasscodeNotVisible" object:nil]; 1049 | } 1050 | 1051 | %new 1052 | - (void)passcodeVisible { 1053 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1054 | self.alpha = 0; 1055 | self.hidden = YES; 1056 | } completion:nil]; 1057 | } 1058 | 1059 | %new 1060 | - (void)passcodeNotVisible { 1061 | [UIView animateWithDuration:0.5 delay:0 options:nil animations:^{ 1062 | self.alpha = 1; 1063 | self.hidden = NO; 1064 | } completion:nil]; 1065 | } 1066 | %end 1067 | 1068 | %hook SBUIPasscodeBiometricResource 1069 | -(BOOL)hasBiometricAuthenticationCapabilityEnabled { 1070 | return NO; 1071 | } 1072 | %end 1073 | %end 1074 | 1075 | static void notificationCallback(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) { 1076 | colorDictionary = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/private/var/mobile/Library/Preferences/com.nahtedetihw.macpassprefs.color.plist"]; 1077 | } 1078 | 1079 | %ctor { 1080 | notificationCallback(NULL, NULL, NULL, NULL, NULL); 1081 | CFNotificationCenterAddObserver(CFNotificationCenterGetDarwinNotifyCenter(), NULL, notificationCallback, (CFStringRef)nsNotificationString, NULL, CFNotificationSuspensionBehaviorCoalesce); 1082 | 1083 | preferences = [[HBPreferences alloc] initWithIdentifier:@"com.nahtedetihw.macpassprefs"]; 1084 | [preferences registerBool:&enabled default:NO forKey:@"enabled"]; 1085 | [preferences registerBool:&showOnStartup default:NO forKey:@"showOnStartup"]; 1086 | [preferences registerBool:&startWithKeyboard default:NO forKey:@"startWithKeyboard"]; 1087 | [preferences registerBool:&enableAutomaticUnlock default:NO forKey:@"enableAutomaticUnlock"]; 1088 | [preferences registerBool:&enableAutomaticUnlockFaceID default:NO forKey:@"enableAutomaticUnlockFaceID"]; 1089 | [preferences registerObject:&usernameString default:@"MacPass" forKey:@"usernameString"]; 1090 | [preferences registerObject:&profilePicture default:nil forKey:@"profilePicture"]; 1091 | [preferences registerInteger:&passcodeType default:0 forKey:@"passcodeType"]; 1092 | [preferences registerObject:&passcodeCharacters default:[NSNumber numberWithInt:6] forKey:@"passcodeCharacters"]; 1093 | [preferences registerDouble:&blurOpacity default:1 forKey:@"blurOpacity"]; 1094 | 1095 | if (enabled) { 1096 | %init(MacPass); 1097 | return; 1098 | } 1099 | return; 1100 | } 1101 | -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.nahtedetihw.macpass 2 | Name: MacPass 3 | Version: 1.3 4 | Architecture: iphoneos-arm 5 | Description: MacPass gives MacOS password screen for passcode! 6 | Maintainer: Ethan Whited 7 | Author: Ethan Whited 8 | Section: Tweaks 9 | Depends: mobilesubstrate, com.spark.libsparkcolourpicker, com.muirey03.libimagepicker, ws.hbang.common 10 | -------------------------------------------------------------------------------- /customimagepicker/CustomImagePicker.plist: -------------------------------------------------------------------------------- 1 | { 2 | Filter = { 3 | Bundles = ( 4 | "com.apple.Preferences", 5 | ); 6 | }; 7 | } -------------------------------------------------------------------------------- /customimagepicker/CustomImagePicker.xm: -------------------------------------------------------------------------------- 1 | @interface LIPImageChooseCell : UITableViewCell 2 | @end 3 | 4 | %hook LIPImageChooseCell 5 | - (void)didMoveToSuperview { 6 | %orig; 7 | UIImageView *previewImage = MSHookIvar(self, "previewImage"); 8 | previewImage.layer.masksToBounds = YES; 9 | previewImage.center = CGPointMake(previewImage.center.x-10,previewImage.center.y); 10 | previewImage.layer.cornerRadius = previewImage.frame.size.height/2; 11 | } 12 | %end 13 | -------------------------------------------------------------------------------- /customimagepicker/Makefile: -------------------------------------------------------------------------------- 1 | TARGET := iphone:clang:latest:14.0 2 | INSTALL_TARGET_PROCESSES = SpringBoard 3 | 4 | DEBUG = 0 5 | 6 | FINALPACKAGE = 1 7 | 8 | PREFIX=$(THEOS)/toolchain/Xcode.xctoolchain/usr/bin/ 9 | 10 | SYSROOT=$(THEOS)/sdks/iphoneos14.0.sdk 11 | 12 | include $(THEOS)/makefiles/common.mk 13 | 14 | TWEAK_NAME = CustomImagePicker 15 | $(TWEAK_NAME)_FILES = CustomImagePicker.xm 16 | $(TWEAK_NAME)_LIBRARIES += imagepicker 17 | $(TWEAK_NAME)_CFLAGS = -fobjc-arc 18 | $(TWEAK_NAME)_FRAMEWORKS = UIKit 19 | 20 | after-install:: 21 | install.exec "sbreload" 22 | 23 | include $(THEOS_MAKE_PATH)/tweak.mk 24 | include $(THEOS_MAKE_PATH)/aggregate.mk -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/ProfilePicture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/ProfilePicture.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/clear@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/clear@2x.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/clear@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/clear@3x.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/exit.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/respring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/respring.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/safemode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/safemode.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/unlock@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/unlock@2x.png -------------------------------------------------------------------------------- /layout/Library/Application Support/MacPass/unlock@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/layout/Library/Application Support/MacPass/unlock@3x.png -------------------------------------------------------------------------------- /macpassprefs/MACPASSPreferences.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | #import 6 | #import 7 | #import 8 | #import "libimagepicker.h" 9 | 10 | @interface UIPopoverPresentationController (Private) 11 | @property (assign,setter=_setPopoverBackgroundStyle:,nonatomic) long long _popoverBackgroundStyle; 12 | @property (assign,setter=_setBackgroundBlurDisabled:,nonatomic) BOOL _backgroundBlurDisabled; 13 | @end 14 | 15 | @interface OBButtonTray : UIView 16 | @property (nonatomic,retain) UIVisualEffectView * effectView; 17 | - (void)addButton:(id)arg1; 18 | - (void)addCaptionText:(id)arg1;; 19 | @end 20 | 21 | @interface OBBoldTrayButton : UIButton 22 | - (void)setTitle:(id)arg1 forState:(unsigned long long)arg2; 23 | + (id)buttonWithType:(long long)arg1; 24 | @end 25 | 26 | @interface OBWelcomeController : UIViewController 27 | @property (nonatomic, retain) UIView *viewIfLoaded; 28 | @property (nonatomic, strong) UIColor *backgroundColor; 29 | - (OBButtonTray *)buttonTray; 30 | - (id)initWithTitle:(id)arg1 detailText:(id)arg2 icon:(id)arg3; 31 | - (void)addBulletedListItemWithTitle:(id)arg1 description:(id)arg2 image:(id)arg3; 32 | @end 33 | 34 | @interface _UIBackdropView : UIView 35 | -(id)initWithFrame:(CGRect)arg1 autosizesToFitSuperview:(BOOL)arg2 settings:(id)arg3 ; 36 | @property (assign,nonatomic) BOOL blurRadiusSetOnce; 37 | @property (assign,nonatomic) double _blurRadius; 38 | @property (nonatomic,copy) NSString * _blurQuality; 39 | -(id)initWithSettings:(id)arg1 ; 40 | @end 41 | 42 | @interface _UIBackdropViewSettings : NSObject 43 | +(id)settingsForStyle:(long long)arg1 ; 44 | @end 45 | 46 | @interface MACPASSPreferencesListController : PSListController { 47 | 48 | UITableView * _table; 49 | 50 | } 51 | @property (nonatomic, strong) UIImageView *artworkView; 52 | @property (nonatomic, strong) UIImageView *artworkView2; 53 | @property (nonatomic, retain) UIBarButtonItem *killButton; 54 | @property (nonatomic, retain) UIView *headerView; 55 | @property (nonatomic, retain) UILabel *titleLabel; 56 | @property (nonatomic, retain) UIImageView *iconView; 57 | @property (nonatomic, retain) NSArray *versionArray; 58 | @property (nonatomic, retain) OBWelcomeController *changelogController; 59 | - (void)apply:(UIButton *)sender; 60 | - (void)showMenu:(UIButton *)sender; 61 | - (void)twitter:(UIButton *)sender; 62 | - (void)paypal:(UIButton *)sender; 63 | - (void)handleYesGesture:(UIButton *)sender; 64 | - (void)handleNoGesture:(UIButton *)sender; 65 | - (void)chooseUsername; 66 | @end 67 | 68 | @interface MACPASSAppearanceSettings: HBAppearanceSettings 69 | @end 70 | -------------------------------------------------------------------------------- /macpassprefs/MACPASSPreferences.m: -------------------------------------------------------------------------------- 1 | #include "MACPASSPreferences.h" 2 | #import 3 | #import 4 | 5 | UIBarButtonItem *respringButtonItem; 6 | UIBarButtonItem *changelogButtonItem; 7 | UIBarButtonItem *twitterButtonItem; 8 | UIBarButtonItem *paypalButtonItem; 9 | UIViewController *popController; 10 | UIColor *backgroundDynamicColor; 11 | UIColor *tintDynamicColor; 12 | _UIBackdropView *backdropViewRespring; 13 | UIView *blackViewRespring; 14 | 15 | @implementation MACPASSPreferencesListController 16 | @synthesize killButton; 17 | @synthesize versionArray; 18 | 19 | - (NSArray *)specifiers { 20 | if (!_specifiers) { 21 | _specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain]; 22 | } 23 | 24 | return _specifiers; 25 | } 26 | 27 | - (instancetype)init { 28 | 29 | self = [super init]; 30 | 31 | if (self) { 32 | 33 | backgroundDynamicColor = [UIColor colorWithDynamicProvider:^UIColor *(UITraitCollection *traitCollection) { 34 | BOOL isDarkMode = traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; 35 | BOOL isLightMode = traitCollection.userInterfaceStyle == UIUserInterfaceStyleLight; 36 | BOOL isUnspecified = traitCollection.userInterfaceStyle == UIUserInterfaceStyleUnspecified; 37 | if (isDarkMode) { 38 | return [UIColor colorWithRed:147/255.0f green:162/255.0f blue:167/255.0f alpha:1.0f]; 39 | } 40 | if (isLightMode) { 41 | return [UIColor colorWithRed:63/255.0f green:72/255.0f blue:83/255.0f alpha:1.0f]; 42 | } 43 | if (isUnspecified) { 44 | return [UIColor colorWithRed:147/255.0f green:162/255.0f blue:167/255.0f alpha:1.0f]; 45 | } 46 | return [UIColor colorWithRed:147/255.0f green:162/255.0f blue:167/255.0f alpha:1.0f]; 47 | }]; 48 | 49 | tintDynamicColor = [UIColor colorWithDynamicProvider:^UIColor *(UITraitCollection *traitCollection) { 50 | BOOL isDarkMode = traitCollection.userInterfaceStyle == UIUserInterfaceStyleDark; 51 | BOOL isLightMode = traitCollection.userInterfaceStyle == UIUserInterfaceStyleLight; 52 | BOOL isUnspecified = traitCollection.userInterfaceStyle == UIUserInterfaceStyleUnspecified; 53 | if (isDarkMode) { 54 | return [UIColor colorWithRed:83/255.0f green:95/255.0f blue:109/255.0f alpha:1.0f]; 55 | } 56 | if (isLightMode) { 57 | return [UIColor colorWithRed:97/255.0f green:120/255.0f blue:132/255.0f alpha:1.0f]; 58 | } 59 | if (isUnspecified) { 60 | return [UIColor colorWithRed:83/255.0f green:95/255.0f blue:109/255.0f alpha:1.0f]; 61 | } 62 | return [UIColor colorWithRed:83/255.0f green:95/255.0f blue:109/255.0f alpha:1.0f]; 63 | }]; 64 | 65 | MACPASSAppearanceSettings *appearanceSettings = [[MACPASSAppearanceSettings alloc] init]; 66 | self.hb_appearanceSettings = appearanceSettings; 67 | UIButton *respringButton = [UIButton buttonWithType:UIButtonTypeCustom]; 68 | respringButton.frame = CGRectMake(0,0,30,30); 69 | respringButton.layer.cornerRadius = respringButton.frame.size.height / 2; 70 | respringButton.layer.masksToBounds = YES; 71 | respringButton.backgroundColor = backgroundDynamicColor; 72 | [respringButton setImage:[[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/CHECKMARK.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 73 | [respringButton addTarget:self action:@selector(apply:) forControlEvents:UIControlEventTouchUpInside]; 74 | respringButton.tintColor = tintDynamicColor; 75 | 76 | respringButtonItem = [[UIBarButtonItem alloc] initWithCustomView:respringButton]; 77 | 78 | UIButton *changelogButton = [UIButton buttonWithType:UIButtonTypeCustom]; 79 | changelogButton.frame = CGRectMake(0,0,30,30); 80 | changelogButton.layer.cornerRadius = changelogButton.frame.size.height / 2; 81 | changelogButton.layer.masksToBounds = YES; 82 | changelogButton.backgroundColor = backgroundDynamicColor; 83 | [changelogButton setImage:[[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/CHANGELOG.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 84 | [changelogButton addTarget:self action:@selector(showMenu:) forControlEvents:UIControlEventTouchUpInside]; 85 | changelogButton.tintColor = tintDynamicColor; 86 | 87 | changelogButtonItem = [[UIBarButtonItem alloc] initWithCustomView:changelogButton]; 88 | 89 | UIButton *twitterButton = [UIButton buttonWithType:UIButtonTypeCustom]; 90 | twitterButton.frame = CGRectMake(0,0,30,30); 91 | twitterButton.layer.cornerRadius = twitterButton.frame.size.height / 2; 92 | twitterButton.layer.masksToBounds = YES; 93 | twitterButton.backgroundColor = backgroundDynamicColor; 94 | [twitterButton setImage:[[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/TWITTER.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 95 | [twitterButton addTarget:self action:@selector(twitter:) forControlEvents:UIControlEventTouchUpInside]; 96 | twitterButton.tintColor = tintDynamicColor; 97 | 98 | twitterButtonItem = [[UIBarButtonItem alloc] initWithCustomView:twitterButton]; 99 | 100 | UIButton *paypalButton = [UIButton buttonWithType:UIButtonTypeCustom]; 101 | paypalButton.frame = CGRectMake(0,0,30,30); 102 | paypalButton.layer.cornerRadius = paypalButton.frame.size.height / 2; 103 | paypalButton.layer.masksToBounds = YES; 104 | paypalButton.backgroundColor = backgroundDynamicColor; 105 | [paypalButton setImage:[[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/PAYPAL.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal]; 106 | [paypalButton addTarget:self action:@selector(paypal:) forControlEvents:UIControlEventTouchUpInside]; 107 | paypalButton.tintColor = tintDynamicColor; 108 | 109 | paypalButtonItem = [[UIBarButtonItem alloc] initWithCustomView:paypalButton]; 110 | 111 | NSArray *rightButtons; 112 | rightButtons = @[respringButtonItem, changelogButtonItem, twitterButtonItem, paypalButtonItem]; 113 | self.navigationItem.rightBarButtonItems = rightButtons; 114 | self.navigationItem.titleView = [UIView new]; 115 | self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 10, 10)]; 116 | self.titleLabel.font = [UIFont boldSystemFontOfSize:18]; 117 | self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO; 118 | self.titleLabel.text = @""; 119 | self.titleLabel.textColor = tintDynamicColor; 120 | self.titleLabel.textAlignment = NSTextAlignmentCenter; 121 | [self.navigationItem.titleView addSubview:self.titleLabel]; 122 | 123 | self.iconView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 10, 10)]; 124 | self.iconView.contentMode = UIViewContentModeScaleAspectFit; 125 | self.iconView.image = [UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/headericon.png"]; 126 | self.iconView.translatesAutoresizingMaskIntoConstraints = NO; 127 | self.iconView.alpha = 0.0; 128 | [self.navigationItem.titleView addSubview:self.iconView]; 129 | 130 | [NSLayoutConstraint activateConstraints:@[ 131 | [self.titleLabel.topAnchor constraintEqualToAnchor:self.navigationItem.titleView.topAnchor], 132 | [self.titleLabel.leadingAnchor constraintEqualToAnchor:self.navigationItem.titleView.leadingAnchor], 133 | [self.titleLabel.trailingAnchor constraintEqualToAnchor:self.navigationItem.titleView.trailingAnchor], 134 | [self.titleLabel.bottomAnchor constraintEqualToAnchor:self.navigationItem.titleView.bottomAnchor], 135 | [self.iconView.topAnchor constraintEqualToAnchor:self.navigationItem.titleView.topAnchor], 136 | [self.iconView.leadingAnchor constraintEqualToAnchor:self.navigationItem.titleView.leadingAnchor], 137 | [self.iconView.trailingAnchor constraintEqualToAnchor:self.navigationItem.titleView.trailingAnchor], 138 | [self.iconView.bottomAnchor constraintEqualToAnchor:self.navigationItem.titleView.bottomAnchor], 139 | ]]; 140 | 141 | } 142 | 143 | return self; 144 | 145 | } 146 | 147 | - (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller { 148 | 149 | return UIModalPresentationNone; 150 | } 151 | 152 | - (void)viewWillAppear:(BOOL)animated { 153 | 154 | [super viewWillAppear:animated]; 155 | 156 | CGRect frame = self.table.bounds; 157 | frame.origin.y = -frame.size.height; 158 | 159 | self.navigationController.navigationController.navigationBar.barTintColor = [UIColor labelColor]; 160 | [self.navigationController.navigationController.navigationBar setShadowImage: [UIImage new]]; 161 | self.navigationController.navigationController.navigationBar.tintColor = [UIColor labelColor]; 162 | self.navigationController.navigationController.navigationBar.translucent = NO; 163 | 164 | } 165 | 166 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 167 | tableView.tableHeaderView = self.headerView; 168 | return [super tableView:tableView cellForRowAtIndexPath:indexPath]; 169 | } 170 | 171 | - (void)viewDidLoad { 172 | 173 | [super viewDidLoad]; 174 | 175 | _UIBackdropViewSettings *settings = [_UIBackdropViewSettings settingsForStyle:2]; 176 | 177 | backdropViewRespring = [[_UIBackdropView alloc] initWithSettings:settings]; 178 | backdropViewRespring.layer.masksToBounds = YES; 179 | backdropViewRespring.clipsToBounds = YES; 180 | backdropViewRespring.frame = [UIScreen mainScreen].bounds; 181 | backdropViewRespring.alpha = 0; 182 | [[[UIApplication sharedApplication] keyWindow] addSubview:backdropViewRespring]; 183 | 184 | blackViewRespring = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds]; 185 | blackViewRespring.layer.masksToBounds = YES; 186 | blackViewRespring.clipsToBounds = YES; 187 | blackViewRespring.alpha = 0; 188 | blackViewRespring.backgroundColor = [UIColor blackColor]; 189 | [[[UIApplication sharedApplication] keyWindow] addSubview:blackViewRespring]; 190 | 191 | self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0,0,self.table.bounds.size.width,300)]; 192 | 193 | self.artworkView = [[UIImageView alloc] initWithFrame:CGRectMake(self.headerView.frame.origin.x, self.headerView.frame.origin.y, self.headerView.frame.size.width, self.headerView.frame.size.height)]; 194 | self.artworkView.contentMode = UIViewContentModeScaleAspectFit; 195 | self.artworkView.image = [UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/banner.png"]; 196 | self.artworkView.layer.masksToBounds = YES; 197 | 198 | [self.headerView insertSubview:self.artworkView atIndex:0]; 199 | 200 | self.artworkView.translatesAutoresizingMaskIntoConstraints = false; 201 | [NSLayoutConstraint activateConstraints:@[ 202 | [self.artworkView.topAnchor constraintEqualToAnchor:self.headerView.topAnchor], 203 | [self.artworkView.leadingAnchor constraintEqualToAnchor:self.headerView.leadingAnchor], 204 | [self.artworkView.trailingAnchor constraintEqualToAnchor:self.headerView.trailingAnchor], 205 | [self.artworkView.bottomAnchor constraintEqualToAnchor:self.headerView.bottomAnchor], 206 | ]]; 207 | _table.tableHeaderView = self.headerView; 208 | } 209 | 210 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 211 | 212 | CGFloat offsetY = scrollView.contentOffset.y; 213 | 214 | if (offsetY > 200) { 215 | [UIView animateWithDuration:0.2 animations:^{ 216 | self.iconView.alpha = 1.0; 217 | self.titleLabel.alpha = 0.0; 218 | }]; 219 | } else { 220 | [UIView animateWithDuration:0.2 animations:^{ 221 | self.iconView.alpha = 0.0; 222 | self.titleLabel.alpha = 1.0; 223 | }]; 224 | } 225 | 226 | if (offsetY > 0) offsetY = 0; 227 | self.artworkView.frame = CGRectMake(self.headerView.frame.origin.x, self.headerView.frame.origin.y, self.headerView.frame.size.width, 200 - offsetY); 228 | } 229 | 230 | - (void)viewWillDisappear:(BOOL)animated { 231 | [super viewWillDisappear:animated]; 232 | 233 | [self.navigationController.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}]; 234 | } 235 | 236 | - (void)apply:(UIButton *)sender { 237 | 238 | popController = [[UIViewController alloc] init]; 239 | popController.modalPresentationStyle = UIModalPresentationPopover; 240 | popController.preferredContentSize = CGSizeMake(200,130); 241 | UILabel *respringLabel = [[UILabel alloc] init]; 242 | respringLabel.frame = CGRectMake(20, 20, 160, 60); 243 | respringLabel.numberOfLines = 2; 244 | respringLabel.textAlignment = NSTextAlignmentCenter; 245 | respringLabel.adjustsFontSizeToFitWidth = YES; 246 | respringLabel.font = [UIFont boldSystemFontOfSize:20]; 247 | respringLabel.textColor = tintDynamicColor; 248 | respringLabel.text = @"Are you sure you want to respring?"; 249 | [popController.view addSubview:respringLabel]; 250 | 251 | UIButton *yesButton = [UIButton buttonWithType:UIButtonTypeCustom]; 252 | [yesButton addTarget:self 253 | action:@selector(handleYesGesture:) 254 | forControlEvents:UIControlEventTouchUpInside]; 255 | [yesButton setTitle:@"Yes" forState:UIControlStateNormal]; 256 | yesButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 257 | [yesButton setTitleColor:tintDynamicColor forState:UIControlStateNormal]; 258 | yesButton.frame = CGRectMake(100, 100, 100, 30); 259 | [popController.view addSubview:yesButton]; 260 | 261 | UIButton *noButton = [UIButton buttonWithType:UIButtonTypeCustom]; 262 | [noButton addTarget:self 263 | action:@selector(handleNoGesture:) 264 | forControlEvents:UIControlEventTouchUpInside]; 265 | [noButton setTitle:@"No" forState:UIControlStateNormal]; 266 | noButton.titleLabel.font = [UIFont boldSystemFontOfSize:20]; 267 | [noButton setTitleColor:tintDynamicColor forState:UIControlStateNormal]; 268 | noButton.frame = CGRectMake(0, 100, 100, 30); 269 | [popController.view addSubview:noButton]; 270 | 271 | UIPopoverPresentationController *popover = popController.popoverPresentationController; 272 | popover.delegate = self; 273 | //[popover _setBackgroundBlurDisabled:YES]; 274 | popover.permittedArrowDirections = UIPopoverArrowDirectionUp; 275 | popover.barButtonItem = respringButtonItem; 276 | popover.backgroundColor = backgroundDynamicColor; 277 | 278 | [self presentViewController:popController animated:YES completion:nil]; 279 | 280 | AudioServicesPlaySystemSound(1519); 281 | 282 | } 283 | 284 | - (void)showMenu:(id)sender { 285 | 286 | AudioServicesPlaySystemSound(1519); 287 | 288 | self.changelogController = [[OBWelcomeController alloc] initWithTitle:@"MacPass" detailText:@"1.3" icon:[UIImage imageWithContentsOfFile:@"/Library/PreferenceBundles/macpassprefs.bundle/changelogControllerIcon.png"]]; 289 | 290 | [self.changelogController addBulletedListItemWithTitle:@"Crash" description:@"Fixed a crash for users on iOS 13." image:[UIImage systemImageNamed:@"1.circle.fill"]]; 291 | 292 | _UIBackdropViewSettings *settings = [_UIBackdropViewSettings settingsForStyle:2]; 293 | 294 | _UIBackdropView *backdropView = [[_UIBackdropView alloc] initWithSettings:settings]; 295 | backdropView.layer.masksToBounds = YES; 296 | backdropView.clipsToBounds = YES; 297 | backdropView.frame = self.changelogController.viewIfLoaded.frame; 298 | [self.changelogController.viewIfLoaded insertSubview:backdropView atIndex:0]; 299 | 300 | backdropView.translatesAutoresizingMaskIntoConstraints = false; 301 | [backdropView.bottomAnchor constraintEqualToAnchor:self.changelogController.viewIfLoaded.bottomAnchor constant:0].active = YES; 302 | [backdropView.leftAnchor constraintEqualToAnchor:self.changelogController.viewIfLoaded.leftAnchor constant:0].active = YES; 303 | [backdropView.rightAnchor constraintEqualToAnchor:self.changelogController.viewIfLoaded.rightAnchor constant:0].active = YES; 304 | [backdropView.topAnchor constraintEqualToAnchor:self.changelogController.viewIfLoaded.topAnchor constant:0].active = YES; 305 | 306 | self.changelogController.viewIfLoaded.backgroundColor = [UIColor clearColor]; 307 | self.changelogController.modalPresentationStyle = UIModalPresentationPageSheet; 308 | self.changelogController.modalInPresentation = NO; 309 | [self presentViewController:self.changelogController animated:YES completion:nil]; 310 | } 311 | - (void)dismissVC { 312 | [self.changelogController dismissViewControllerAnimated:YES completion:nil]; 313 | } 314 | 315 | - (void)twitter:(id)sender { 316 | AudioServicesPlaySystemSound(1519); 317 | 318 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://twitter.com/EthanWhited"] options:@{} completionHandler:nil]; 319 | } 320 | 321 | - (void)paypal:(id)sender { 322 | AudioServicesPlaySystemSound(1519); 323 | 324 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://paypal.me/nahtedetihw"] options:@{} completionHandler:nil]; 325 | } 326 | 327 | - (void)handleYesGesture:(UIButton *)sender { 328 | AudioServicesPlaySystemSound(1519); 329 | 330 | [popController dismissViewControllerAnimated:YES completion:nil]; 331 | 332 | [UIView animateWithDuration:1.0 animations:^{ 333 | backdropViewRespring.alpha = 1; 334 | }]; 335 | 336 | [UIView animateWithDuration:2.0 animations:^{ 337 | blackViewRespring.alpha = 1; 338 | }]; 339 | 340 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 341 | pid_t pid; 342 | const char* args[] = {"sbreload", NULL}; 343 | posix_spawn(&pid, "/usr/bin/sbreload", NULL, NULL, (char* const*)args, NULL); 344 | }); 345 | } 346 | 347 | - (void)handleNoGesture:(UIButton *)sender { 348 | AudioServicesPlaySystemSound(1519); 349 | [popController dismissViewControllerAnimated:YES completion:nil]; 350 | } 351 | 352 | - (void)chooseUsername { 353 | HBPreferences *preferences = [[HBPreferences alloc] initWithIdentifier:@"com.nahtedetihw.macpassprefs"]; 354 | 355 | UIAlertController *alert = [UIAlertController 356 | alertControllerWithTitle:@"Username" 357 | message:@"What would you like your username to be?" 358 | preferredStyle:UIAlertControllerStyleAlert]; 359 | 360 | UIAlertAction* cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault 361 | handler:^(UIAlertAction * action) { 362 | [alert dismissViewControllerAnimated:YES completion:nil]; 363 | } 364 | ]; 365 | 366 | [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) { 367 | textField.placeholder = @"Username"; 368 | textField.keyboardType = UIKeyboardTypeDefault; 369 | }]; 370 | 371 | UIAlertAction* ok = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault 372 | handler:^(UIAlertAction * action){ 373 | NSString *name = [(UITextField *)alert.textFields[0] text]; 374 | 375 | if (![name isEqual:@""]) { 376 | [preferences setObject:name forKey:@"usernameString"]; 377 | 378 | UIAlertController* alert3 = [UIAlertController alertControllerWithTitle:@"Username set!" 379 | message:[NSString stringWithFormat:@"%@, your username was successfully set.", name] preferredStyle:UIAlertControllerStyleAlert]; 380 | [alert3 addAction:[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) { 381 | [alert3 dismissViewControllerAnimated:YES completion:^{ 382 | }]; 383 | }]]; 384 | [self presentViewController:alert3 animated:YES completion:nil]; 385 | } 386 | 387 | [alert dismissViewControllerAnimated:YES completion:nil]; 388 | }]; 389 | [alert addAction:cancel]; 390 | [alert addAction:ok]; 391 | [self presentViewController:alert animated:YES completion:nil]; 392 | 393 | AudioServicesPlaySystemSound(1519); 394 | } 395 | 396 | - (void)removePicture { 397 | HBPreferences *preferences = [[HBPreferences alloc] initWithIdentifier:@"com.nahtedetihw.macpassprefs"]; 398 | [preferences removeObjectForKey:@"profilePicture"]; 399 | 400 | UIApplication *app = [UIApplication sharedApplication]; 401 | [app performSelector:@selector(suspend)]; 402 | [NSThread sleepForTimeInterval:1.0]; 403 | exit(0); 404 | 405 | AudioServicesPlaySystemSound(1519); 406 | } 407 | 408 | @end 409 | 410 | 411 | 412 | @implementation MACPASSAppearanceSettings: HBAppearanceSettings 413 | 414 | - (UIColor *)tintColor { 415 | 416 | return tintDynamicColor; 417 | 418 | } 419 | 420 | - (UIColor *)tableViewCellSeparatorColor { 421 | 422 | return [UIColor clearColor]; 423 | 424 | } 425 | 426 | 427 | @end 428 | -------------------------------------------------------------------------------- /macpassprefs/Makefile: -------------------------------------------------------------------------------- 1 | ARCHS = arm64 arm64e 2 | 3 | include $(THEOS)/makefiles/common.mk 4 | 5 | PREFIX=$(THEOS)/toolchain/Xcode.xctoolchain/usr/bin/ 6 | 7 | SYSROOT=$(THEOS)/sdks/iphoneos14.0.sdk 8 | 9 | BUNDLE_NAME = macpassprefs 10 | $(BUNDLE_NAME)_FILES = MACPASSPreferences.m 11 | $(BUNDLE_NAME)_INSTALL_PATH = /Library/PreferenceBundles 12 | $(BUNDLE_NAME)_FRAMEWORKS = UIKit 13 | $(BUNDLE_NAME)_PRIVATE_FRAMEWORKS = Preferences OnBoardingKit 14 | $(BUNDLE_NAME)_EXTRA_FRAMEWORKS = Cephei CepheiPrefs 15 | $(BUNDLE_NAME)_LIBRARIES += sparkcolourpicker imagepicker 16 | $(BUNDLE_NAME)_CFLAGS = -Wno-deprecated-declarations 17 | 18 | include $(THEOS_MAKE_PATH)/bundle.mk 19 | 20 | internal-stage:: 21 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) 22 | $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/macpassprefs.plist$(ECHO_END) 23 | -------------------------------------------------------------------------------- /macpassprefs/Resources/CHANGELOG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHANGELOG.png -------------------------------------------------------------------------------- /macpassprefs/Resources/CHANGELOG@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHANGELOG@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/CHANGELOG@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHANGELOG@3x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/CHECKMARK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHECKMARK.png -------------------------------------------------------------------------------- /macpassprefs/Resources/CHECKMARK@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHECKMARK@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/CHECKMARK@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/CHECKMARK@3x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | macpassprefs 9 | CFBundleIdentifier 10 | com.nahtedetihw.macpassprefs 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | NSPrincipalClass 22 | MACPASSPreferencesListController 23 | 24 | 25 | -------------------------------------------------------------------------------- /macpassprefs/Resources/PAYPAL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/PAYPAL.png -------------------------------------------------------------------------------- /macpassprefs/Resources/PAYPAL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/PAYPAL@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/PAYPAL@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/PAYPAL@3x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/Root.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSSwitchCell 10 | default 11 | 12 | defaults 13 | com.nahtedetihw.macpassprefs 14 | key 15 | enabled 16 | label 17 | Enable 18 | 19 | 20 | cell 21 | PSGroupCell 22 | label 23 | Background Blur Opacity 24 | 25 | 26 | cell 27 | PSSliderCell 28 | default 29 | 1 30 | defaults 31 | com.nahtedetihw.macpassprefs 32 | key 33 | blurOpacity 34 | max 35 | 1 36 | min 37 | 0 38 | isSegmented 39 | 40 | showValue 41 | 42 | PostNotification 43 | com.nahtedetihw.macpassprefs/ReloadPrefs 44 | 45 | 46 | cell 47 | PSGroupCell 48 | label 49 | Profile Picture 50 | 51 | 52 | cell 53 | PSLinkCell 54 | cellClass 55 | LIPImageChooseCell 56 | label 57 | Choose Image 58 | action 59 | chooseImage 60 | usesJPEG 61 | 62 | compressionQuality 63 | 0.4 64 | key 65 | profilePicture 66 | defaults 67 | com.nahtedetihw.macpassprefs 68 | PostNotification 69 | com.nahtedetihw.macpassprefs/preferences.changed 70 | 71 | 72 | cell 73 | PSButtonCell 74 | cellClass 75 | HBSpinnerTableCell 76 | label 77 | Remove Picture 78 | action 79 | removePicture 80 | 81 | 82 | cell 83 | PSGroupCell 84 | label 85 | Username 86 | 87 | 88 | cell 89 | PSButtonCell 90 | cellClass 91 | HBSpinnerTableCell 92 | label 93 | Choose username 94 | action 95 | chooseUsername 96 | 97 | 98 | cell 99 | PSGroupCell 100 | label 101 | Tint Color 102 | 103 | 104 | cell 105 | PSLinkCell 106 | cellClass 107 | SparkColourPickerCell 108 | libsparkcolourpicker 109 | 110 | defaults 111 | com.nahtedetihw.macpassprefs.color 112 | fallback 113 | #FFFFFF 114 | alpha 115 | 116 | PreviewGradient 117 | 118 | PreviewStyle 119 | 2 120 | 121 | label 122 | Tint Color 123 | key 124 | tintColor 125 | PostNotification 126 | com.nahtedetihw.macpassprefs/preferences.changed 127 | 128 | 129 | cell 130 | PSGroupCell 131 | label 132 | Passcode Type 133 | 134 | 135 | cell 136 | PSSegmentCell 137 | default 138 | 0 139 | defaults 140 | com.nahtedetihw.macpassprefs 141 | key 142 | passcodeType 143 | validValues 144 | 145 | 0 146 | 1 147 | 148 | validTitles 149 | 150 | Pinpad 151 | Qwerty 152 | 153 | alignment 154 | 1 155 | PostNotification 156 | com.nahtedetihw.macpassprefs/ReloadPrefs 157 | 158 | 159 | cell 160 | PSGroupCell 161 | label 162 | Passcode Characters 163 | 164 | 165 | cellClass 166 | HBStepperTableCell 167 | default 168 | 6 169 | defaults 170 | com.nahtedetihw.macpassprefs 171 | key 172 | passcodeCharacters 173 | label 174 | %i Characters 175 | max 176 | 30 177 | min 178 | 1 179 | singularLabel 180 | 1 Character 181 | PostNotification 182 | com.nahtedetihw.macpassprefs/ReloadPrefs 183 | 184 | 185 | cell 186 | PSGroupCell 187 | label 188 | Define the number of characters that are in your stock passcode 189 | 190 | 191 | cell 192 | PSGroupCell 193 | label 194 | 195 | 196 | 197 | cell 198 | PSGroupCell 199 | label 200 | Auto Unlock 201 | 202 | 203 | cell 204 | PSSwitchCell 205 | default 206 | 207 | defaults 208 | com.nahtedetihw.macpassprefs 209 | key 210 | enableAutomaticUnlock 211 | label 212 | Enable Passcode 213 | 214 | 215 | cell 216 | PSSwitchCell 217 | default 218 | 219 | defaults 220 | com.nahtedetihw.macpassprefs 221 | key 222 | enableAutomaticUnlockFaceID 223 | label 224 | Enable FaceID 225 | 226 | 227 | cell 228 | PSGroupCell 229 | label 230 | Startup 231 | 232 | 233 | cell 234 | PSSwitchCell 235 | default 236 | 237 | defaults 238 | com.nahtedetihw.macpassprefs 239 | key 240 | showOnStartup 241 | label 242 | Show On Startup 243 | 244 | 245 | cell 246 | PSGroupCell 247 | label 248 | Shows the passcode view right away (unless music is playing or notifications are present) 249 | 250 | 251 | cell 252 | PSGroupCell 253 | label 254 | 255 | 256 | 257 | cell 258 | PSGroupCell 259 | label 260 | 261 | 262 | 263 | cell 264 | PSSwitchCell 265 | default 266 | 267 | defaults 268 | com.nahtedetihw.macpassprefs 269 | key 270 | startWithKeyboard 271 | label 272 | Start With Keyboard 273 | 274 | 275 | cell 276 | PSGroupCell 277 | label 278 | Shows the keyboard right away 279 | 280 | 281 | cell 282 | PSGroupCell 283 | label 284 | 285 | 286 | 287 | cell 288 | PSGroupCell 289 | footerAlignment 290 | 1 291 | footerText 292 | MacPass 1.3 293 | 294 | 295 | cell 296 | PSGroupCell 297 | footerAlignment 298 | 1 299 | footerText 300 | 2021 © ETHN 301 | 302 | 303 | title 304 | 305 | 306 | 307 | -------------------------------------------------------------------------------- /macpassprefs/Resources/TWITTER.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/TWITTER.png -------------------------------------------------------------------------------- /macpassprefs/Resources/TWITTER@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/TWITTER@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/TWITTER@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/TWITTER@3x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/banner.png -------------------------------------------------------------------------------- /macpassprefs/Resources/changelogControllerIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/changelogControllerIcon.png -------------------------------------------------------------------------------- /macpassprefs/Resources/headerIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/headerIcon@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/headerIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/headerIcon@3x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/icon@2x.png -------------------------------------------------------------------------------- /macpassprefs/Resources/icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/macpassprefs/Resources/icon@3x.png -------------------------------------------------------------------------------- /macpassprefs/entry.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | entry 6 | 7 | bundle 8 | macpassprefs 9 | cell 10 | PSLinkCell 11 | detail 12 | MACPASSPreferencesListController 13 | icon 14 | icon.png 15 | isController 16 | 17 | label 18 | MacPass 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/com.nahtedetihw.macpass_1.3_iphoneos-arm.deb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nahtedetihw/MacPass/3503471dc938acc2c8c770601eb08dc8e72a0892/packages/com.nahtedetihw.macpass_1.3_iphoneos-arm.deb --------------------------------------------------------------------------------