diff --git a/Classes/UserVoice.m b/Classes/UserVoice.m index 85711f2c..3dcaf848 100755 --- a/Classes/UserVoice.m +++ b/Classes/UserVoice.m @@ -161,5 +161,12 @@ + (NSString *)version { return @"3.2.3"; } ++ (void)logoutUser{ + [[UVSession currentSession] clear]; + NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; + [prefs setObject:@"" forKey:@"uv-user-email"]; + [prefs setObject:@"" forKey:@"uv-user-name"]; + [prefs synchronize]; +} @end diff --git a/Include/UserVoice.h b/Include/UserVoice.h index d0f4e507..cf0c98de 100644 --- a/Include/UserVoice.h +++ b/Include/UserVoice.h @@ -46,6 +46,9 @@ // Get the current version number of the iOS SDK + (NSString *)version; +// Log out user and clear stored name and email ++ (void)logoutUser; + // For integration with other services + (void)setExternalId:(NSString *)identifier forScope:(NSString *)scope;