Skip to content

@mspensieri mspensieri released this Sep 7, 2016 · 98 commits to master since this release

Notifications. Notifications Everywhere

Rich Notifications

Replyable Notifications

Smooch notifications now include a category to allow the user to reply directly to the notification. Now the user can reply to your messages without ever leaving the lock screen!

In-App System Notifications

With the release of iOS 10, applications can now present system notifications while your application is in the foreground. Smooch takes advantage of this, when available, to display a system notification to the user, rather than the default Smooch in-app notification. Users can reply inline, and view a snapshot of the conversation history while doing so (see the next section on rich notifications).

If the user has not granted permission to display system notifications, or if they are running an iOS version earlier than 10.0, the default Smooch notification will be displayed instead.

iOS Rich Notifications

This versions adds support for rich notifications, a new concept in iOS 10. To set up your Notification Content extension, see for instructions and code.

Xcode 8

Due to the addition of new iOS 10 notification functionality, Xcode 8 is now required to compile. Users who wish to stay on Xcode 7 should continue to use the 4.x branch of releases.

Upgrade Guide

If your app sets enableAppDelegateSwizzling or requestPushPermissionOnFirstMessage to NO on your SKTSettings object, there are some changes required to ensure that Smooch continues to function correctly.

  • If enableAppDelegateSwizzling is set to NO, your app will need to invoke Smooch in the -application:handleActionWithIdentifier:forRemoteNotification:withResponseInfo:completionHandler: method of your UIApplicationDelegate
-(void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo withResponseInfo:(NSDictionary *)responseInfo completionHandler:(void (^)())completionHandler
    if([identifier isEqualToString:SKTUserNotificationReplyActionIdentifier]){
        [Smooch handleUserNotificationActionWithIdentifier:identifier withResponseInfo:responseInfo completionHandler:completionHandler];
  • If requestPushPermissionOnFirstMessage is set to NO, you application should register the Smooch notification categories when it requests push permission from the user
if(floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_9_x_Max) {
    [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[Smooch userNotificationCategories]];
    UIUserNotificationSettings* settings = [UIUserNotificationSettings settingsForTypes:types categories:[Smooch userNotificationCategories]];
    [[UIApplication sharedApplication] registerUserNotificationSettings:settings];

Required Property Keys

Beginning on iOS 10, the keys NSCameraUsageDescription and NSPhotoLibraryUsageDescription are required in your application's Info.plist file for requesting access to the device's camera and user's photo library. If the app attempts to access these features without the corresponding purpose string, the app will exit.

API Additions

  1. Class Smooch
    • Added new methods +userNotificationCenterDelegate, +handleUserNotificationActionWithIdentifier:withResponseInfo:completionHandler:, and +userNotificationCategories
    • Added new constants SKTUserNotificationReplyActionIdentifier and SKTUserNotificationReplyCategoryIdentifier
  2. Class SKTSettings
    • Added new property enableUserNotificationCenterDelegateOverride
Assets 3
You can’t perform that action at this time.