Skip to content

Commit

Permalink
Version v5.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wmora committed Apr 4, 2017
1 parent b27b78a commit f7b842c
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 66 deletions.
37 changes: 36 additions & 1 deletion DemoApp/Smooch.framework/Headers/SKTConversation.h
Expand Up @@ -334,11 +334,46 @@ extern NSString* const SKTConversationActivityKey;
* @param conversation The conversation object.
* @param message The action the user has taken.
*
* @deprecated Use conversation:shouldShowForAction:info instead
*
* @return YES to allow default handling. NO to suppress the conversation screen, and perform custom handling.
*
* @see SKTAction
*/
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action __attribute((deprecated("use conversation:shouldShowForAction:info instead")));

/**
* @abstract Asks the delegate if the conversation should show for the given action.
*
* @discussion Called when the user performs an action that causes the conversation screen to show. Return NO to cancel the display of the conversation screen and perform your own handling of the action.
*
* @param conversation The conversation object.
* @param message The action the user has taken.
* @param info An instance of NSDictionary with a `message` object with the latest SKTMessage represented as an NSDictionary
*
* @return YES to allow default handling. NO to suppress the conversation screen, and perform custom handling.
*
* @see SKTAction
*/
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action;
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action withInfo:(nullable NSDictionary *) info;

/**
* @abstract Gives the delegate the option to modify a message before it is sent
*
* @discussion Called when a message is about to be sent to give the delegate the option of modify or decorate its content (i.e. add metadata) before sending to Smooch
*
* @return the message to be sent
*/
-(SKTMessage *)conversation:(SKTConversation*)conversation willSendMessage:(SKTMessage *)message;

/**
* @abstract Gives the delegate the option to modify a message before it is displayed. If nil is returned the message will be hidden
*
* @discussion Called when a message is about to be displayed to the user to give the delegate the option of modifying its content before display or hide it
*
* @return the message to be displayed. If nil, the message won't get displayed
*/
-(nullable SKTMessage *)conversation:(SKTConversation*)conversation willDisplayMessage:(SKTMessage *)message;

/**
* @abstract Notifies the delegate of new incoming messages.
Expand Down
16 changes: 8 additions & 8 deletions DemoApp/Smooch.framework/Headers/SKTMessage.h
Expand Up @@ -82,22 +82,22 @@ typedef NS_ENUM(NSInteger, SKTMessageUploadStatus) {
/**
* @abstract The text content of the message. May be nil if mediaUrl or actions are provided
*/
@property(readonly, nullable) NSString* text;
@property(nullable) NSString* text;

/**
* @abstract The name of the author. This property may be nil if no name could be determined.
*/
@property(readonly, nullable) NSString* name;
@property(nullable) NSString* name;

/**
* @abstract The url for the author's avatar image. May be nil
*/
@property(readonly, nullable) NSString* avatarUrl;
@property(nullable) NSString* avatarUrl;

/**
* @abstract The date and time the message was sent
*/
@property(readonly, nullable) NSDate *date;
@property(nullable) NSDate *date;

/**
* @abstract Returns YES if the message was generated by a Whisper.
Expand Down Expand Up @@ -128,14 +128,14 @@ typedef NS_ENUM(NSInteger, SKTMessageUploadStatus) {
/**
* @abstract The url to the image asset, if applicable. Returns nil if the message is not an image message.
*/
@property(readonly, nullable) NSString* mediaUrl;
@property(nullable) NSString* mediaUrl;

/**
* @abstract The type the message.
*
* @discussion Valid types include SKTMessageTypeText, SKTMessageTypeImage, and SKTMessageTypeLocation
*/
@property(readonly, nullable) NSString* type;
@property(nullable) NSString* type;

/**
* @abstract Coordinates for a location for a message of type SKTMessageTypeLocation
Expand All @@ -159,13 +159,13 @@ typedef NS_ENUM(NSInteger, SKTMessageUploadStatus) {
*
* @discussion A flat dictionary of metadata set through the REST API. May be nil.
*/
@property(readonly, nullable) NSDictionary* metadata;
@property(nullable) NSDictionary* metadata;

/**
* @abstract The payload of an action with type SKTMessageActionTypeReply
*
* @discussion The payload of a SKTMessageActionTypeReply, if applicable. May be nil
*/
@property(readonly, nullable) NSString* payload;
@property(nullable) NSString* payload;

@end
18 changes: 9 additions & 9 deletions DemoApp/Smooch.framework/Headers/SKTMessageAction.h
Expand Up @@ -61,42 +61,42 @@ extern NSString* _Nonnull const SKTMessageActionStatePaid;
*
* @discussion Valid types include `SKTMessageActionTypeLink` for regular actions, and `SKTMessageActionTypeBuy` for buy actions.
*/
@property(readonly, nullable) NSString* type;
@property(nullable) NSString* type;

/**
* @abstract The text to display as a descriptor for the action.
*
* @discussion May not be nil.
*/
@property(readonly, nullable) NSString* text;
@property(nullable) NSString* text;

/**
* @abstract The URI to navigate to if the user interacts with the action.
*
* @discussion May not be nil if message is of type `SKTMessageActionTypeLink`
*/
@property(readonly, nullable) NSURL* uri;
@property(nullable) NSURL* uri;

/**
* @abstract Metadata associated with the action.
*
* @discussion A flat dictionary of metadata set through the REST API. May be nil.
*/
@property(readonly, nullable) NSDictionary* metadata;
@property(nullable) NSDictionary* metadata;

/**
* @abstract Icon to display with a reply
*
* @discussion An icon to render next to the reply option
*/
@property(readonly, nullable) NSString* iconUrl;
@property(nullable) NSString* iconUrl;

/**
* @abstract The payload of actions with type SKTMessageActionTypeReply or SKTMessageActionTypePostback
*
* @discussion The payload of actions with type SKTMessageActionTypeReply or SKTMessageActionTypePostback, if applicable. May be nil
*/
@property(readonly, nullable) NSString* payload;
@property(nullable) NSString* payload;

#pragma mark - Buy actions

Expand All @@ -105,20 +105,20 @@ extern NSString* _Nonnull const SKTMessageActionStatePaid;
*
* @discussion This property is only non-nil for actions of type `SKTMessageActionTypeBuy`. Valid states include `SKTMessageActionStateOffered` and `SKTMessageActionStatePaid`.
*/
@property(readonly, nullable) NSString* state;
@property(nullable) NSString* state;

/**
* @abstract The amount of money to charge for the action.
*
* @discussion This property is only valid for actions of type `SKTMessageActionTypeBuy`. For USD, this value is in cents.
*/
@property(readonly) long amount;
@property long amount;

/**
* @abstract The currency in which the `amount` is expressed.
*
* @discussion This property is only valid for actions of type `SKTMessageActionTypeBuy`.
*/
@property(readonly, nullable) NSString* currency;
@property(nullable) NSString* currency;

@end
12 changes: 10 additions & 2 deletions DemoApp/Smooch.framework/Headers/Smooch.h
@@ -1,7 +1,7 @@
//
// Smooch.h
// Smooch
// version : 5.5.2
// version : 5.6.0
//
// Copyright (c) 2015 Smooch Technologies. All rights reserved.
//
Expand All @@ -14,7 +14,7 @@
NS_ASSUME_NONNULL_BEGIN
@protocol UNUserNotificationCenterDelegate;

#define SMOOCH_VERSION @"5.5.2"
#define SMOOCH_VERSION @"5.6.0"

FOUNDATION_EXPORT double SmoochVersionNumber;
FOUNDATION_EXPORT const unsigned char SmoochVersionString[];
Expand Down Expand Up @@ -102,6 +102,14 @@ extern NSString* const SKTInitializationDidCompleteNotification;
*/
+(void)close;

/**
* @abstract Destroys the Smooch SDK
*
* @discussion Smooch is automatically terminated when the application exits. This method does not need to be called manually
*
*/
+(void)destroy;

/**
* @abstract Presents the Smooch conversation screen, using the given view controller as presenting view controller.
*
Expand Down
Binary file modified DemoApp/Smooch.framework/Info.plist
Binary file not shown.
Binary file modified DemoApp/Smooch.framework/Smooch
Binary file not shown.
26 changes: 13 additions & 13 deletions DemoApp/Smooch.framework/_CodeSignature/CodeResources
Expand Up @@ -6,7 +6,7 @@
<dict>
<key>Headers/SKTConversation.h</key>
<data>
bz8GHJedEGYMWva7zEDCs9GveWo=
1bft6O3haNc7CcS6PQRfHh4dclg=
</data>
<key>Headers/SKTConversationActivity.h</key>
<data>
Expand All @@ -18,11 +18,11 @@
</data>
<key>Headers/SKTMessage.h</key>
<data>
uUA4n43jDkiz7lbq2EUElPL52/8=
zLbUgu/x8Z4g3NENTrwM0J5vU6I=
</data>
<key>Headers/SKTMessageAction.h</key>
<data>
h3NP0IRFPL/8h8LjGxM6ZZ3ySVU=
Bc2IWQlbwjFfkWAul4/nI/RJMz0=
</data>
<key>Headers/SKTSettings.h</key>
<data>
Expand All @@ -34,11 +34,11 @@
</data>
<key>Headers/Smooch.h</key>
<data>
clRYeRISDiVKrNUguBqGo73V3Zg=
GBDjrorCjcIg7BCtBg//3qlFWjo=
</data>
<key>Info.plist</key>
<data>
bAmg+bB+k0IXe1DntLt63pR7V+8=
ZPDdqtbz7voIxlrdkAYag8cEeTQ=
</data>
<key>Modules/module.modulemap</key>
<data>
Expand Down Expand Up @@ -361,11 +361,11 @@
<dict>
<key>hash</key>
<data>
bz8GHJedEGYMWva7zEDCs9GveWo=
1bft6O3haNc7CcS6PQRfHh4dclg=
</data>
<key>hash2</key>
<data>
i8fR1N6cNrgltfZ3/IcPBT6v1bH4BkQAiExzVYSj/h4=
D3dYvkMEqxr0PyT0OvuqpHDEvLCVJ2bgtjt1KoyZkxU=
</data>
</dict>
<key>Headers/SKTConversationActivity.h</key>
Expand Down Expand Up @@ -394,22 +394,22 @@
<dict>
<key>hash</key>
<data>
uUA4n43jDkiz7lbq2EUElPL52/8=
zLbUgu/x8Z4g3NENTrwM0J5vU6I=
</data>
<key>hash2</key>
<data>
bP93rO6DWiVPEwOHllO9Tn/R9agxSdwpXGPJCFk8lGQ=
VruyImNhwcpjwJWhrgOnoZdam2vHJhF16hiOaGldKQU=
</data>
</dict>
<key>Headers/SKTMessageAction.h</key>
<dict>
<key>hash</key>
<data>
h3NP0IRFPL/8h8LjGxM6ZZ3ySVU=
Bc2IWQlbwjFfkWAul4/nI/RJMz0=
</data>
<key>hash2</key>
<data>
hDqyxqoCxPzN0FFoQHzp36GuyxPab2SudSikKf2VzSI=
rewC611QPNHZDEJbCg8QDlw22/7OqGyUCBLDRU2OA3Y=
</data>
</dict>
<key>Headers/SKTSettings.h</key>
Expand Down Expand Up @@ -438,11 +438,11 @@
<dict>
<key>hash</key>
<data>
clRYeRISDiVKrNUguBqGo73V3Zg=
GBDjrorCjcIg7BCtBg//3qlFWjo=
</data>
<key>hash2</key>
<data>
taaxUQHPEG1Fc7vWFYNdjaTLvLmePMhrsEzMEyba/BQ=
ERWTjrh4k3GP5KAPJEPyrCCX6h9F2mKEv7p5tVi4FTU=
</data>
</dict>
<key>Modules/module.modulemap</key>
Expand Down
37 changes: 36 additions & 1 deletion Smooch.framework/Headers/SKTConversation.h
Expand Up @@ -334,11 +334,46 @@ extern NSString* const SKTConversationActivityKey;
* @param conversation The conversation object.
* @param message The action the user has taken.
*
* @deprecated Use conversation:shouldShowForAction:info instead
*
* @return YES to allow default handling. NO to suppress the conversation screen, and perform custom handling.
*
* @see SKTAction
*/
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action __attribute((deprecated("use conversation:shouldShowForAction:info instead")));

/**
* @abstract Asks the delegate if the conversation should show for the given action.
*
* @discussion Called when the user performs an action that causes the conversation screen to show. Return NO to cancel the display of the conversation screen and perform your own handling of the action.
*
* @param conversation The conversation object.
* @param message The action the user has taken.
* @param info An instance of NSDictionary with a `message` object with the latest SKTMessage represented as an NSDictionary
*
* @return YES to allow default handling. NO to suppress the conversation screen, and perform custom handling.
*
* @see SKTAction
*/
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action;
-(BOOL)conversation:(SKTConversation*)conversation shouldShowForAction:(SKTAction)action withInfo:(nullable NSDictionary *) info;

/**
* @abstract Gives the delegate the option to modify a message before it is sent
*
* @discussion Called when a message is about to be sent to give the delegate the option of modify or decorate its content (i.e. add metadata) before sending to Smooch
*
* @return the message to be sent
*/
-(SKTMessage *)conversation:(SKTConversation*)conversation willSendMessage:(SKTMessage *)message;

/**
* @abstract Gives the delegate the option to modify a message before it is displayed. If nil is returned the message will be hidden
*
* @discussion Called when a message is about to be displayed to the user to give the delegate the option of modifying its content before display or hide it
*
* @return the message to be displayed. If nil, the message won't get displayed
*/
-(nullable SKTMessage *)conversation:(SKTConversation*)conversation willDisplayMessage:(SKTMessage *)message;

/**
* @abstract Notifies the delegate of new incoming messages.
Expand Down

0 comments on commit f7b842c

Please sign in to comment.