Unregister app user
Unregistering an app user should be done when your app user decides to log out and use your app as a guest or when you no longer want the subsequent tickets to be associated with the current app user.
You're viewing the iOS docs. Other platforms → Android React Native Flutter Web
Unregistering is done by calling the Shake.unregisterUser
method:
- Objective-C
- Swift
UserManager.m
@implementation UserManager- (void)logOut {__weak typeof (SettingsViewModel) *weakSelf = self;[self.networkService performLogOutWithEmail:self.currentUser.email completion:^(LogOutResponse _Nullable logOutResponse, NSError * _Nullable error) {if (logOutResponse) {/// Succesfull log out[weakSelf performLogOutCleanup];[SHKShake unregisterUser];return;}}];}@end
UserManager.swift
func logOut {self.networkService.performLogOut(email: email) { [weak self] logOutResponse inif logOutResponse {self?.performLogOutCleanup();Shake.unregisterUser();return;}}}