Skip to content

Commit

Permalink
v 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pkwak-sf committed May 14, 2022
1 parent 2601a91 commit af51906
Show file tree
Hide file tree
Showing 58 changed files with 745 additions and 269 deletions.
2 changes: 1 addition & 1 deletion BrandMessenger.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "BrandMessenger"
s.version = "1.2.0"
s.version = "1.3.0"
s.summary = "BrandMessenger"
s.description = "Messaging and Chat API for Mobile Apps and Websites"
s.homepage = "https://khoros.com"
Expand Down
14 changes: 7 additions & 7 deletions BrandMessengerCore.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>BrandMessengerCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>BrandMessengerCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ FOUNDATION_EXPORT const unsigned char BrandMessengerCoreVersionString[];
#import "TSBlurView.h"
#import "TSMessage.h"
#import "TSMessageView.h"
#import "KBMCertificatePinningHandler.h"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
/// second part of new auth. Calls register(login) to applozic with credentials from preRegistrationAuth.
+ (void)loginFromAuthHandlerResponse:(NSDictionary*)response withCompletion:(void (^)(KBMRegistrationResponse * _Nullable response, NSError * _Nullable error))completion;

/// make welcome-message API Request.
+ (void) sendWelcomeMessageRequestWithCompletion:(void (^)(NSDictionary * _Nullable responseDictionary, NSError * _Nullable error))completion;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// KBMCertificatePinningHandler.h
// BrandMessengerCore
//
// Created by Paul Kwak on 2/9/22.
//

#import <Foundation/Foundation.h>

@interface KBMCertificatePinningHandler : NSObject <NSURLSessionDelegate>

+ (KBMCertificatePinningHandler *)sharedInstance;

+ (NSURLSession*)sharedSession;

- (void) setPinningCertificateURLs:(NSArray<NSURL*>*)urls forDomains:(NSArray<NSString*>*)domains;

- (void) setPinningCertificatePublicKeys:(NSArray<NSString*>*)keys forDomains:(NSArray<NSString*>*)domains;

- (BOOL) isPinningEnabled;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static NSString* KBM_USER_AUTH_TOKEN = @"KBM_USER_AUTH_TOKEN";
/// Delegate protocol for encryption events.
@protocol KBMEncryptionDelegate <NSObject>
@required
-(void)putSecureValueWithKey:(NSString*)key withValue:(NSString*)value;
-(bool)putSecureValueWithKey:(NSString*)key withValue:(NSString*)value;
@required
-(NSString*)getSecureValueWithKey:(NSString*)key;
@required
Expand Down Expand Up @@ -119,7 +119,7 @@ static NSString *const KBM_REGION_APAC = @"APAC";
+ (NSNumber *)getUserBlockLastTimeStamp;

+ (NSString *)getPassword;
+ (void)setPassword:(NSString *)password;
+ (BOOL)setPassword:(NSString *)password;

+ (void)setAppModuleName:(NSString *)appModuleName;
+ (NSString *)getAppModuleName;
Expand Down Expand Up @@ -216,7 +216,7 @@ static NSString *const KBM_REGION_APAC = @"APAC";
+ (void)disableChat:(BOOL)disable;
+ (BOOL)isChatDisabled;

+ (void)setAuthToken:(NSString *)authToken;
+ (BOOL)setAuthToken:(NSString *)authToken;
+ (NSString *)getAuthToken;

+ (void)setAuthTokenCreatedAtTime:(NSNumber *)createdAtTime;
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ FOUNDATION_EXPORT const unsigned char BrandMessengerCoreVersionString[];
#import "TSBlurView.h"
#import "TSMessage.h"
#import "TSMessageView.h"
#import "KBMCertificatePinningHandler.h"
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ NS_ASSUME_NONNULL_BEGIN
/// second part of new auth. Calls register(login) to applozic with credentials from preRegistrationAuth.
+ (void)loginFromAuthHandlerResponse:(NSDictionary*)response withCompletion:(void (^)(KBMRegistrationResponse * _Nullable response, NSError * _Nullable error))completion;

/// make welcome-message API Request.
+ (void) sendWelcomeMessageRequestWithCompletion:(void (^)(NSDictionary * _Nullable responseDictionary, NSError * _Nullable error))completion;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// KBMCertificatePinningHandler.h
// BrandMessengerCore
//
// Created by Paul Kwak on 2/9/22.
//

#import <Foundation/Foundation.h>

@interface KBMCertificatePinningHandler : NSObject <NSURLSessionDelegate>

+ (KBMCertificatePinningHandler *)sharedInstance;

+ (NSURLSession*)sharedSession;

- (void) setPinningCertificateURLs:(NSArray<NSURL*>*)urls forDomains:(NSArray<NSString*>*)domains;

- (void) setPinningCertificatePublicKeys:(NSArray<NSString*>*)keys forDomains:(NSArray<NSString*>*)domains;

- (BOOL) isPinningEnabled;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static NSString* KBM_USER_AUTH_TOKEN = @"KBM_USER_AUTH_TOKEN";
/// Delegate protocol for encryption events.
@protocol KBMEncryptionDelegate <NSObject>
@required
-(void)putSecureValueWithKey:(NSString*)key withValue:(NSString*)value;
-(bool)putSecureValueWithKey:(NSString*)key withValue:(NSString*)value;
@required
-(NSString*)getSecureValueWithKey:(NSString*)key;
@required
Expand Down Expand Up @@ -119,7 +119,7 @@ static NSString *const KBM_REGION_APAC = @"APAC";
+ (NSNumber *)getUserBlockLastTimeStamp;

+ (NSString *)getPassword;
+ (void)setPassword:(NSString *)password;
+ (BOOL)setPassword:(NSString *)password;

+ (void)setAppModuleName:(NSString *)appModuleName;
+ (NSString *)getAppModuleName;
Expand Down Expand Up @@ -216,7 +216,7 @@ static NSString *const KBM_REGION_APAC = @"APAC";
+ (void)disableChat:(BOOL)disable;
+ (BOOL)isChatDisabled;

+ (void)setAuthToken:(NSString *)authToken;
+ (BOOL)setAuthToken:(NSString *)authToken;
+ (NSString *)getAuthToken;

+ (void)setAuthTokenCreatedAtTime:(NSNumber *)createdAtTime;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</data>
<key>Headers/BrandMessengerCore.h</key>
<data>
EdId1x8LNPYPdYASd3PFRm4ro6w=
0zpf8zeW/a19tJokDTbkDRUvAPs=
</data>
<key>Headers/BrandMessengerSettings.h</key>
<data>
Expand Down Expand Up @@ -118,12 +118,16 @@
</data>
<key>Headers/KBMAuthClientService.h</key>
<data>
IZUfRRmmBbIHYieNjDIFGMEQmII=
f/0ecvxbCBTgXfcp/kSyZMzfolI=
</data>
<key>Headers/KBMAuthService.h</key>
<data>
jY1ALONunLVCp4hePMHIO+fgPBs=
</data>
<key>Headers/KBMCertificatePinningHandler.h</key>
<data>
xbSPEch5Of9QIB74Sh3mOM6vSNU=
</data>
<key>Headers/KBMChannel.h</key>
<data>
ymcGUbdqV+IsNcR6zWIbZM0xeuc=
Expand Down Expand Up @@ -406,7 +410,7 @@
</data>
<key>Headers/KBMUserDefaultsHandler.h</key>
<data>
IlU5EV1T+PK4+kZd/IXTB/P/eJY=
bW/H9T2sddDzlZasheZ/EWgMNMs=
</data>
<key>Headers/KBMUserDetail.h</key>
<data>
Expand Down Expand Up @@ -530,7 +534,7 @@
</data>
<key>Info.plist</key>
<data>
IRmaTjF/y2KSXYU229PW6x3VYrk=
6Nfcw6PCeLIQcBPa/Uc/6Fp6D5U=
</data>
<key>MQTTClient.momd/MQTTClient.mom</key>
<data>
Expand Down Expand Up @@ -735,11 +739,11 @@
<dict>
<key>hash</key>
<data>
EdId1x8LNPYPdYASd3PFRm4ro6w=
0zpf8zeW/a19tJokDTbkDRUvAPs=
</data>
<key>hash2</key>
<data>
5VA1b/qHwTox/BaHL4dZ/oTCWDG8PRlhZMXO4fzwldM=
OG+o7uDTrWAcs0RIOIyxkbcIKuJLTh3D6vGvcu263PI=
</data>
</dict>
<key>Headers/BrandMessengerSettings.h</key>
Expand Down Expand Up @@ -867,11 +871,11 @@
<dict>
<key>hash</key>
<data>
IZUfRRmmBbIHYieNjDIFGMEQmII=
f/0ecvxbCBTgXfcp/kSyZMzfolI=
</data>
<key>hash2</key>
<data>
i+NjEerc8EGxd4A6ffLPRUptTxpE0wuN2ITeAWcyEAw=
8uio7x3zwAIC5fH1sVAGrW4/9hXUcFH9t3OR4XLNxxw=
</data>
</dict>
<key>Headers/KBMAuthService.h</key>
Expand All @@ -885,6 +889,17 @@
ekzCfFy0WnXUOJoShSTtORgQO0aB5PHlJ75h0L4DFww=
</data>
</dict>
<key>Headers/KBMCertificatePinningHandler.h</key>
<dict>
<key>hash</key>
<data>
xbSPEch5Of9QIB74Sh3mOM6vSNU=
</data>
<key>hash2</key>
<data>
Hi5m9Rh83FCEOqvfSjZPSfabKfxGjVZ8rsLyB4flEeQ=
</data>
</dict>
<key>Headers/KBMChannel.h</key>
<dict>
<key>hash</key>
Expand Down Expand Up @@ -1659,11 +1674,11 @@
<dict>
<key>hash</key>
<data>
IlU5EV1T+PK4+kZd/IXTB/P/eJY=
bW/H9T2sddDzlZasheZ/EWgMNMs=
</data>
<key>hash2</key>
<data>
AGtFu+XX1WNlsqKuM8Z+ym4oKjRwu/6omHAt6w/7GS4=
i2QDCM3wC0hnVitYlyWjUqNRz0f+lwmefjKSTk9WOxY=
</data>
</dict>
<key>Headers/KBMUserDetail.h</key>
Expand Down
10 changes: 5 additions & 5 deletions BrandMessengerUI.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>BrandMessengerUI.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>BrandMessengerUI.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ SWIFT_CLASS("_TtC16BrandMessengerUI19AutoCompleteManager")
@protocol KBMAuthenticationDelegate;
@protocol KBMConversationDelegate;
@protocol KBMEncryptionDelegate;
@class NSURL;

SWIFT_CLASS("_TtC16BrandMessengerUI21BrandMessengerManager")
@interface BrandMessengerManager : NSObject
Expand Down Expand Up @@ -389,19 +390,36 @@ SWIFT_CLASS("_TtC16BrandMessengerUI21BrandMessengerManager")
/// \param viewController Provide a viewcontroller to present conversation from. If not provided, the sdk will try to find the top viewcontroller of UIApplication.shared.keyWindow?.rootViewController and present from there. If none can be found, this func does nothing.
///
+ (void)show:(UIViewController * _Nullable)viewController;
/// Start conversationwith default agent and make a welcome-message request API call.
/// \param viewController Provide a viewcontroller to present conversation from. If not provided, the sdk will try to find the top viewcontroller of UIApplication.shared.keyWindow?.rootViewController and present from there. If none can be found, this func does nothing.
///
+ (void)showWithWelcome:(UIViewController * _Nullable)viewController;
/// Get default Agent Id
+ (NSString * _Nonnull)getDefaultAgentId SWIFT_WARN_UNUSED_RESULT;
/// convenience to set authenticationdelegate.
+ (void)setAuthenticationDelegate:(id <KBMAuthenticationDelegate> _Nonnull)del;
+ (void)isAuthenticatedWithCompletion:(void (^ _Nonnull)(BOOL))completion;
/// Call to set region. Determines the domains this app connects to.
/// \param region US or APAC. Default when not set is APAC.
///
+ (void)setRegion:(NSString * _Nonnull)region;
+ (void)useDebugUser:(BOOL)use;
/// Call from appDelegate before calling application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]?)
/// Using will make onAppDidBecomeActive NOT proactivelyConnectMQTT or syncMessages
+ (void)doNotAutosubscribeOnLaunch:(BOOL)use;
/// Call to set KBMConversationDelegate, which allows adding/overriding metadata onto outgoing messages.
+ (void)setConversationDelegate:(id <KBMConversationDelegate> _Nonnull)delegate;
/// Call to set KBMEncryiptionDelegate, allowing application to handle encryption and storage of auth-token and password.
+ (void)setEncryptionDelegate:(id <KBMEncryptionDelegate> _Nonnull)delegate;
/// Make a welcome-message request API call
+ (void)sendWelcomeMessageRequestWithComplete:(void (^ _Nonnull)(NSDictionary * _Nullable, NSError * _Nullable))complete;
/// Enable certificate pinning with array of public keys.
+ (void)setPinningCertificatePublicKeys:(NSArray<NSString *> * _Nonnull)keys;
/// Enable certificate pinning with array der certificate URLs.
+ (void)setPinningCertificates:(NSArray<NSURL *> * _Nonnull)certificates;
/// Enable default certificate pinning on default baseUrl ‘brandmessenger.khoros.com’
/// TODO: Need to get more backup keys.
+ (void)enableDefaultCertificatePinning;
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
@end
Expand Down Expand Up @@ -662,10 +680,11 @@ SWIFT_CLASS("_TtC16BrandMessengerUI29KBMConversationViewController")
@interface KBMConversationViewController : KBMBaseViewController
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER;
- (void)viewWillAppear:(BOOL)animated;
- (void)viewDidAppear:(BOOL)_;
- (void)viewDidAppear:(BOOL)animated;
- (void)viewDidLoad;
- (void)viewDidLayoutSubviews;
- (void)viewWillDisappear:(BOOL)animated;
- (void)viewDidDisappear:(BOOL)animated;
- (void)pushNotificationWithNotification:(NSNotification * _Nonnull)notification;
- (void)scrollViewWillBeginDecelerating:(UIScrollView * _Nonnull)_;
- (void)invalidateTimerAndUpdateHeightConstraint:(NSTimer * _Nullable)_;
Expand Down Expand Up @@ -769,7 +788,6 @@ SWIFT_CLASS("_TtC16BrandMessengerUI18KBMGenericCardCell")
@end



SWIFT_CLASS("_TtC16BrandMessengerUI24KBMIndexedCollectionView")
@interface KBMIndexedCollectionView : UICollectionView
- (nonnull instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout * _Nonnull)layout OBJC_DESIGNATED_INITIALIZER;
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit af51906

Please sign in to comment.