iOS Conversation: Logout

Discover how to perform user logouts in the Brand Messenger iOS SDK

Logout User

BrandMessenger SDK

Logout User logs the user out from the BrandMessenger server and clears all locally stored data for the user from BrandMessenger.

When a user logs out from your app, you must call this code:

BrandMessengerManager.logoutUser { success in
  // User is logout             
}
[BrandMessengerManager logoutUserWithCompletion:^(BOOL sucess) {
     if (sucess) {
         NSLog(@"Logout success");
     }
}];

📘

NOTE

When a user logs out, you need to reinitialize the BrandMessengerClient since all local data is cleared for the current user. As such, you need re-setup the Brand Messenger Company Key and Application Key.