Skip to content

Commit

Permalink
iOS changes
Browse files Browse the repository at this point in the history
  • Loading branch information
GillesC committed Jun 23, 2016
1 parent ef79422 commit c231d66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Binary file removed src/ios/._NativeStorage.m
Binary file not shown.
4 changes: 1 addition & 3 deletions src/ios/NativeStorage.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ - (void) remove: (CDVInvokedUrlCommand*) command
- (void) clear: (CDVInvokedUrlCommand*) command
{
[self.commandDelegate runInBackground:^{
CDVPluginResult* pluginResult = nil;

CDVPluginResult* pluginResult = nil;
[[NSUserDefaults standardUserDefaults] removePersistentDomainForName:[[NSBundle mainBundle] bundleIdentifier]];
BOOL success = [[NSUserDefaults standardUserDefaults] synchronize];
if(success) pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_OK];
else pluginResult = [CDVPluginResult resultWithStatus: CDVCommandStatus_ERROR messageAsString:@"Clear has failed"];

[self.commandDelegate sendPluginResult:pluginResult callbackId: command.callbackId];
}];
}
Expand Down

0 comments on commit c231d66

Please sign in to comment.