Skip to content

@wmora wmora released this May 1, 2019 · 29 commits to master since this release


  • Added new protocol SKTAuthenticationDelegate which gets notified when a request fails because of an invalid JWT, allowing you to renew credentials without having to call [Smooch login:jwt:completionHandler:]. The delegate is set in SKTSettings before initialization.

Sample usage:

@interface MyAppDelegate() <SKTAuthenticationDelegate>


@implementation MyAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    SKTSettings* settings = [SKTSettings settingsWithAppId:@"my_app_id"];
    settings.authenticationDelegate = self;

    [Smooch initWithSettings:settings completionHandler:^(NSError * error, NSDictionary * userInfo) {
        // Code after init is complete

    return YES;

 *  Called when a request failed due to an invalid jwt. Call `completionHandler` to update the token
-(void)onInvalidToken:(NSError *)error handler:(SKTAuthenticationCompletionBlock)completionHandler
    // retrieve new token


API Additions

  1. Class SKTSettings
    • Added new property authenticationDelegate
  2. New protocol SKTAuthenticationDelegate
Assets 3