Commit 1fd4f74b authored by Felix Paul Kühne's avatar Felix Paul Kühne

Reset passcode on update or re-installation

(cherry picked from commit 5ea5cb97)
parent d3760f8b
......@@ -6,6 +6,7 @@
* Fixed issues unlocking the app when a passcode was never set
* Fixed custom subtitles font sizes
* Fixed UPnP playback on iOS 7
* Note: when installing this update, a potentially configured passcode is reset.
......@@ -13,6 +13,7 @@
#define kVLCVersionCodename @"All Along the Watchtower"
#define kVLCSettingPasscodeResetOnUpgrade @"kVLCSettingPasscodeResetOnUpgrade"
#define kVLCSettingPasscodeOnKey @"PasscodeProtection"
#define kVLCSettingPasscodeAllowTouchID @"AllowTouchID"
#define kVLCSettingContinueAudioInBackgroundKey @"BackgroundAudioPlayback"
......@@ -76,8 +76,18 @@ NSString *const VLCPasscode = @"org.videolan.vlc-ios.passcode";
- (NSString *)_obtainPasscode
NSString *passcode = [SSKeychain passwordForService:VLCPasscode account:VLCPasscode];
return passcode;
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
BOOL wasReset = [defaults boolForKey:kVLCSettingPasscodeResetOnUpgrade];
if (wasReset) {
NSString *passcode = [SSKeychain passwordForService:VLCPasscode account:VLCPasscode];
return passcode;
[SSKeychain deletePasswordForService:VLCPasscode account:VLCPasscode];
[defaults setBool:YES forKey:kVLCSettingPasscodeResetOnUpgrade];
[defaults synchronize];
return nil;
- (BOOL)passcodeLockEnabled
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment