Commit 5aa4488e authored by Steve Johnson's avatar Steve Johnson

added reset to settings bundle

parent ca2edd07
......@@ -4,6 +4,16 @@
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Reset</string>
<key>Key</key>
<string>Reset</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
......
......@@ -80,10 +80,17 @@ static NSString *const kReceiverAppID = [NSString stringWithFormat: @"%s", MSE_C
if (guestObj == nil) {
[defaults setBool: true forKey: @"GuestMode"];
[defaults synchronize];
[defaults synchronize];
}
NSObject * resetObj = [defaults objectForKey:@"Reset"];
if (resetObj == nil) {
[defaults setBool: false forKey: @"Reset"];
[defaults synchronize];
}
guestMode = [defaults boolForKey:@"GuestMode"];
bool reset = [defaults boolForKey:@"Reset"];
pageLoaded = false;
......@@ -109,7 +116,13 @@ static NSString *const kReceiverAppID = [NSString stringWithFormat: @"%s", MSE_C
self.deviceMap = [NSMutableDictionary dictionaryWithCapacity:10];
self.deviceID = nil;
[self generateURL: false];
[self generateURL: reset];
if (reset) {
// Turn off the reset switch - use once.
[defaults setBool: false forKey: @"Reset"];
[defaults synchronize];
}
[self navigateHome];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment