diff --git a/Changelog.md b/Changelog.md index 5318150..5126bbc 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,18 +1,26 @@ +# SDK Changelog + +- __SDK 2.6.2__ + + - Correct bug 121236 inapp/mainaction from push not called without connectivity + - Correct bug 143115 inapp message webview navigation arrows disabled + - Removed processing of optiex url from inside sdk + - __SDK 2.6.1__ - Provide device id to main app - Provide delegate to allow app to process links contained in an inapp message of type url - Add Push InApp Message payload to InApp Message cache - Provide a delegate to allow app to manage display on app side of InApp Message linked to a remote notification - + - __SDK 2.6__ - - Provide the sdk as a .xcframework + - Provide the SDK as a .xcframework - Remove geolocalisation api references from core sdk - __SDK 2.5.2__ - - Correct bug 136398 conflict with SDWebImagePDFCoder that avoid displays of images + - Correct bug 136398 conflict with `SDWebImagePDFCoder` that avoid displays of images - __SDK 2.5.1__ @@ -25,11 +33,11 @@ - __SDK 2.5__ - - provide flexibility to In App Message by giving access to public methods and properties that will enable developer to process content - + - Provide flexibility to In App Message by giving access to public methods and properties that will enable developer to process content + - __SDK 2.4.1__ - - Support of iOS 14 + - Support of iOS14 - Correct bug 109032 property contentCreation (creation date) of In AppContent public - documentation update to avoid call to serviceExtensionTimeWillExpire resulting in (Encrypted) displayed even when encryption not applied - Correct bug 113738 Events are sent twice @@ -37,25 +45,25 @@ - __SDK 2.4__ - Support of rich push of type image - - Correct bug 104272 provide an override method to send SMEventUserLogin and avoiding login with providing empty mail + - Correct bug 104272 provide an override method to send `SMEventUserLogin` and avoiding login with providing empty mail - Remove code that forces having to ask for camera permissions in plist file - __SDK 2.3.1__ - - Correct bug 102254 set way to provide app group id to the sdk + - Correct bug 102254 set way to provide App Group Id to the SDK - __SDK 2.3__ - - - Support call to didReceiveNotification Response: to allow trigger action of notification content extension without opening app + + - Support call to `didReceiveNotification Response:` to allow trigger action of notification content extension without opening app - Correct bug 102401 inappmessage flag was not set correctly - __SDK 2.2.1__ - - Correct bug 100688 manage useragent without usage of WKWebView + - Correct bug 100688 manage useragent without usage of `WKWebView` - __SDK 2.2__ - - Correct bug 96667 UIWebView deprecation - use WKWebView instead + - Correct bug 96667 `UIWebView` deprecation - use `WKWebView` instead - Correct bug 96827 Buttons inside inapp messages (url/html/image) don't work in SwiftUI - Correct bug 90501 add robustness to check if device was already registered - Add robustness when parsing plotID @@ -66,11 +74,11 @@ - __SDK 2.0.3__ - - format devicetoken without using of NSData description property for better support of Xcode11 and iOS 13 + - format devicetoken without using of `NSData` description property for better support of Xcode11 and iOS 13 - __SDK 2.0.2.1__ - - Correct bug 86049 User are optouted when app is reinstalled with v2.0.2 + - Correct bug 86049 User are optouted when App is reinstalled with v2.0.2 - __SDK 2.0.2__ @@ -81,7 +89,7 @@ - Correct all swift warnings - Correct mainaction value of open browser type is not decrypted in a simple push - Correct bug 73088 inapp message controller not dismissed when clicking on deeplink button - - Correct bug 77309 conflict with anvato sdk due to common crypto library + - Correct bug 77309 conflict with anvato SDK due to common crypto library - Correct bug 74898 inapp message of type map is not displayed - Correct bug 70428 shouldDisplayRemoteNotification impeach send pushopened event - Correct bug 69351 unregister notification functionality in not working correctly @@ -95,7 +103,7 @@ - __SDK 2.0__ - Support decryption of remote notification - - Changed the way the sdk is initialized from inside a notification extension + - Changed the way the SDK is initialized from inside a notification extension - __SDK 1.9__ @@ -103,18 +111,18 @@ - __SDK 1.8__ - - Support push only without in app message + - Support push only without InApp Message - Support deeplinking and main action when user click on push notification - __SDK 1.7.4__ - - Improve how In App Content are managed in cache - - Correction on dismiss of inapp content viewcontroller when it is not wrapped inside other controller and when a link is present + - Improve how InApp Content are managed in cache + - Correction on dismiss of InApp Content viewcontroller when it is not wrapped inside other controller and when a link is present - __SDK 1.7.3__ - - Improve behavior and robustness of the way In App messages are fetch - - Add a type for In App refresh only for dev use: .Minutely + - Improve behavior and robustness of the way InApp Messages are fetch + - Add a type for InApp refresh only for dev use: `.Minutely` - __SDK 1.7.2__ @@ -140,7 +148,7 @@ - __SDK 1.5.2__ - - correct bug for in app content that must be displayed only once + - correct bug for InApp Content that must be displayed only once - __SDK 1.5.1__ @@ -148,12 +156,12 @@ - __SDK 1.5__ - - sendDeviceInfo deprecated method replaced with sendDeviceInfo:(SMDeviceInfos*)deviceInfos method - - New SMManager category for DataTransaction with back-end - - public SMDeviceInfos object - - iOS 10 support of UserNotifications framework + - `sendDeviceInfo` deprecated method replaced with `sendDeviceInfo:(SMDeviceInfos*)deviceInfos` method + - New `SMManager` category for `DataTransaction` with back-end + - public `SMDeviceInfos` object + - iOS 10 support of `UserNotifications` framework - stop supporting of iOS 7 - - cache on last sent UserCustomEvent + - cache on last sent `UserCustomEvent` - Update deviceID with the one received from platform - __SDK 1.4.5__ @@ -162,18 +170,18 @@ - __SDK 1.4.4__ - - compare device token based on string instead of NSData (bug swift 3 and Data class) + - compare device token based on string instead of `NSData` (bug swift 3 and Data class) - __SDK 1.4.3__ - correction for max number of InApp Content crash when max > number of messages received - - creation date of in app content + - creation date of InApp Content - dismiss when no button in notification payload - __SDK 1.4.2__ - - correction on unregisterForRemoteNotification method - - issue with the notification when the application was killed + - correction on `unregisterForRemoteNotification` method + - issue with the notification when the App was killed - __SDK 1.4.1__ @@ -181,17 +189,17 @@ - __SDK 1.4__ - - enum SMInAppMessageRefreshType has been renamed in SMInAppRefreshType (this enum is used both for InApp Message and for InApp Content) possible values are : + - enum `SMInAppMessageRefreshType` has been renamed to `SMInAppRefreshType` (this enum is used both for InApp Message and for InApp Content) possible values are : - - kSMIA_RefreshType_None - - kSMIA_RefreshType_Hourly - - kSMIA_RefreshType_Daily + - `kSMIA_RefreshType_None` + - `kSMIA_RefreshType_Hourly` + - `kSMIA_RefreshType_Daily` - __SDK 1.3__ - - To access easily all API methods you will need to replace #import SMManager.h by #import SMHelper.h + - To access easily all API methods you will need to replace `#import SMManager.h` by `#import SMHelper.h` - __SDK 1.2__ - - The API sendEvent: has been renamed to sendSMEvent: (This call will prevent compilation) - - The API registerForRemoteNotification has been added. It allows applications to register remote-notification when they really need it. This, then, becomes a mandatory call for receiving pushes (after starting the library). + - The API `sendEvent:` has been renamed to `sendSMEvent:` (this call will prevent compilation) + - The API `registerForRemoteNotification` has been added. It allows applications to register remote-notification when they really need it. This, then, becomes a mandatory call for receiving pushes (after starting the library). diff --git a/Documentation/MobileSDK Reference.pdf b/Documentation/MobileSDK Reference.pdf deleted file mode 100644 index 9c942e5..0000000 Binary files a/Documentation/MobileSDK Reference.pdf and /dev/null differ diff --git a/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockFailure.md b/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockFailure.md new file mode 100644 index 0000000..a333d18 --- /dev/null +++ b/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockFailure.md @@ -0,0 +1,12 @@ +# SMCompletionBlockFailure Block Reference + +**Declared in** SMBlock.h + + +## Block Definition +### SMCompletionBlockFailure + +@typedef type of block that will be triggered when an event has failed to be sent + +typedef void (^SMCompletionBlockFailure) (SMFailure *failure) + diff --git a/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockSuccess.md b/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockSuccess.md new file mode 100644 index 0000000..b53bedf --- /dev/null +++ b/Documentation/MobileSDK Reference/Blocks/SMCompletionBlockSuccess.md @@ -0,0 +1,12 @@ +# SMCompletionBlockSuccess Block Reference + +**Declared in** SMBlock.h + + +## Block Definition +### SMCompletionBlockSuccess + +@typedef type of block that will be triggered when an event has been succesfully sent + +typedef void (^SMCompletionBlockSuccess) (SMSuccess *success) + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+DataTransaction.md b/Documentation/MobileSDK Reference/Categories/SMManager+DataTransaction.md new file mode 100644 index 0000000..e95c3fe --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+DataTransaction.md @@ -0,0 +1,60 @@ +# SMManager(DataTransaction) Category Reference + +**Declared in** SMManager+DataTransaction.h + +## Overview + +This category will help you to retrieve or send specific information to the selligent platform. + +

SMManager+DataTransaction :

+ +## Tasks + +### + +[– sendDeviceInfo](#//api/name/sendDeviceInfo) + +[– sendDeviceInfo:](#//api/name/sendDeviceInfo:) + + +## Instance Methods + + +### sendDeviceInfo + +Deprecated method + +- (void)sendDeviceInfo + +#### Discussion + + +Warning: Deprecated methodIn order to send device informations to the back-end you can use + + + +#### Declared In +* `SMManager+DataTransaction.h` + + +### sendDeviceInfo: + +This method allow you to send an event with pre-defined devices informations to the back-end + +- (void)sendDeviceInfo:(SMDeviceInfos *)*deviceInfos* + +#### Parameters + +*deviceInfos* +   SMDeviceInfos object + +#### Discussion +The informations to be sent will be set in a SMDeviceInfos object. Each property of the created object will be a data that will be provided to the back-end. For additional informations you can refer to SMDevicesInfos. + +This call can be done at any time after starting the library and if the properties of SMDeviceInfos object has not changed from a previous call, the event will not be sent to avoid platform unnecessarily overload. + +#### Declared In +* `SMManager+DataTransaction.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+InAppContent.md b/Documentation/MobileSDK Reference/Categories/SMManager+InAppContent.md new file mode 100644 index 0000000..a76bf6e --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+InAppContent.md @@ -0,0 +1,278 @@ +# SMManager(InAppContent) Category Reference + +**Declared in** SMManager+InAppContent.h + +## Overview + +

Introduction :

+ +In-Application-Content (IAC) is an optional service which will retrieve messages from the back-end each time the application enters foregrounds at specific frequencies and if connection is available. + +Once new messages were retrieved, the library notifies the application about it. + +Each IAC is is from a specific type [SMInAppContentType] and is also linked to a category defined by yourself + +

Implementation :

+ +In a nutshell, activate the IAC-service is a one step process: + + + +In order to be notified about new IAC, the application must register to correct notification kSMNotification_Event_DidReceiveInAppContent +(Please read SMNSNotification for additional information). +This notification will provide you with the number of IAC’s by category. +Please be aware that it’s the unique application’s chance to capture and store that information. + +

Displaying IAC :

+ + + +Each IAC is from a specific type for a specific category. + +Selligent SDK provide a specific view controller for each type of in app content + + + +You can check each of this object for more information about how to use them. + +All this view controller can also be customised with the use of SMInAppContentStyleOptions. + +Once the sdk has provided you with the correct view controller + +SMInAppContentURLViewController* vc = [SMInAppContentURLViewController viewControllerForCategory:@"anycategory"]; + +You can call showSMController:InContainerView:OfParentViewController: if you expect to display the In App Content in a UIContainerView that is defined in your app : + +[[SMManager sharedInstance] showSMController:vc InContainerView:_containerView OfParentViewController:self]; + +Or you can present it to be displayed in full screen mode : + +[self presentViewController:vc animated:YES completion:nil]; + +Be aware that if your UIContainerView is defined in storyboard and that no category has been provided to it you will need to inform it with prepareForSegue:sender: + +-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender +{ +if([segue.identifier isEqualToString:@"YourSegue"]){ +_sminappcontentviewcontroller = segue.destinationViewController; +[self.sminappcontentviewcontroller setCategory:@"anycategory"]; +} +} + + + +In this case you can call getInAppContentsForCategory:Type: or getInAppContentsForCategory:Type:Max: + +Those methods will present you an NSArray of SMInAppContentMessage with all (or a maximum number, precised by the Max parameter) IAC for a category and for a type. + +If you decide to use this way of interacting with IAC it is important that you keep in mind that you will be responsible of the display of the content and you will have to call to setInAppContentAsSeen: whenever an InAppContent is showed to the user and to executeLinkAction:InAppContent: whenever user interact with an action link of the in app content. + +

Fetching modes :

+ +IAC may be retrieved from two different modes corresponding to the application’s state: + + + +Each of these modes is optional. In other words, you can use one mode or the other, or even both at the same time. +Choosing the adequate mode depends on the application’s need and can be managed by the application’s developper. +Off course, to allow the SDK to retrieve IAC as fast as possible, we recommand using both modes at the same time. + +Following documentation explains how to activate each mode: + +

Fetching IAC in foreground :

+ +In order to retrieve IAC while the application is running, make sure to do the folllowing: + + + +

Fetching IAC in background :

+ +Initially, this mode has been added as a complementary-option to the foreground-mode. +However, it can be used as a single-fetch-mode if fits best your application’s need. + +To understand better how often the OS will execute the background-fetch, make sure to read the following Apple-documentation + +In order to support this mode, make sure to : + + + +

SMManager+InAppContent :

+ +## Tasks + +### + +[– showSMController:InContainerView:OfParentViewController:](#//api/name/showSMController:InContainerView:OfParentViewController:) + +[– getInAppContentsForCategory:Type:](#//api/name/getInAppContentsForCategory:Type:) + +[– getInAppContentsForCategory:Type:Max:](#//api/name/getInAppContentsForCategory:Type:Max:) + +[– setInAppContentAsSeen:](#//api/name/setInAppContentAsSeen:) + +[– executeLinkAction:InAppContent:](#//api/name/executeLinkAction:InAppContent:) + +[– performIACFetchWithCompletionHandler:](#//api/name/performIACFetchWithCompletionHandler:) + + +## Instance Methods + + +### executeLinkAction:InAppContent: + +This method must be called whenever a user has clicked on a link that you manage to display + +- (void)executeLinkAction:(SMLink *)*link* InAppContent:(SMInAppContentMessage *)*inAppContent* + +#### Parameters + +*link* +   a SMLink object + +*inAppContent* +   a SMInAppContentMessage object +  + +#### Discussion +This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link + +#### Declared In +* `SMManager+InAppContent.h` + + +### getInAppContentsForCategory:Type: + +This will return an array of In App Contents + +- (NSArray *)getInAppContentsForCategory:(NSString *)*category* Type:(SMInAppContentType)*type* + +#### Parameters + +*category* +   NSString the category for which you want your In App Contents + +*type* +   An SMInAppContentType - Url, Html or image + +#### Return Value +returns an NSArray of SMInAppContentMessage +  + +#### Discussion +All the IAC will be retrieved + +#### Declared In +* `SMManager+InAppContent.h` + + +### getInAppContentsForCategory:Type:Max: + +This will return an array of In App Contents + +- (NSArray *)getInAppContentsForCategory:(NSString *)*category* Type:(SMInAppContentType)*type* Max:(int)*max* + +#### Parameters + +*category* +   An NSString the category for which you want your In App Contents + +*type* +   An SMInAppContentType - Url, Html or image + +*max* +   An int + +#### Return Value +returns an NSArray of SMInAppContentMessage +  + +#### Discussion +This overload allows you to define the max number of IAC to retrieve + +#### Declared In +* `SMManager+InAppContent.h` + + +### performIACFetchWithCompletionHandler: + +This will allow the SDK to fetch the IAC when the OS will allow so. + +- (void)performIACFetchWithCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult ))*completionHandler* + +#### Parameters + +*completionHandler* +   The block-completion to be processed. Provided by the delegate call + +#### Discussion +To be included in application:performFetchWithCompletionHandler: + +Warning: Make sure to enable background-fetch in the application’s capabilities + +#### Declared In +* `SMManager+InAppContent.h` + + +### setInAppContentAsSeen: + +This method will mark an IAC as viewed, save it in the cache and send the Open event to the server + +- (void)setInAppContentAsSeen:(SMInAppContentMessage *)*inAppContent* + +#### Parameters + +*inAppContent* +   an SMInAppContentMessage object +  + +#### Discussion +If the display mode is set to 0 (display once), the IAC will be discarded from the cache and will not be provided to you anymore with getInAppContentsForCategory:Type: or getInAppContentsForCategory:Type:Max: + +#### Declared In +* `SMManager+InAppContent.h` + + +### showSMController:InContainerView:OfParentViewController: + +Call when SDK has already provided you with a SMInAppContentViewController (of any type : SMInAppContentHTMLViewController , SMInAppContentImageViewController or SMInAppContentURLViewController) and you want to display it in a UIContainerView defined anywhere in your app. + +- (void)showSMController:(SMInAppContentViewController *)*smViewController* InContainerView:(UIView *)*containerView* OfParentViewController:(UIViewController *)*parentViewController* + +#### Parameters + +*smViewController* +   a SMInAppContentViewController + +*containerView* +   the UIContainerView in which In App Content will be displayed + +*parentViewController* +   the parent UIViewController of your UIContainerView + +#### Discussion +The viewcontroller will take all available space in the UIContainerView + +#### Declared In +* `SMManager+InAppContent.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+InAppMessage.md b/Documentation/MobileSDK Reference/Categories/SMManager+InAppMessage.md new file mode 100644 index 0000000..78ff4fe --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+InAppMessage.md @@ -0,0 +1,298 @@ +# SMManager(InAppMessage) Category Reference + +**Declared in** SMManager+InAppMessage.h + +## Overview + +

Introduction :

+ +In-Application-Message (IAM) is an optional service which will automatically retrieve messages from the back-end at specific frequencies. +Once new messages were retrieved, the library notifies the application about it. +Then, the application may display any IAM as a usual notification. + +The retrieved IAM share the exact same format as the remote-notification. +However, they are not live messages and, therefore should NOT be considered as an alternative to remote-notification. +Remote-push-notificaitons are almost live messages that are pushed to devices. +While IAM are non-live-messages that the SDK fetch at specific intervals according to provided fetch-mode. + +

Implementation :

+ +In a nutshell, activate the IAM-service is a two steps process: + + + +However, additional steps might be required according to desired fetching-mode. +Each of these steps are explained in further details bellow. + +In order to be notified about new IAM, the application must register to correct notification kSMNotification_Event_DidReceiveInAppMessage +(Please read SMNSNotification for additional information). +This notification will provide you with the IAM’s unique ID. +Please be aware that it’s the unique application’s chance to capture and store that information. + +

Displaying IAM :

+ +As IAM and remote-notification share the same format, they are both displayed using the same APIs. +Please read the documentation in SMManager(RemoteNotification) to know how to display any kind of notification. + +Since sdk v 2.5 you have the possibility to store the In App Message on your side and process them the way you want +In order to do that, once you are notified that In App Messages are available you can call getInAppMessages to receive a NSArray of SMInAppMessage +Once a SMInAppMessage has been displayed and has been seen by the user you need to call setInAppMessageAsSeen: to inform Selligent that the In App message has been opened +In case there is links in the In App Message and in case one of the link is triggered by user please call executeLinkAction:: to process teh action related to the link and inform Selligent that the link has been clicked + +

Fetching modes :

+ +IAM may be retrieved from two different modes corresponding to the application’s state: + + + +Each of these modes is optional. In other words, you can use one mode or the other, or even both at the same time. +Choosing the adequate mode depends on the application’s need and can be managed by the application’s developper. +Off course, to allow the SDK to retrieve IAM as fast as possible, we recommand using both modes at the same time. + +Following documentation explains how to activate each mode: + +

Fetching IAM in foreground :

+ +In order to retrieve IAM while the application is running, make sure to do the folllowing: + + + +

Fetching IAM in background :

+ +Initially, this mode has been added as a complementary-option to the foreground-mode. +However, it can be used as a single-fetch-mode if fits best your application’s need. + +To understand better how often the OS will execute the background-fetch, make sure to read the following Apple-documentation + +In order to support this mode, make sure to : + + + +

SMManager+InAppMessage :

+ +## Tasks + +### + +[– enableInAppMessage:](#//api/name/enableInAppMessage:) + +[– performIAMFetchWithCompletionHandler:](#//api/name/performIAMFetchWithCompletionHandler:) + +[– getInAppMessages](#//api/name/getInAppMessages) + +[– setInAppMessageAsSeen:](#//api/name/setInAppMessageAsSeen:) + +[– setInAppMessageAsUnseen:](#//api/name/setInAppMessageAsUnseen:) + +[– setInAppMessageAsDeleted:](#//api/name/setInAppMessageAsDeleted:) + +[– executeLinkAction:InAppMessage:](#//api/name/executeLinkAction:InAppMessage:) + +[– inAppMessageWKNavigationDelegate:](#//api/name/inAppMessageWKNavigationDelegate:) + +[– removeViewController](#//api/name/removeViewController) + +[– inAppMessageDelegate:](#//api/name/inAppMessageDelegate:) + + +## Instance Methods + + +### enableInAppMessage: + +Call this API in order to enable / disable the IAM-service according to your application’s need. + +- (void)enableInAppMessage:(BOOL)*shouldEnable* + +#### Parameters + +*shouldEnable* +   TRUE will enable IAM. FALSE will disable it. + +#### Discussion +Most application will call this API right after starting the SDK. +However, it make no harm to call it later on when user trigger, for instance, a UISwitch. + +Warning: Before enabling IAM-service, make sure to : + + + + +#### Declared In +* `SMManager+InAppMessage.h` + + +### executeLinkAction:InAppMessage: + +This method must be called whenever a user has clicked on a link that you manage to display + +- (void)executeLinkAction:(SMLink *)*link* InAppMessage:(SMInAppMessage *)*inAppMessage* + +#### Parameters + +*link* +   a SMLink object + +*inAppMessage* +   a SMInAppMessage object + +#### Discussion +This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link + +#### Declared In +* `SMManager+InAppMessage.h` + + +### getInAppMessages + +This will return an array of In App Messages + +- (NSArray *)getInAppMessages + +#### Return Value +returns an NSArray of SMInAppMessage + +#### Discussion +All the valid IAM will be retrieved even if they were already provided to the device + +#### Declared In +* `SMManager+InAppMessage.h` + + +### inAppMessageDelegate: + +this setting will allow you to manage on app side the display of the inapp message linked to a push remote notification +In order to display it in your side the delegate object should implement [SMManagerInAppMessageDelegate displayInAppMessage:] method it will provide tha app with a SMInAppMessage object + +- (void)inAppMessageDelegate:(id<SMManagerInAppMessageDelegate>)*delegate* + +#### Parameters + +*delegate* +   an object implementing SMManagerInAppMessageDelegate methods + +#### Declared In +* `SMManager+InAppMessage.h` + + +### inAppMessageWKNavigationDelegate: + +This method will allow you to provide an instance of a class to the sdk . This class will implement the WKNavigationDelegate methods +In this case when the sdk displays an In App Message in a WKWebView you will for example be able to process the linked click on the app side by implementing decidePolicyForNavigationAction on the provided class + +- (void)inAppMessageWKNavigationDelegate:(id<WKNavigationDelegate>)*delegate* + +#### Parameters + +*delegate* +   an object implementing WKNavigationDelegate methods + +#### Declared In +* `SMManager+InAppMessage.h` + + +### performIAMFetchWithCompletionHandler: + +This will allow the SDK to fetch the IAM when the OS will allow so. + +- (void)performIAMFetchWithCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult ))*completionHandler* + +#### Parameters + +*completionHandler* +   The block-completion to be processed. Provided by the delegate call + +#### Discussion +To be included in application:performFetchWithCompletionHandler: + +Warning: Make sure to enable background-fetch in the application’s capabilities + +#### Declared In +* `SMManager+InAppMessage.h` + + +### removeViewController + +This method must be called whenever a user has clicked on a link that you manage to display + +- (void)removeViewController + +#### Discussion +This will allow the sdk to inform the services that a link has been clicked and to process the action associated with the link + +#### Declared In +* `SMManager+InAppMessage.h` + + +### setInAppMessageAsDeleted: + +This method will mark an IAM as deleted + +- (void)setInAppMessageAsDeleted:(SMInAppMessage *)*inAppMessage* + +#### Parameters + +*inAppMessage* +   an SMInAppMessage object + +#### Discussion +The message will be not be provided again to the device once deleted + +#### Declared In +* `SMManager+InAppMessage.h` + + +### setInAppMessageAsSeen: + +This method will mark an IAM as viewed, send the Open event to the server and update SMInAppMessage object in cache with isViewed property set to true + +- (void)setInAppMessageAsSeen:(SMInAppMessage *)*inAppMessage* + +#### Parameters + +*inAppMessage* +   an SMInAppMessage object + +#### Discussion +The message will still be provided to the device with the flag isViewed set to true + +#### Declared In +* `SMManager+InAppMessage.h` + + +### setInAppMessageAsUnseen: + +This method will mark an IAM as unseen + +- (void)setInAppMessageAsUnseen:(SMInAppMessage *)*inAppMessage* + +#### Parameters + +*inAppMessage* +   an SMInAppMessage object + +#### Discussion +The message will be provided to the device with the flag isViewed set to false + +#### Declared In +* `SMManager+InAppMessage.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+Location.md b/Documentation/MobileSDK Reference/Categories/SMManager+Location.md new file mode 100644 index 0000000..af5d745 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+Location.md @@ -0,0 +1,68 @@ +# SMManager(Location) Category Reference + +**Declared in** SMManager+Location.h + +## Overview + +

Introduction :

+ +In order to use the location services features provided by the sdk you will mandatory need to use the lsdk library supporting the plotproject framework . +Otherwise calling the method in this SMManager category will have no effect and no ios api related to geofencing will be called (as this is all done by the plot project framework) + +

SMManager+Location :

+ +## Tasks + +### + +[– enableGeoLocation](#//api/name/enableGeoLocation) + +[– disableGeoLocation](#//api/name/disableGeoLocation) + +[– isGeoLocationEnabled](#//api/name/isGeoLocationEnabled) + + +## Instance Methods + + +### disableGeoLocation + +Disable geolocation services + +- (void)disableGeoLocation + +#### Discussion +This optional call will disable geolocation services at sdk level. it is independent of iOS location authorisation +Call this API according to your application’s need. + +#### Declared In +* `SMManager+Location.h` + + +### enableGeoLocation + +Enable geolocation services + +- (void)enableGeoLocation + +#### Discussion +This optional call will enable geolocation services at sdk level. it is independent of iOS location authorisation +If you use plotproject for geolocation it will be mandatory to call it if you have set enableOnFirstRun to false in the plotconfig.json +Call this API according to your application’s need. + +#### Declared In +* `SMManager+Location.h` + + +### isGeoLocationEnabled + +check geolocation services status + +- (BOOL)isGeoLocationEnabled + +#### Discussion +This optional call will inform you if geolocation services at sdk level are enabled. it is independent of iOS location authorisation + +#### Declared In +* `SMManager+Location.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+Log.md b/Documentation/MobileSDK Reference/Categories/SMManager+Log.md new file mode 100644 index 0000000..f4dac45 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+Log.md @@ -0,0 +1,46 @@ +# SMManager(Log) Category Reference + +**Declared in** SMManager+Log.h + +## Overview + +This category will help you debug the library. +Please check SMLogLevel for all available possibilities. + +Should you want to get back to us, please set logLevel to kSMLogLevel_All and provide with console logs. + +

SMManager+Log :

+ +## Tasks + +### + +[– applyLogLevel:](#//api/name/applyLogLevel:) + + +## Instance Methods + + +### applyLogLevel: + +Set the log level of the library console + +- (void)applyLogLevel:(SMLogLevel)*logLevel* + +#### Parameters + +*logLevel* +   SMLogLevel enumeration type. Default = kSMLogLevel_None + +#### Discussion +This is an optional setting that may help you debug the library calls. +This call can be done at any time (before or after starting the library). +However, in order to avoid missing any error log, we recommand setting this value before starting the library. + +Warning: It is developer’s responsability to enable log-level in Debug or release mode. +No distinction are being aplied by the library. +For obvious performance reason, it is always recommended to turn log off in release mode. + +#### Declared In +* `SMManager+Log.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+RemoteNotification.md b/Documentation/MobileSDK Reference/Categories/SMManager+RemoteNotification.md new file mode 100644 index 0000000..7cf3d59 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+RemoteNotification.md @@ -0,0 +1,284 @@ +# SMManager(RemoteNotification) Category Reference + +**Declared in** SMManager+RemoteNotification.h + +## Overview + +This category contains the basic step-by-step implementation to get you started. +Make sure to read the category SMManager(SilentPush) to learn more about background-remote-notification. + +

Handling Remote Notifications:

+ +In order to receive remote-notification from the back-end, all the following methods must be included in you application’s delegate: + + + +Finally, make sure to call registerForRemoteNotification according to your application’s need. + +

Receiving Remote Notifications:

+ +When a remote-notification is received, the library will automatically display a custom UIViewController. +Should you want to prevent this behaviour, feel free to configure the SMManagerSetting accordingly before starting the SMManager. + +Before displaying the remote-notification’s UIVIewController, the library will broadcast an NSNotification offering the application a chance to pause any ongoing heavy task. +The same principle is applied before dismissing the UIVIewController providing the application the opportunity to start again the paused heavy-task. + +Finally, should you want to know when the user interact with UIViewController’s control, an NSNotification is also posted providing information about the selected element. +For additionnal information about NSNotification processing and handling, please check SMNSNotification + +

Displaying notification :

+ +The application can display any notification based on its ID using the API displayNotificationID: +These IDs can be retrieved from broadcasted NSNotification. +(Please read SMNSNotification for additional information). + +A convenient method is provided to display the last received remote-notification using displayLastReceivedRemotePushNotification + +

SMManager+RemoteNotification :

+ +## Tasks + +### + +[– registerForRemoteNotification](#//api/name/registerForRemoteNotification) + +[– unregisterForRemoteNotification](#//api/name/unregisterForRemoteNotification) + +[– enableRemoteNotification](#//api/name/enableRemoteNotification) + +[– disableRemoteNotification](#//api/name/disableRemoteNotification) + +[– didRegisterForRemoteNotificationsWithDeviceToken:](#//api/name/didRegisterForRemoteNotificationsWithDeviceToken:) + +[– didRegisterUserNotificationSettings:](#//api/name/didRegisterUserNotificationSettings:) + +[– didRegisterUserNotificationSettings](#//api/name/didRegisterUserNotificationSettings) + +[– didFailToRegisterForRemoteNotificationsWithError:](#//api/name/didFailToRegisterForRemoteNotificationsWithError:) + +[– didReceiveRemoteNotification:](#//api/name/didReceiveRemoteNotification:) + +[– displayNotificationID:](#//api/name/displayNotificationID:) + +[– displayLastReceivedRemotePushNotification](#//api/name/displayLastReceivedRemotePushNotification) + +[– retrieveLastRemotePushNotification](#//api/name/retrieveLastRemotePushNotification) + + +## Instance Methods + + +### didFailToRegisterForRemoteNotificationsWithError: + +Mandatory API to be included in application:didFailToRegisterForRemoteNotificationsWithError + +- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)*error* + +#### Parameters + +*error* +   An NSError object that encapsulates information why registration did not succeed. Provided by the delegate call + +#### Discussion +Called when the user has deactivated remote-notification or if any other error happen. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### didReceiveRemoteNotification: + +Mandatory API to be included in application:didReceiveRemoteNotification +Handle and display remote notification when application is in foreground + +- (void)didReceiveRemoteNotification:(NSDictionary *)*userInfo* + +#### Parameters + +*userInfo* +   An NSDictionary that contains information related to the remote notification. Provided by the delegate call + +#### Discussion +This method is not mandatory anymore if you implement didReceiveRemoteNotification:fetchCompletionHandler: +For additional information about background-remote-notifications, please check SMManager(SilentPush) for further details. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### didRegisterForRemoteNotificationsWithDeviceToken: + +Mandatory API to be included in application:didRegisterForRemoteNotificationsWithDeviceToken: + +- (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)*deviceToken* + +#### Parameters + +*deviceToken* +   A string that identifies the device to APNs. + +#### Discussion +This method is mandatory to handle properly all notifications + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### didRegisterUserNotificationSettings + +Mandatory API to be included in application:didRegisterUserNotificationSettings + +- (void)didRegisterUserNotificationSettings + +#### Discussion +This method confirms the type of notification the user would like to receive. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### didRegisterUserNotificationSettings: + +Deprecated method - replaced by didRegisterUserNotificationSettings; +Mandatory API to be included in application:didRegisterUserNotificationSettings (Deprecated: Deprecated method - replaced by didRegisterUserNotificationSettings;) + +- (void)didRegisterUserNotificationSettings:(UIUserNotificationSettings *)*notificationSettings* + +#### Parameters + +*notificationSettings* +   The user notification settings that are available to your app. + +#### Discussion + + +Warning: Deprecated method - replaced by didRegisterUserNotificationSettings; +Mandatory API to be included in application:didRegisterUserNotificationSettingsThis method confirms the type of notification the user would like to receive. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### disableRemoteNotification + +Use this API to disable the selligent notification on current device. In other words, the device will not receive any remote-notification from selligent backend server anymore. + +- (void)disableRemoteNotification + +#### Discussion + + +Warning: This does NOT call unregisterForRemoteNotifications on the sharedApplication instance. +Therefore, the application can still receive third-party remote-notifications. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### displayLastReceivedRemotePushNotification + +Retrieve and display the last known notification. + +- (void)displayLastReceivedRemotePushNotification + +#### Discussion +Basically, This API is a helpher which combine both retrieveLastRemotePushNotification and displayNotificationID: +It only focuses on remote-notification. Not on IAM. +At this stage, only the very last remote-notification can be recovered, previous ones are automaticly overriden. +To learn more about this API, please read documentation in SMManagerSetting, more particularly [SMManagerSetting shouldDisplayRemoteNotification] + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### displayNotificationID: + +Display a notification based on its ID + +- (void)displayNotificationID:(NSString *)*idNotification* + +#### Parameters + +*idNotification* +   NSString instance referencing the unique notification’s ID + +#### Discussion +Basically, the application may store notification’s IDs and then display them according to its need. +In this context, the word “notification” stands for either a remote-notification or an InAppMessage. +This feature has initially been added to allow applications to display remote-notifications at any time (not directly when the push is received). +Then, it has been extended to display In-App-Messages. For additional information about IAM, please read SMManager(InAppMessage). + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### enableRemoteNotification + +Use this API to enable the selligent notification on current device. In other words, the device will receive any remote-notification from selligent backend server. + +- (void)enableRemoteNotification + +#### Discussion + + +Warning: This is independent from [SMManager registerForRemoteNotification] and from notification settings for the app on device level. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### registerForRemoteNotification + +Mandatory method which allows notification registration + +- (void)registerForRemoteNotification + +#### Discussion +This API will display a dialog asking user’s permission for remote-notifications (when app is launched the very 1st time). +Often, this call is added right after startWithLaunchOptions:Setting: +However, you may call this API later in your code according to your application need. Just remember that this call is mandatory to receive remote-notifications + +Warning: If your device has already been registered to remote-notifications by your application or a third-party framework, then this call is not mandatory. + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### retrieveLastRemotePushNotification + +Retrieve information about the last received remote-notification + +- (NSDictionary *)retrieveLastRemotePushNotification + +#### Return Value +NSDictionary instance containing basic information about the last push, nil if no push was received so far. + +#### Discussion +This is a convinient method to quickly retrieve the last remote-notificaiton known by the device. +At this stage, only the very last remote-notification can be recovered, previous ones are automaticly overriden. +To learn more about this API, please read documentation in SMManagerSetting, more particularly [SMManagerSetting shouldDisplayRemoteNotification] + +#### Declared In +* `SMManager+RemoteNotification.h` + + +### unregisterForRemoteNotification + +Use this API to unregister the current device. In other words, the device will not receive any remote-notification from our backend server anymore. + +- (void)unregisterForRemoteNotification + +#### Discussion + + +Warning: This does NOT call unregisterForRemoteNotifications on the sharedApplication instance. +Therefore, the application can still receive third-party remote-notifications. + +#### Declared In +* `SMManager+RemoteNotification.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+SMEvent.md b/Documentation/MobileSDK Reference/Categories/SMManager+SMEvent.md new file mode 100644 index 0000000..f43a8b6 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+SMEvent.md @@ -0,0 +1,78 @@ +# SMManager(SMEvent) Category Reference + +**Declared in** SMManager+SMEvent.h + +## Overview + +

Sending events :

+ +Sending any set of data to the back-end can be done with the API sendSMEvent: + +

Event type :

+ +Few default events are already available for you to be used. +They all inhirit from SMEvent and are configurable through their constructors. +At the time of this writing, they default provided events are : + + + +

Custom events :

+ +Simplest case is to create an instance of SMEvent. +Then, inject your data in it (Code example bellow). + +Also, you can subclass from default provided event-type or even create your own sub-classes of events. + +The library will keep sending events to the backend as far as they inhirit from SMEvent. + +

Injecting custom data in events :

+ +Any information can be appended to an event and sent to your back-end. +This is basically done by creating a dictionary containing your data and injecting it as in the example bellow. + + +// Dictionary with your custom data +NSDictionary *dictMyCustomData = @{@"MyKey": @"MyValue"}; +// Create the event +SMEvent *event = [SMEvent eventWithDictionary:dictMyCustomData]; +// Sent the event to the back-end +[[SMManager sharedInstance] sendSMEvent:event]; + + +The exemple above is considered as a custom event. +The same principle can be applied to any event-type subclasses stated above or to your own subclasses of SMEvent. + +

SMManager+SMEvent :

+ +## Tasks + +### + +[– sendSMEvent:](#//api/name/sendSMEvent:) + + +## Instance Methods + + +### sendSMEvent: + +Send an event to the Selligent platform + +- (void)sendSMEvent:(SMEvent *)*event* + +#### Parameters + +*event* +   An SMEvent object containing your event + +#### Discussion +Should you want to track the event’s response, please check SMEvent + +#### Declared In +* `SMManager+SMEvent.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+SilentPush.md b/Documentation/MobileSDK Reference/Categories/SMManager+SilentPush.md new file mode 100644 index 0000000..4f089b3 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+SilentPush.md @@ -0,0 +1,89 @@ +# SMManager(SilentPush) Category Reference + +**Declared in** SMManager+SilentPush.h + +## Overview + +Optionally, you can support silent-remote-notificaiton which will not render anything on the device. +To know more about this topic, please visit the Apple documentation. + +Even if you’re not planning to use silent-pushes, we recommand enabling this service in your application anyway. +As using this service will also improve rendering time for the usual (non-silent) remote-notifications. + +

Implementation :

+ +In a nutshell, you should do the following : + + + +

SMManager+SilentPush :

+ +## Tasks + +### + +[– didReceiveRemoteNotification:fetchCompletionHandler:](#//api/name/didReceiveRemoteNotification:fetchCompletionHandler:) + +[– didReceiveRemoteNotification:fetchCompletionHandler:ForceResultFetch:](#//api/name/didReceiveRemoteNotification:fetchCompletionHandler:ForceResultFetch:) + + +## Instance Methods + + +### didReceiveRemoteNotification:fetchCompletionHandler: + +Mandatory API to be included in application:didReceiveRemoteNotification:fetchCompletionHandler +Handle and display the received notification according to different application state. + +- (void)didReceiveRemoteNotification:(NSDictionary *)*userInfo* fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult ))*completionHandler* + +#### Parameters + +*userInfo* +   An NSDictionary that contains information related to the remote notification. Provided by the delegate call + +*completionHandler* +   The block-completion to be processed after the download. Provided by the delegate call + +#### Discussion +It is recommended to use this API over didReceiveRemoteNotification: as it handles silent-remote-notificaitons. + +Warning: You must enable “Remote notifications” in your application’s Capabilities in order to use this API. +If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. + +#### Declared In +* `SMManager+SilentPush.h` + + +### didReceiveRemoteNotification:fetchCompletionHandler:ForceResultFetch: + +See didReceiveRemoteNotification:fetchCompletionHandler: + +- (void)didReceiveRemoteNotification:(NSDictionary *)*userInfo* fetchCompletionHandler:(void ( ^ ) ( UIBackgroundFetchResult ))*completionHandler* ForceResultFetch:(UIBackgroundFetchResult)*resultFetch* + +#### Parameters + +*userInfo* +   An NSDictionary that contains information related to the remote notification. Provided by the delegate call + +*completionHandler* +   The block-completion to be processed after the download. Provided by the delegate call + +*resultFetch* +   The enumeration that might be overiden by application if needed + +#### Discussion +This API is provided in order to force the fetch result to a specific value. +Use it only if your application need to overide the service. +Otherwise, please use didReceiveRemoteNotification:fetchCompletionHandler: + +Warning: You must enable “Remote notifications” in your application’s Capabilities in order to use this API. +If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. + +#### Declared In +* `SMManager+SilentPush.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+StyleOptions.md b/Documentation/MobileSDK Reference/Categories/SMManager+StyleOptions.md new file mode 100644 index 0000000..d36dd22 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+StyleOptions.md @@ -0,0 +1,53 @@ +# SMManager(StyleOptions) Category Reference + +**Declared in** SMManager+StyleOptions.h + +## Overview + +Allows you to customise the appearance of all the In App Content containers + +

Implementation :

+ + + +

SMManager+StyleOptions :

+ +## Tasks + +### + +[– loadStyleOptions:](#//api/name/loadStyleOptions:) + +[– resetStyleOptions](#//api/name/resetStyleOptions) + + +## Instance Methods + + +### loadStyleOptions: + +This will allow you to load your custom SMInAppContentStyleOptions object + +- (void)loadStyleOptions:(SMInAppContentStyleOptions *)*options* + +#### Parameters + +*options* +   a SMInAppContentStyleOptions object + +#### Declared In +* `SMManager+StyleOptions.h` + + +### resetStyleOptions + +Reset style options to default one + +- (void)resetStyleOptions + +#### Declared In +* `SMManager+StyleOptions.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+UserNotification.md b/Documentation/MobileSDK Reference/Categories/SMManager+UserNotification.md new file mode 100644 index 0000000..4b3f7ee --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+UserNotification.md @@ -0,0 +1,264 @@ +# SMManager(UserNotification) Category Reference + +**Declared in** SMManager+UserNotification.h + +## Overview + +In addition to the implementation of category SMManager(RemoteNotification), this category will supply a support of iOS 10 and usage of UserNotifications framework + +Make sure to read the category SMManager(RemoteNotification) to learn more about remote-notification for support of iOS version 8 and 9 and to correctly register for remote notification. + +If you build against iOS 10+ and you use UserNotifications framework we then recommend you to implement those 2 methods of UNUserNotificationCenterDelegate in your appdelegate: + + + +Register your appdelegate to the UNUserNotificationCenter by adding the following two lines in the didFinishLaunchingWithOptions delegate. + +UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; + +center.delegate = self; + +Notification extensions + +In this category you will also find the support for notification extensions target (content and service) + +Init extensions (to be used for each extensions that will be added to your project): + + + +Notification content extension : + + + +Notification service extension : + + + +

SMManager+UserNotifications :

+ +## Tasks + +### + +[– didReceiveNotificationResponse:](#//api/name/didReceiveNotificationResponse:) + +[– didReceiveNotificationResponse:withCompletionHandler:](#//api/name/didReceiveNotificationResponse:withCompletionHandler:) + +[– willPresentNotification:](#//api/name/willPresentNotification:) + +[– willPresentNotification:withCompletionHandler:](#//api/name/willPresentNotification:withCompletionHandler:) + +[– startExtensionWithSetting:](#//api/name/startExtensionWithSetting:) + +[– didReceiveNotification:](#//api/name/didReceiveNotification:) + +[– didReceiveNotificationRequest:](#//api/name/didReceiveNotificationRequest:) + +[– didReceiveNotificationRequest:withContentHandler:](#//api/name/didReceiveNotificationRequest:withContentHandler:) + +[– serviceExtensionTimeWillExpire](#//api/name/serviceExtensionTimeWillExpire) + + +## Instance Methods + + +### didReceiveNotification: + +Optional API, when building against iOS 10+ and using a Notification Content Extension target, to be included in NotificationViewController didReceiveNotification: +Handle the push action buttons that may be present in the selligent notification payload + +- (void)didReceiveNotification:(UNNotification *_Nonnull)*notification* + +#### Parameters + +*notification* +   A UNNotification that contains information about the notification. + +#### Discussion +This allows the SDK to display the action buttons in the push notification outside of the app. + +The category that must be added to Info.plist of the Notification Content Extension target is mandatory and must be SELLIGENT_BUTTON. + +#### Declared In +* `SMManager+UserNotification.h` + + +### didReceiveNotificationRequest: + +Optional API, when building against iOS 10+ and using a Notification Service Extension target, to be included in NotificationService didReceiveNotificationRequest:withContentHandler: +Handle the selligent payload before displaying it to the user + +- (UNMutableNotificationContent *_Nullable)didReceiveNotificationRequest:(UNNotificationRequest *_Nonnull)*request* + +#### Parameters + +*request* +   A UNNotificationRequest that contains the original notification request. + +#### Return Value +UNMutableNotificationContent the updated content of the payload. + +#### Discussion +This allows the SDK to decrypt the payload before displaying it to the user if you have activated the encryption of push.you can use this method if you have decided to trigger the block to execute with the modified content by yourself otherwise if you want the sdk to manage all steps please use SMManager didReceiveNotificationRequest:withContentHandler: + +#### Declared In +* `SMManager+UserNotification.h` + + +### didReceiveNotificationRequest:withContentHandler: + +Optional API, when building against iOS 10+ and using a Notification Service Extension target, to be included in NotificationService didReceiveNotificationRequest:withContentHandler: +Handle the selligent payload before displaying it to the user + +- (void)didReceiveNotificationRequest:(UNNotificationRequest *_Nonnull)*request* withContentHandler:(void ( ^ _Nullable ) ( UNNotificationContent *_Nonnull ))*contentHandler* + +#### Parameters + +*request* +   A UNNotificationRequest that contains the original notification request. + +*contentHandler* +   The block to execute with the modified content + +#### Discussion +This allows the SDK to decrypt the payload before displaying it to the user if you have activated the encryption of push.you can use this method if you want the sdk to manage the display of the notification after teh decryption has been processed + +#### Declared In +* `SMManager+UserNotification.h` + + +### didReceiveNotificationResponse: + +Mandatory API when used inside App in AppDelegate (but is optional for Notification Content Extension), when building against iOS 10+ and using UserNotifications framework, to be included in userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler. +Handle and display remote notification. + +- (void)didReceiveNotificationResponse:(UNNotificationResponse *_Nonnull)*response* + +#### Parameters + +*response* +   A UNNotificationResponse that contains information about the notification and the interaction the user has done with it. Provided by the delegate call + +#### Discussion +This method is mandatory when used in AppDelegate but is optional when implementing Notification content extension. When used in Notification Content Extension it provides to the sdk the ability to process the action that should be triggered without opening the app (in this case don’t forget to call the completionhandler with the desired UNNotificationContentExtensionResponseOption + +#### Declared In +* `SMManager+UserNotification.h` + + +### didReceiveNotificationResponse:withCompletionHandler: + +Mandatory API, when building against iOS 10+ and using UserNotifications framework, to be included in userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler +Handle and display remote notification. + +- (void)didReceiveNotificationResponse:(UNNotificationResponse *_Nonnull)*response* withCompletionHandler:(void ( ^ _Nullable ) ( void ))*completionHandler* + +#### Parameters + +*response* +   A UNNotificationResponse that contains information about the notification and the interaction the user has done with it. Provided by the delegate call + +*completionHandler* +   A completion that will be called. + +#### Declared In +* `SMManager+UserNotification.h` + + +### serviceExtensionTimeWillExpire + +Optional API, when building against iOS 10+ and using a Notification Service Extension target, to be included in NotificationService serviceExtensionTimeWillExpire +Tells the sdk that the extension is about to be terminated. + +- (void)serviceExtensionTimeWillExpire + +#### Discussion +this method is to be implemented only if you have implemented SMManager didReceiveNotificationRequest:withContentHandler: + +#### Declared In +* `SMManager+UserNotification.h` + + +### startExtensionWithSetting: + +Mandatory method which allows sdk initialisation when building against iOS 10+ and using Notification Extensions . +To be included in didReceiveNotification: when implementing Notification content extension and/or in didReceiveNotificationRequest:withContentHandler: when implementing Notification service extension + +- (void)startExtensionWithSetting:(SMManagerSetting *_Nonnull)*setting* + +#### Parameters + +*setting* +   mandatory SMManagerSetting instance to start-up the library - this setting mus tbe initialised with only url, clienID and privateKet provided by selligent + +#### Discussion +This method is mandatory in order to start / initialise the library and should be called in in didReceiveNotification: when implementing Notification content extension and/or in didReceiveNotificationRequest:withContentHandler: when implementing Notification service extension + +#### See Also + +* SMManagerSetting + +#### Declared In +* `SMManager+UserNotification.h` + + +### willPresentNotification: + +Mandatory API, when building against iOS 10+ and using UserNotifications framework, to be included in userNotificationCenter:willPresentNotification:withCompletionHandler +Handle the remote notification when app is in foreground. + +- (void)willPresentNotification:(UNNotification *_Nonnull)*notification* + +#### Parameters + +*notification* +   A UNNotification that contains information about the notification. + +#### Discussion +This allows the SDK to inform the services that the Selligent push has been received. + +Calling this method does not call any CompletionHandler. You will have to call the completion handler with your preferred option. + +For example you can call inside this delegate : +completionHandler(UNNotificationPresentationOptionAlert); + +#### Declared In +* `SMManager+UserNotification.h` + + +### willPresentNotification:withCompletionHandler: + +Mandatory API, when building against iOS 10+ and using UserNotifications framework, to be included in userNotificationCenter:willPresentNotification:withCompletionHandler +Handle the remote notification when app is in foreground and call the completionHandler(UNNotificationPresentationOptionAlert) by default. + +- (void)willPresentNotification:(UNNotification *_Nonnull)*notification* withCompletionHandler:(void ( ^ _Nullable ) ( UNNotificationPresentationOptions options ))*completionHandler* + +#### Parameters + +*notification* +   A UNNotification that contains information about the notification. + +*completionHandler* +   A Completion handler that will be called with UNNotificationPresentationOptionAlert by default. + +#### Discussion +This allows the SDK to inform the services that the Selligent push has been received. + +You don’t need to call the completion handler in the delegate anymore. + +#### Declared In +* `SMManager+UserNotification.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManager+ViewController.md b/Documentation/MobileSDK Reference/Categories/SMManager+ViewController.md new file mode 100644 index 0000000..cc4fe15 --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManager+ViewController.md @@ -0,0 +1,83 @@ +# SMManager(ViewController) Category Reference + +**Declared in** SMManager+ViewController.h + +## Overview + +This category will help our SDK making the WKWebView navigation buttons enabled/disabled when needed, if inAppMessageWKNavigationDelegate is set. + +

SMManager+ViewController :

+ +## Tasks + +### + +[– webView:didFailNavigation:withError:](#//api/name/webView:didFailNavigation:withError:) + +[– webView:didFinishNavigation:](#//api/name/webView:didFinishNavigation:) + +[– webView:didCommitNavigation:](#//api/name/webView:didCommitNavigation:) + + +## Instance Methods + + +### webView:didCommitNavigation: + +Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. +It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + +- (void)webView:(WKWebView *)*webView* didCommitNavigation:(WKNavigation *)*navigation* + +#### Parameters + +*webView* +   The WKWebView from the WKNavigationDelegate. + +*navigation* +   The WKNavigation from the WKNavigationDelegate. + +#### Declared In +* `SMManager+ViewController.h` + + +### webView:didFailNavigation:withError: + +Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. +It will enable the SDK to have the navigation arrows working properly and log the error when the delegate is implemented in your APP. + +- (void)webView:(WKWebView *)*webView* didFailNavigation:(WKNavigation *)*navigation* withError:(NSError *)*error* + +#### Parameters + +*webView* +   The WKWebView from the WKNavigationDelegate. + +*navigation* +   The WKNavigation from the WKNavigationDelegate. + +*error* +   The NSError from the WKNavigationDelegate. + +#### Declared In +* `SMManager+ViewController.h` + + +### webView:didFinishNavigation: + +Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. +It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + +- (void)webView:(WKWebView *)*webView* didFinishNavigation:(WKNavigation *)*navigation* + +#### Parameters + +*webView* +   The WKWebView from the WKNavigationDelegate. + +*navigation* +   The WKNavigation from the WKNavigationDelegate + +#### Declared In +* `SMManager+ViewController.h` + diff --git a/Documentation/MobileSDK Reference/Categories/SMManagerSetting+Location.md b/Documentation/MobileSDK Reference/Categories/SMManagerSetting+Location.md new file mode 100644 index 0000000..273b59f --- /dev/null +++ b/Documentation/MobileSDK Reference/Categories/SMManagerSetting+Location.md @@ -0,0 +1,37 @@ +# SMManagerSetting(Location) Category Reference + +**Declared in** SMManagerSetting+Location.h + +## Overview + +This category will help you to enable the geolocation service. + +

SMManagerSetting+Location :

+ +## Tasks + +### + +[– configureLocationService](#//api/name/configureLocationService) + + +## Instance Methods + + +### configureLocationService + +To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library + +- (void)configureLocationService + +#### Discussion +This call is optional. It is not needed to successfully start the SDK. +This call is useless if the sdk version is not the one associated to the plotproject framework +However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. +It is the first step to inform the sdk that geo location services are going to be used by the + +Warning: To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library + +#### Declared In +* `SMManagerSetting+Location.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMBaseMessage.md b/Documentation/MobileSDK Reference/Classes/SMBaseMessage.md new file mode 100644 index 0000000..93f3a8a --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMBaseMessage.md @@ -0,0 +1,101 @@ +# SMBaseMessage Class Reference + +**Inherits from** NSObject +**Declared in** SMBaseMessage.h + +## Overview + +This is the Base class for message (push notif, in app message and in app content) + +

SMBaseMessage :

+ +## Tasks + +### + +[  idMessage](#//api/name/idMessage) *property* + +[  )](#//api/name/)) *property* + +[  receptionDate](#//api/name/receptionDate) *property* + +[  expirationDate](#//api/name/expirationDate) *property* + +[  creationDate](#//api/name/creationDate) *property* + +[  isViewed](#//api/name/isViewed) *property* + +[  isDeleted](#//api/name/isDeleted) *property* + +## Properties + + +### ) + +NSDate instance providing the creation date of the message (Deprecated: Deprecated use receptionDate instead) + +@property (nonatomic) NSDate *__deprecated __deprecated_msg ( "Use receptionDate instead" ) + +#### Declared In +* `SMBaseMessage.h` + + +### creationDate + +NSDate instance providing the creation date of the message + +@property (nonatomic) NSDate *creationDate + +#### Declared In +* `SMBaseMessage.h` + + +### expirationDate + +NSDate instance providing the expiration date of the message + +@property (nonatomic) NSDate *expirationDate + +#### Declared In +* `SMBaseMessage.h` + + +### idMessage + +NSString instance providing the id of the message + +@property (nonatomic) NSString *idMessage + +#### Declared In +* `SMBaseMessage.h` + + +### isDeleted + +bool instance infiorming if the message has been deleted + +@property (nonatomic) bool isDeleted + +#### Declared In +* `SMBaseMessage.h` + + +### isViewed + +bool instance infiorming if the message has already been displayed and viewed by user + +@property (nonatomic) bool isViewed + +#### Declared In +* `SMBaseMessage.h` + + +### receptionDate + +NSDate instance providing the reception date on sdk side of the message + +@property (nonatomic) NSDate *receptionDate + +#### Declared In +* `SMBaseMessage.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMDeviceInfos.md b/Documentation/MobileSDK Reference/Classes/SMDeviceInfos.md new file mode 100644 index 0000000..9e59844 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMDeviceInfos.md @@ -0,0 +1,69 @@ +# SMDeviceInfos Class Reference + +**Inherits from** NSObject +**Declared in** SMDeviceInfos.h + +## Overview + +

SMDeviceInfos :

+ +## Tasks + +### + +[  externalId](#//api/name/externalId) *property* + +[+ defaultDeviceInfos](#//api/name/defaultDeviceInfos) + +[+ deviceInfosWithExternalId:](#//api/name/deviceInfosWithExternalId:) + +## Properties + + +### externalId + +Any External Id in your possession that you wish to transmit to the back-end + +@property (nonatomic) NSString *externalId + +#### Discussion +NSString +By default, it is an empty string + +#### Declared In +* `SMDeviceInfos.h` + + +## Class Methods + + +### defaultDeviceInfos + +Create a generic deviceinfos object + ++ (instancetype _Nullable)defaultDeviceInfos + +#### Return Value +a SMDeviceInfos object + +#### Declared In +* `SMDeviceInfos.h` + + +### deviceInfosWithExternalId: + +Create a deviceinfos object with an external id property already set with the value provided + ++ (instancetype _Nullable)deviceInfosWithExternalId:(NSString *_Nullable)*externalId* + +#### Parameters + +*externalId* +   a string containing the id you want to provide to the back-end + +#### Return Value +a SMDeviceInfos object + +#### Declared In +* `SMDeviceInfos.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMEvent.md b/Documentation/MobileSDK Reference/Classes/SMEvent.md new file mode 100644 index 0000000..98b2148 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEvent.md @@ -0,0 +1,98 @@ +# SMEvent Class Reference + +**Inherits from** NSObject +**Declared in** SMEvent.h + +## Overview + +This is the Base class for all type of events + +

SMEvent :

+ +## Tasks + +### + +[  shouldCache](#//api/name/shouldCache) *property* + +[+ eventWithDictionary:](#//api/name/eventWithDictionary:) + +[– applyBlockSuccess:BlockFailure:](#//api/name/applyBlockSuccess:BlockFailure:) + +## Properties + + +### shouldCache + +Confirm if the current event should be cached or not + +@property (nonatomic) BOOL shouldCache + +#### Discussion +If the event fail to be delivered to your backend, then by default, it is cached into an internal queue. +After a while, the library will automaticly try to send it again. +Should you want to prevent this behaviour, feel free to set this property to FALSE. +By default, it is set to TRUE + +#### Declared In +* `SMEvent.h` + + +## Class Methods + + +### eventWithDictionary: + +Create a generic event object that will be sent to platform + ++ (instancetype _Nonnull)eventWithDictionary:(NSDictionary *_Nullable)*dict* + +#### Parameters + +*dict* +   a Dictionary containing any kind of custom datas that must be stored and managed by platform + +#### Return Value +a SMEvent object + +#### Declared In +* `SMEvent.h` + + +## Instance Methods + + +### applyBlockSuccess:BlockFailure: + +Allow to initialise a success block and/or a failure block that will be triggered after an event is sent to the platform + +- (void)applyBlockSuccess:(SMCompletionBlockSuccess _Nullable)*blockSuccess* BlockFailure:(SMCompletionBlockFailure _Nullable)*blockFailure* + +#### Parameters + +*blockSuccess* +   a SMCompletionBlockSuccess block that will be triggered if the send to the platform is successfull + +*blockFailure* +   a SMCompletionBlockFailure block that will be triggered if the send to the platform has failed + +#### Discussion +This method may be used as follow: + + +NSDictionary *dictMyCustomData = @{@"MyKey": @"MyValue"}; +SMEvent *event = [SMEvent eventWithDictionary:dictMyCustomData]; +[event applyBlockSuccess:^(SMSuccess *success) { +// My code for success} +BlockFailure:^(SMFailure *failure) { +// My code for failure }]; +[[SMManager sharedInstance] sendSMEvent:event]; + +This method is optional. Use it only if you need it. + +Warning: It is developer’s responsability to make sure no strong retrain cycles are added to the completion-blocks. +Make sure to read the following Apple documentation. + +#### Declared In +* `SMEvent.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMEventUser.md b/Documentation/MobileSDK Reference/Classes/SMEventUser.md new file mode 100644 index 0000000..29f4b3f --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEventUser.md @@ -0,0 +1,14 @@ +# SMEventUser Class Reference + +**Inherits from** SMEvent : +NSObject +**Declared in** SMEventUser.h + +## Overview + +Class representing all User-eventing +Instances of this class should not be directly created. +Please use children classes instead. + +

SMEventUser:

+ diff --git a/Documentation/MobileSDK Reference/Classes/SMEventUserLogin.md b/Documentation/MobileSDK Reference/Classes/SMEventUserLogin.md new file mode 100644 index 0000000..357dc3e --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEventUserLogin.md @@ -0,0 +1,86 @@ +# SMEventUserLogin Class Reference + +**Inherits from** SMEventUser : +SMEvent : +NSObject +**Declared in** SMEventUserLogin.h + +## Overview + +User login event class + +

SMEventUserLogin:

+ +## Tasks + +### + +[+ eventWithEmail:](#//api/name/eventWithEmail:) + +[+ eventWithEmail:Dictionary:](#//api/name/eventWithEmail:Dictionary:) + +[+ eventWithDictionary:](#//api/name/eventWithDictionary:) + + +## Class Methods + + +### eventWithDictionary: + +Create a UserLogin event object that will be sent to platform + ++ (instancetype _Nonnull)eventWithDictionary:(NSDictionary *_Nullable)*dict* + +#### Parameters + +*dict* +   a Dictionary containing an alternate key/value field to search for the user +example: [SMEventUserLogin eventWithDictionary: @{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserLogin object + +#### Declared In +* `SMEventUserLogin.h` + + +### eventWithEmail: + +Create a UserLogin event object that will be sent to selligent platform when user logged in + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* + +#### Parameters + +*mail* +   the e-mail of the user + +#### Return Value +a SMEventUserLogin object + +#### Declared In +* `SMEventUserLogin.h` + + +### eventWithEmail:Dictionary: + +Create a UserLogin event object that will be sent to selligent platform when user logged in + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* Dictionary:(NSDictionary<NSString*,NSString*> *_Nullable)*dict* + +#### Parameters + +*mail* +   the e-mail of the user + +*dict* +   a Dictionary containing a string as data that must be stored and managed by platform +If email is not provided you can use in the dictionary an alternate key/value field to search for the user +example: [SMEventUserLogin eventWithEmail @“” Dictionary: @{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserLogin object + +#### Declared In +* `SMEventUserLogin.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMEventUserLogout.md b/Documentation/MobileSDK Reference/Classes/SMEventUserLogout.md new file mode 100644 index 0000000..94720d8 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEventUserLogout.md @@ -0,0 +1,86 @@ +# SMEventUserLogout Class Reference + +**Inherits from** SMEventUser : +SMEvent : +NSObject +**Declared in** SMEventUserLogout.h + +## Overview + +User logout event class + +

SMEventUserLogout:

+ +## Tasks + +### + +[+ eventWithEmail:](#//api/name/eventWithEmail:) + +[+ eventWithEmail:Dictionary:](#//api/name/eventWithEmail:Dictionary:) + +[+ eventWithDictionary:](#//api/name/eventWithDictionary:) + + +## Class Methods + + +### eventWithDictionary: + +Create a UserLogout event object that will be sent to platform + ++ (instancetype _Nonnull)eventWithDictionary:(NSDictionary *_Nullable)*dict* + +#### Parameters + +*dict* +   a Dictionary containing an alternate key/value field to search for the user +example: [SMEventUserLogout eventWithDictionary:@{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserLogout object + +#### Declared In +* `SMEventUserLogout.h` + + +### eventWithEmail: + +Create a UserLogout event object that will be sent to selligent platform when user logged out + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* + +#### Parameters + +*mail* +   the e-mail of the user + +#### Return Value +a SMEventUserLogout object + +#### Declared In +* `SMEventUserLogout.h` + + +### eventWithEmail:Dictionary: + +Create a UserLogout event object that will be sent to selligent platform when user logged out + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* Dictionary:(NSDictionary<NSString*,NSString*> *_Nullable)*dict* + +#### Parameters + +*mail* +   the e-mail of the user + +*dict* +   a Dictionary containing a string as data that must be stored and managed by platform +If email is not provided you can use in the dictionary an alternate key/value field to search for the user +example: [SMEventUserLogout eventWithEmail @“” Dictionary: @{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserLogout object + +#### Declared In +* `SMEventUserLogout.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMEventUserRegistration.md b/Documentation/MobileSDK Reference/Classes/SMEventUserRegistration.md new file mode 100644 index 0000000..d7abe01 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEventUserRegistration.md @@ -0,0 +1,86 @@ +# SMEventUserRegistration Class Reference + +**Inherits from** SMEventUser : +SMEvent : +NSObject +**Declared in** SMEventUserRegistration.h + +## Overview + +User registration event class + +

SMEventUserRegistration:

+ +## Tasks + +### + +[+ eventWithEmail:](#//api/name/eventWithEmail:) + +[+ eventWithEmail:Dictionary:](#//api/name/eventWithEmail:Dictionary:) + +[+ eventWithDictionary:](#//api/name/eventWithDictionary:) + + +## Class Methods + + +### eventWithDictionary: + +Create a UserRegistration event object that will be sent to platform + ++ (instancetype _Nonnull)eventWithDictionary:(NSDictionary *_Nullable)*dict* + +#### Parameters + +*dict* +   a Dictionary containing an alternate key/value field to search for the user +example: [SMEventUserRegistration eventWithDictionary:@{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserRegistration object + +#### Declared In +* `SMEventUserRegistration.h` + + +### eventWithEmail: + +Create a UserRegistration event object that will be sent to selligent platform when user registered + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* + +#### Parameters + +*mail* +   the e-mail of the user + +#### Return Value +a SMEventUserRegistration object + +#### Declared In +* `SMEventUserRegistration.h` + + +### eventWithEmail:Dictionary: + +Create a UserRegistration event object that will be sent to selligent platform when user registered + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* Dictionary:(NSDictionary<NSString*,NSString*> *_Nullable)*dict* + +#### Parameters + +*mail* +   the e-mail of the user + +*dict* +   a Dictionary containing a string as data that must be stored and managed by platform +If email is not provided you can use in the dictionary an alternate key/value field to search for the user +example: [SMEventUserRegistration eventWithEmail @“” Dictionary: @{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserRegistration object + +#### Declared In +* `SMEventUserRegistration.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMEventUserUnregistration.md b/Documentation/MobileSDK Reference/Classes/SMEventUserUnregistration.md new file mode 100644 index 0000000..672cd88 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMEventUserUnregistration.md @@ -0,0 +1,86 @@ +# SMEventUserUnregistration Class Reference + +**Inherits from** SMEventUser : +SMEvent : +NSObject +**Declared in** SMEventUserUnregistration.h + +## Overview + +User unregistration event class + +

SMEventUserUnregistration:

+ +## Tasks + +### + +[+ eventWithEmail:](#//api/name/eventWithEmail:) + +[+ eventWithEmail:Dictionary:](#//api/name/eventWithEmail:Dictionary:) + +[+ eventWithDictionary:](#//api/name/eventWithDictionary:) + + +## Class Methods + + +### eventWithDictionary: + +Create a UserUnregistration event object that will be sent to platform + ++ (instancetype _Nonnull)eventWithDictionary:(NSDictionary *_Nullable)*dict* + +#### Parameters + +*dict* +   a Dictionary containing an alternate key/value field to search for the user +example: [SMEventUserUnregistration eventWithDictionary:@{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserUnregistration object + +#### Declared In +* `SMEventUserUnregistration.h` + + +### eventWithEmail: + +Create a UserUnregistration event object that will be sent to selligent platform when user unregistered + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* + +#### Parameters + +*mail* +   the e-mail of the user + +#### Return Value +a SMEventUserUnregistration object + +#### Declared In +* `SMEventUserUnregistration.h` + + +### eventWithEmail:Dictionary: + +Create a UserUnregistration event object that will be sent to selligent platform when user unregistered + ++ (instancetype _Nonnull)eventWithEmail:(NSString *_Null_unspecified)*mail* Dictionary:(NSDictionary<NSString*,NSString*> *_Nullable)*dict* + +#### Parameters + +*mail* +   the e-mail of the user + +*dict* +   a Dictionary containing a string as data that must be stored and managed by platform +If email is not provided you can use in the dictionary an alternate key/value field to search for the user +example: [SMEventUserUnregistration eventWithEmail @“” Dictionary: @{@“userID”: @“1234”}]; + +#### Return Value +a SMEventUserUnregistration object + +#### Declared In +* `SMEventUserUnregistration.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMFailure.md b/Documentation/MobileSDK Reference/Classes/SMFailure.md new file mode 100644 index 0000000..d73c896 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMFailure.md @@ -0,0 +1,12 @@ +# SMFailure Class Reference + +**Inherits from** SMMessage : +NSObject +**Declared in** SMFailure.h + +## Overview + +This class is used to return any error + +

SMFailure:

+ diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentHTMLViewController.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentHTMLViewController.md new file mode 100644 index 0000000..7b71409 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentHTMLViewController.md @@ -0,0 +1,123 @@ +# SMInAppContentHTMLViewController Class Reference + +**Inherits from** SMInAppContentViewController : +UIViewController +**Declared in** SMInAppContentHTMLViewController.h + +## Overview + +a view controller for HTML In App Content + +

SMInAppContentHTMLViewController :

+ +## Tasks + +### + +[+ viewControllerForCategory:](#//api/name/viewControllerForCategory:) + +[+ viewControllerForCategory:AndOptions:](#//api/name/viewControllerForCategory:AndOptions:) + +[+ viewControllerForCategory:InNumberOfBoxes:](#//api/name/viewControllerForCategory:InNumberOfBoxes:) + +[+ viewControllerForCategory:InNumberOfBoxes:AndOptions:](#//api/name/viewControllerForCategory:InNumberOfBoxes:AndOptions:) + + +## Class Methods + + +### viewControllerForCategory: + +This will provide you a custom viewcontroller with all HTML in app content for a specific category + ++ (instancetype)viewControllerForCategory:(NSString *)*category* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +#### Return Value +a SMInAppContentHTMLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to define a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentHTMLViewController.h` + + +### viewControllerForCategory:AndOptions: + +This will provide you a custom viewcontroller with all HTML in app content for a specific category + ++ (instancetype)viewControllerForCategory:(NSString *)*category* AndOptions:(SMInAppContentStyleOptions *)*options* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +*options* +   a SMInAppContentStyleOptions object allowing you to customise the in app content + +#### Return Value +a SMInAppContentHTMLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to define a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentHTMLViewController.h` + + +### viewControllerForCategory:InNumberOfBoxes: + +This will provide you a custom viewcontroller with HTML in app content for a specific category + ++ (instancetype)viewControllerForCategory:(NSString *)*category* InNumberOfBoxes:(int)*numberofboxes* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +*numberofboxes* +   an int corresponding to the maximum numbers of.md boxes that the view controller must contain + +#### Return Value +a SMInAppContentHTMLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to provide a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentHTMLViewController.h` + + +### viewControllerForCategory:InNumberOfBoxes:AndOptions: + +This will provide you a custom viewcontroller with HTML in app content for a specific category + ++ (instancetype)viewControllerForCategory:(NSString *)*category* InNumberOfBoxes:(int)*numberofboxes* AndOptions:(SMInAppContentStyleOptions *)*options* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +*numberofboxes* +   an int corresponding to the maximum numbers of.md boxes that the view controller must contain + +*options* +   a SMInAppContentStyleOptions object allowing you to customise the in app content + +#### Return Value +a SMInAppContentHTMLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to provide a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentHTMLViewController.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentImageViewController.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentImageViewController.md new file mode 100644 index 0000000..98df31e --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentImageViewController.md @@ -0,0 +1,68 @@ +# SMInAppContentImageViewController Class Reference + +**Inherits from** SMInAppContentViewController : +UIViewController +**Declared in** SMInAppContentImageViewController.h + +## Overview + +a view controller for Image In App Content + +

SMInAppContentImageViewController :

+ +## Tasks + +### + +[+ viewControllerForCategory:](#//api/name/viewControllerForCategory:) + +[+ viewControllerForCategory:AndOptions:](#//api/name/viewControllerForCategory:AndOptions:) + + +## Class Methods + + +### viewControllerForCategory: + +This will provide you a custom viewcontroller with one image view loaded with the url provided by an in app content for a specific category of image type + ++ (instancetype)viewControllerForCategory:(NSString *)*category* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +#### Return Value +a SMInAppContentImageViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to provide a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentImageViewController.h` + + +### viewControllerForCategory:AndOptions: + +This will provide you a custom viewcontroller with one web view loaded with the url provided by an in app content for a specific category of an Image type + ++ (instancetype)viewControllerForCategory:(NSString *)*category* AndOptions:(SMInAppContentStyleOptions *)*options* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +*options* +   a SMInAppContentStyleOptions object allowing you to customise the in app content + +#### Return Value +a SMInAppContentImageViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to define a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentImageViewController.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentMessage.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentMessage.md new file mode 100644 index 0000000..ac7766e --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentMessage.md @@ -0,0 +1,88 @@ +# SMInAppContentMessage Class Reference + +**Inherits from** SMBaseMessage : +NSObject +**Declared in** SMInAppContentMessage.h + +## Overview + +

SMInAppContentMessage :

+ +## Tasks + +### + +[  title](#//api/name/title) *property* + +[  body](#//api/name/body) *property* + +[  category](#//api/name/category) *property* + +[  iacType](#//api/name/iacType) *property* + +[  )](#//api/name/)) *property* + +[  arrayIACLinks](#//api/name/arrayIACLinks) *property* + +## Properties + + +### ) + +NSDate instance providing the expiration date of the message (Deprecated: Deprecated use expirationDate on SMBaseMessage instead) + +@property (nonatomic) NSDate *__deprecated __deprecated_msg ( "Use expirationDate instead." ) + +#### Declared In +* `SMInAppContentMessage.h` + + +### arrayIACLinks + +NSArray of SMLink objects + +@property (nonatomic) NSArray *arrayIACLinks + +#### Declared In +* `SMInAppContentMessage.h` + + +### body + +NSString instance providing the content of the message + +@property (nonatomic) NSString *body + +#### Declared In +* `SMInAppContentMessage.h` + + +### category + +NSString instance providing the category of the message + +@property (nonatomic) NSString *category + +#### Declared In +* `SMInAppContentMessage.h` + + +### iacType + +SMInAppContentType instance providing the in app content type of the message + +@property (nonatomic) SMInAppContentType iacType + +#### Declared In +* `SMInAppContentMessage.h` + + +### title + +NSString instance providing the title of the message + +@property (nonatomic) NSString *title + +#### Declared In +* `SMInAppContentMessage.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentStyleOptions.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentStyleOptions.md new file mode 100644 index 0000000..9eac1fc --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentStyleOptions.md @@ -0,0 +1,1009 @@ +# SMInAppContentStyleOptions Class Reference + +**Inherits from** NSObject +**Declared in** SMInAppContentStyleOptions.h + +## Overview + +

SMInAppContentStyleOptions :

+ +## Tasks + +### + +[  mainViewIsScrollable](#//api/name/mainViewIsScrollable) *property* + +[  mainViewBackgroundColor](#//api/name/mainViewBackgroundColor) *property* + +[  activityIndicatorStyle](#//api/name/activityIndicatorStyle) *property* + +[  isStatusBarHidden](#//api/name/isStatusBarHidden) *property* + +[  boxLeading](#//api/name/boxLeading) *property* + +[  boxTrailing](#//api/name/boxTrailing) *property* + +[  marginBetweenBoxes](#//api/name/marginBetweenBoxes) *property* + +[  marginBetweenFirstBoxAndTopOfView](#//api/name/marginBetweenFirstBoxAndTopOfView) *property* + +[  marginBetweenLastBoxAndBottomOfView](#//api/name/marginBetweenLastBoxAndBottomOfView) *property* + +[  boxBorderWidth](#//api/name/boxBorderWidth) *property* + +[  boxBorderColor](#//api/name/boxBorderColor) *property* + +[  boxCornerRadius](#//api/name/boxCornerRadius) *property* + +[  boxBackgroundColor](#//api/name/boxBackgroundColor) *property* + +[  boxShadowColor](#//api/name/boxShadowColor) *property* + +[  boxShadowOpacity](#//api/name/boxShadowOpacity) *property* + +[  boxShadowRadius](#//api/name/boxShadowRadius) *property* + +[  boxShadowOffset](#//api/name/boxShadowOffset) *property* + +[  titleBorderWidth](#//api/name/titleBorderWidth) *property* + +[  titleBorderColor](#//api/name/titleBorderColor) *property* + +[  titleCornerRadius](#//api/name/titleCornerRadius) *property* + +[  titleBackgroundColor](#//api/name/titleBackgroundColor) *property* + +[  titleNumberOfLines](#//api/name/titleNumberOfLines) *property* + +[  titleLineBreakMode](#//api/name/titleLineBreakMode) *property* + +[  titleTextAlignment](#//api/name/titleTextAlignment) *property* + +[  titleAttributes](#//api/name/titleAttributes) *property* + +[  titleTextColor](#//api/name/titleTextColor) *property* + +[  titleFont](#//api/name/titleFont) *property* + +[  titleTrailing](#//api/name/titleTrailing) *property* + +[  titleLeading](#//api/name/titleLeading) *property* + +[  titleTop](#//api/name/titleTop) *property* + +[  titleShadowColor](#//api/name/titleShadowColor) *property* + +[  titleShadowOpacity](#//api/name/titleShadowOpacity) *property* + +[  titleShadowRadius](#//api/name/titleShadowRadius) *property* + +[  titleShadowOffset](#//api/name/titleShadowOffset) *property* + +[  showTitleBorderBottom](#//api/name/showTitleBorderBottom) *property* + +[  titleBorderBottomColor](#//api/name/titleBorderBottomColor) *property* + +[  textViewTrailing](#//api/name/textViewTrailing) *property* + +[  textViewLeading](#//api/name/textViewLeading) *property* + +[  textViewTop](#//api/name/textViewTop) *property* + +[  textViewContentOffset](#//api/name/textViewContentOffset) *property* + +[  textViewContentInset](#//api/name/textViewContentInset) *property* + +[  textViewBorderWidth](#//api/name/textViewBorderWidth) *property* + +[  textViewBorderColor](#//api/name/textViewBorderColor) *property* + +[  textViewCornerRadius](#//api/name/textViewCornerRadius) *property* + +[  textViewBackgroundColor](#//api/name/textViewBackgroundColor) *property* + +[  linksAlignment](#//api/name/linksAlignment) *property* + +[  linksMargin](#//api/name/linksMargin) *property* + +[  linksTop](#//api/name/linksTop) *property* + +[  linksBottom](#//api/name/linksBottom) *property* + +[  marginBetweenLinks](#//api/name/marginBetweenLinks) *property* + +[  linkBorderWidth](#//api/name/linkBorderWidth) *property* + +[  linkBorderColor](#//api/name/linkBorderColor) *property* + +[  linkCornerRadius](#//api/name/linkCornerRadius) *property* + +[  linkShadowColor](#//api/name/linkShadowColor) *property* + +[  linkShadowOpacity](#//api/name/linkShadowOpacity) *property* + +[  linkShadowRadius](#//api/name/linkShadowRadius) *property* + +[  linkShadowOffset](#//api/name/linkShadowOffset) *property* + +[  linkBackgroundColor](#//api/name/linkBackgroundColor) *property* + +[  linkTextColor](#//api/name/linkTextColor) *property* + +[  linkFont](#//api/name/linkFont) *property* + +[  linkContentEdgeInsets](#//api/name/linkContentEdgeInsets) *property* + +[+ defaultStylingOptions](#//api/name/defaultStylingOptions) + +## Properties + + +### activityIndicatorStyle + +Set the UIActivityIndicator style + +@property (nonatomic) UIActivityIndicatorViewStyle activityIndicatorStyle + +#### Discussion +UIActivityIndicatorViewStyle +By default, it is UIActivityIndicatorViewStyleGray + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxBackgroundColor + +Set the background color of all boxes + +@property (nonatomic) UIColor *boxBackgroundColor + +#### Discussion +UIColor +By default, it is clearColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxBorderColor + +Set the color of box Border + +@property (nonatomic) UIColor *boxBorderColor + +#### Discussion +UIColor +By default, it is set to [UIColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:0.8] + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxBorderWidth + +Set the border width for all boxes + +@property (nonatomic) CGFloat boxBorderWidth + +#### Discussion +CGFloat must be a positive value +By default, it is set to 1 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxCornerRadius + +Set the radius of the corner for all boxes + +@property (nonatomic) CGFloat boxCornerRadius + +#### Discussion +CGFloat must be a positive value +By default, it is set not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxLeading + +Set the leading constant between edge of view and every in app content box + +@property (nonatomic) CGFloat boxLeading + +#### Discussion +CGFloat must be a positive value +By default, it is set to 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxShadowColor + +Set the shadow color of all boxes + +@property (nonatomic) UIColor *boxShadowColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxShadowOffset + +Set the shadow offset of all boxes + +@property (nonatomic) CGSize boxShadowOffset + +#### Discussion +CGSize +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxShadowOpacity + +Set the shadow opacity of all boxes + +@property (nonatomic) CGFloat boxShadowOpacity + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxShadowRadius + +Set the shadow radius of all boxes + +@property (nonatomic) CGFloat boxShadowRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### boxTrailing + +Set the trailing constant between edge of view and every in app content box + +@property (nonatomic) CGFloat boxTrailing + +#### Discussion +CGFloat must be a positive value +By default, it is set to 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### isStatusBarHidden + +Set the boolean to determine if status bar must be hidden or not + +@property (nonatomic) bool isStatusBarHidden + +#### Discussion +bool +By default, it is NO + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkBackgroundColor + +Set the background color of link + +@property (nonatomic) UIColor *linkBackgroundColor + +#### Discussion +UIColor +By default, it is whiteColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkBorderColor + +Set the color of link Border + +@property (nonatomic) UIColor *linkBorderColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkBorderWidth + +Set the border width for links + +@property (nonatomic) CGFloat linkBorderWidth + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkContentEdgeInsets + +Set the link content edge inset + +@property (nonatomic) UIEdgeInsets linkContentEdgeInsets + +#### Discussion +UIEdgeInsets +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkCornerRadius + +Set the corner radius for links + +@property (nonatomic) CGFloat linkCornerRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkFont + +Set the font of links + +@property (nonatomic) UIFont *linkFont + +#### Discussion +UIFont +By default, it is iOS default + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkShadowColor + +Set the shadow color of all links + +@property (nonatomic) UIColor *linkShadowColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkShadowOffset + +Set the shadow offset of all links + +@property (nonatomic) CGSize linkShadowOffset + +#### Discussion +CGSize +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkShadowOpacity + +Set the shadow opacity of all links + +@property (nonatomic) CGFloat linkShadowOpacity + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkShadowRadius + +Set the shadow radius of all links + +@property (nonatomic) CGFloat linkShadowRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linkTextColor + +Set the text color in link + +@property (nonatomic) UIColor *linkTextColor + +#### Discussion +UIColor +By default, it is whiteColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linksAlignment + +Set position of the links, this can be Left, Right, or Center + +@property (nonatomic) SMContentAlignment linksAlignment + +#### Discussion +SMContentAlignment +By default, it is kSMAlignLeft + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linksBottom + +Set the constant between links bottom and bottom of box + +@property (nonatomic) CGFloat linksBottom + +#### Discussion +CGFloat +By default it is 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linksMargin + +Set the constant margin between links and edge of box (depends also of the linksAlignment property: if linksAligment is kSMAlignLeft than this property will only be applied for Leading margin, if linksAlignment is kSMAlignRight than this property is applied to trailing margin, if linksAlignment is kSMAlignCenter than this property is applied both for leading and trailing) + +@property (nonatomic) CGFloat linksMargin + +#### Discussion +CGFloat +By default, it is 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### linksTop + +Set the constant between links top and bottom of textview + +@property (nonatomic) CGFloat linksTop + +#### Discussion +CGFloat +By default it is 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### mainViewBackgroundColor + +Set the main container view of your in app contents background color + +@property (nonatomic) UIColor *mainViewBackgroundColor + +#### Discussion +UIColor +By default, it is clearColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### mainViewIsScrollable + +inform the sdk if the main container view of your in app content must be scrollable + +@property (nonatomic) bool mainViewIsScrollable + +#### Discussion +bool +By default, it is set to true + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### marginBetweenBoxes + +Set the Margin between bottom of a box and top of next one + +@property (nonatomic) CGFloat marginBetweenBoxes + +#### Discussion +CGFloat must be a positive value +By default, it is set to 20 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### marginBetweenFirstBoxAndTopOfView + +Set the Margin between top of first box and top of view + +@property (nonatomic) CGFloat marginBetweenFirstBoxAndTopOfView + +#### Discussion +CGFloat must be a positive value +By default, it is set to 20 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### marginBetweenLastBoxAndBottomOfView + +Set the Margin between bottom of last box and bottom of view + +@property (nonatomic) CGFloat marginBetweenLastBoxAndBottomOfView + +#### Discussion +CGFloat must be a positive value +By default, it is set to 20 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### marginBetweenLinks + +Set the constant between links margin - useful when there is two links that will be displayed + +@property (nonatomic) CGFloat marginBetweenLinks + +#### Discussion +CGFloat +By default it is 10 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### showTitleBorderBottom + +Set the bool that will tell if a border bottom must be displayed under all titles in box + +@property (nonatomic) bool showTitleBorderBottom + +#### Discussion +bool +By default, it is NO + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewBackgroundColor + +Set the background color of textview + +@property (nonatomic) UIColor *textViewBackgroundColor + +#### Discussion +UIColor +By default, it is whiteColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewBorderColor + +Set the color of textview Border + +@property (nonatomic) UIColor *textViewBorderColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewBorderWidth + +Set the border width for textview + +@property (nonatomic) CGFloat textViewBorderWidth + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewContentInset + +Set the textview content edge inset + +@property (nonatomic) UIEdgeInsets textViewContentInset + +#### Discussion +UIEdgeInsets +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewContentOffset + +Set the textview content offset + +@property (nonatomic) CGPoint textViewContentOffset + +#### Discussion +CGPoint +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewCornerRadius + +Set the radius of the corner for all textview + +@property (nonatomic) CGFloat textViewCornerRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewLeading + +Set the leading between the textview and the box + +@property (nonatomic) CGFloat textViewLeading + +#### Discussion +CGFloat +By default, it is 10.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewTop + +Set the top between the textview and the box + +@property (nonatomic) CGFloat textViewTop + +#### Discussion +CGFloat +By default, it is 10.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### textViewTrailing + +Set the trailing between the textview and the box + +@property (nonatomic) CGFloat textViewTrailing + +#### Discussion +CGFloat +By default, it is 10.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleAttributes + +Set the attributes that will be passed to NSAttributedString init which will create the text that will be display for title + +@property (nonatomic) NSDictionary *titleAttributes + +#### Discussion +NSDictionary +By default, it is nil + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleBackgroundColor + +Set the background color of all titles + +@property (nonatomic) UIColor *titleBackgroundColor + +#### Discussion +UIColor +By default, it is whiteColor + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleBorderBottomColor + +Set the border color of all border bottom that are displayed under all titles in box + +@property (nonatomic) UIColor *titleBorderBottomColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleBorderColor + +Set the color of title border + +@property (nonatomic) UIColor *titleBorderColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleBorderWidth + +Set the border width for title + +@property (nonatomic) CGFloat titleBorderWidth + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleCornerRadius + +Set the radius of the corner for all boxes + +@property (nonatomic) CGFloat titleCornerRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleFont + +Set font of the title + +@property (nonatomic) UIFont *titleFont + +#### Discussion +UIFont +By default, it is iOS default + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleLeading + +Set the leading between the title container and the box + +@property (nonatomic) CGFloat titleLeading + +#### Discussion +CGFloat +By default, it is 10.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleLineBreakMode + +Set the NSLineBreakMode of all titles + +@property (nonatomic) NSLineBreakMode titleLineBreakMode + +#### Discussion +NSLineBreakMode +By default, it is NSLineBreakByWordWrapping + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleNumberOfLines + +Set the number of lines of all titles + +@property (nonatomic) CGFloat titleNumberOfLines + +#### Discussion +UIColor +By default, it is 0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleShadowColor + +Set the shadow color of all titles + +@property (nonatomic) UIColor *titleShadowColor + +#### Discussion +UIColor +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleShadowOffset + +Set the shadow offset of all titles + +@property (nonatomic) CGSize titleShadowOffset + +#### Discussion +CGSize +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleShadowOpacity + +Set the shadow opacity of all titles + +@property (nonatomic) CGFloat titleShadowOpacity + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleShadowRadius + +Set the corner radius of all titles + +@property (nonatomic) CGFloat titleShadowRadius + +#### Discussion +CGFloat +By default, it is not set + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleTextAlignment + +Set the title text alignment + +@property (nonatomic) NSTextAlignment titleTextAlignment + +#### Discussion +NSTextAlignment +By default, it is NSTextAlignmentLeft + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleTextColor + +Set title text color + +@property (nonatomic) UIColor *titleTextColor + +#### Discussion +UIColor +By default, it is iOS default + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleTop + +Set the top between the title container and the box + +@property (nonatomic) CGFloat titleTop + +#### Discussion +CGFloat +By default, it is 30.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +### titleTrailing + +Set the trailing between the title container and the box + +@property (nonatomic) CGFloat titleTrailing + +#### Discussion +CGFloat +By default, it is 10.0 + +#### Declared In +* `SMInAppContentStyleOptions.h` + + +## Class Methods + + +### defaultStylingOptions + +SMInAppContentStyleOptions constructor + ++ (instancetype)defaultStylingOptions + +#### Return Value +SMInAppContentStyleOptions + +#### Declared In +* `SMInAppContentStyleOptions.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentURLViewController.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentURLViewController.md new file mode 100644 index 0000000..48f3056 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentURLViewController.md @@ -0,0 +1,68 @@ +# SMInAppContentURLViewController Class Reference + +**Inherits from** SMInAppContentViewController : +UIViewController +**Declared in** SMInAppContentURLViewController.h + +## Overview + +a view controller for URL In App Content + +

SMInAppContentURLViewController :

+ +## Tasks + +### + +[+ viewControllerForCategory:](#//api/name/viewControllerForCategory:) + +[+ viewControllerForCategory:AndOptions:](#//api/name/viewControllerForCategory:AndOptions:) + + +## Class Methods + + +### viewControllerForCategory: + +This will provide you a custom viewcontroller with one web view loaded with the url provided by an in app content for a specific category of an URL type + ++ (instancetype)viewControllerForCategory:(NSString *)*category* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +#### Return Value +a SMInAppContentURLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to provide a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentURLViewController.h` + + +### viewControllerForCategory:AndOptions: + +This will provide you a custom viewcontroller with one web view loaded with the url provided by an in app content for a specific category of an URL type + ++ (instancetype)viewControllerForCategory:(NSString *)*category* AndOptions:(SMInAppContentStyleOptions *)*options* + +#### Parameters + +*category* +   a NSString of the desired category of In App Content + +*options* +   a SMInAppContentStyleOptions object allowing you to customise the in app content + +#### Return Value +a SMInAppContentURLViewController + +#### Discussion +The viewcontroller will take all available space in screen and will contain a close button if it is presented as it is. Otherwise the app will have to define a UIContainerView which will contain the view controller + +#### Declared In +* `SMInAppContentURLViewController.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppContentViewController.md b/Documentation/MobileSDK Reference/Classes/SMInAppContentViewController.md new file mode 100644 index 0000000..2290288 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppContentViewController.md @@ -0,0 +1,41 @@ +# SMInAppContentViewController Class Reference + +**Inherits from** UIViewController +**Declared in** SMInAppContentViewController.h + +## Overview + +parent class for SMInAppContentURLViewController, SMInAppContentHTMLViewController, SMInAppContentImageViewController + +

SMInAppContentViewController :

+ +## Tasks + +### + +[  category](#//api/name/category) *property* + +[  isEmpty](#//api/name/isEmpty) *property* + +## Properties + + +### category + +NSString containing the category of the SMInAppContentViewController + +@property (nonatomic, strong) NSString *category + +#### Declared In +* `SMInAppContentViewController.h` + + +### isEmpty + +bool set with true when the SMInAppContentViewController is empty + +@property (nonatomic) bool isEmpty + +#### Declared In +* `SMInAppContentViewController.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMInAppMessage.md b/Documentation/MobileSDK Reference/Classes/SMInAppMessage.md new file mode 100644 index 0000000..1523de4 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMInAppMessage.md @@ -0,0 +1,76 @@ +# SMInAppMessage Class Reference + +**Inherits from** SMBaseMessage : +NSObject +**Declared in** SMInAppMessage.h + +## Overview + +

SMInAppMessage :

+ +## Tasks + +### + +[  title](#//api/name/title) *property* + +[  body](#//api/name/body) *property* + +[  arrayMapAnnotations](#//api/name/arrayMapAnnotations) *property* + +[  arrayIAMLinks](#//api/name/arrayIAMLinks) *property* + +[  iamType](#//api/name/iamType) *property* + +## Properties + + +### arrayIAMLinks + +NSArray of SMLink objects + +@property (nonatomic) NSArray *arrayIAMLinks + +#### Declared In +* `SMInAppMessage.h` + + +### arrayMapAnnotations + +NSArray of SMNotificationAnnotationData objects for map In App message + +@property (nonatomic) NSArray *arrayMapAnnotations + +#### Declared In +* `SMInAppMessage.h` + + +### body + +NSString instance providing the content of the message + +@property (nonatomic) NSString *body + +#### Declared In +* `SMInAppMessage.h` + + +### iamType + +SMInAppMessageType instance providing the in app message type + +@property (nonatomic) SMInAppMessageType iamType + +#### Declared In +* `SMInAppMessage.h` + + +### title + +NSString instance providing the title of the message + +@property (nonatomic) NSString *title + +#### Declared In +* `SMInAppMessage.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMLink.md b/Documentation/MobileSDK Reference/Classes/SMLink.md new file mode 100644 index 0000000..d50d2c2 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMLink.md @@ -0,0 +1,67 @@ +# SMLink Class Reference + +**Inherits from** NSObject +**Declared in** SMLink.h + +## Overview + +

SMLink :

+ +## Tasks + +### + +[  idButtonData](#//api/name/idButtonData) *property* + +[  label](#//api/name/label) *property* + +[  value](#//api/name/value) *property* + +[  type](#//api/name/type) *property* + +## Properties + + +### idButtonData + +NSString instance providing the id of the button + +@property (nonatomic, strong) NSString *idButtonData + +#### Declared In +* `SMLink.h` + + +### label + +NSString instance providing the label of the button + +@property (nonatomic, strong) NSString *label + +#### Declared In +* `SMLink.h` + + +### type + +The type (SMNotificationButtonType) of action that the button will execute. + +@property (nonatomic) SMNotificationButtonType type + +#### See Also + +* SMNotificationButtonType + +#### Declared In +* `SMLink.h` + + +### value + +NSString instance providing the value of the button + +@property (nonatomic, strong) NSString *value + +#### Declared In +* `SMLink.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMManager.md b/Documentation/MobileSDK Reference/Classes/SMManager.md new file mode 100644 index 0000000..f6e05c1 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMManager.md @@ -0,0 +1,129 @@ +# SMManager Class Reference + +**Inherits from** NSObject +**Declared in** SMManager.h + +## Overview + +

Start Library :

+ +In order to start the library, please follow the steps bellow (will mainly happen in your UIApplication’s delegate): + + + +Starting the library will not register for remote notification. +Don’t forget to call registerForRemoteNotification according to your application’s need. + +From there, your application is ready to handle all incoming remote-notifications. + +

SMManager Singleton :

This manager is the main interface third party developers will be using. + +## Tasks + +### + +[  versionLib](#//api/name/versionLib) *property* + +[+ sharedInstance](#//api/name/sharedInstance) + +[– startWithLaunchOptions:Setting:](#//api/name/startWithLaunchOptions:Setting:) + +[– reloadSetting:](#//api/name/reloadSetting:) + +[– deviceID](#//api/name/deviceID) + +## Properties + + +### versionLib + +The current version of the library + +@property (strong, nonatomic) NSString *versionLib + +#### Declared In +* `SMManager.h` + + +## Class Methods + + +### sharedInstance + +Singleton for SellMobileSDK Class which allow to access public SellMobileSDK methods and properties + ++ (instancetype _Nonnull)sharedInstance + +#### Return Value +SMManager : singleton instance of SMManager class + +#### Declared In +* `SMManager.h` + + +## Instance Methods + + +### deviceID + +Device id used by the sdk + +- (NSString *_Nullable)deviceID + +#### Discussion +NSString + +#### Declared In +* `SMManager.h` + + +### reloadSetting: + +Optional + used for testing only. This method will re-configure the SMManager with the newly provided information + +- (void)reloadSetting:(SMManagerSetting *_Null_unspecified)*setting* + +#### Parameters + +*setting* +   mandatory SMManagerSetting instance to start-up the library + +#### Discussion +This is a handy API in case you would like to switch between two backend environements without rebuilding your target. + +Warning: This API is provided for testing purposes only. Never use it in production. +Make sure to re-enable any service after calling this API. + +#### Declared In +* `SMManager.h` + + +### startWithLaunchOptions:Setting: + +Mandatory method which allows sdk initialisation. To be included in application:didFinishLaunchingWithOptions: +Make sure to provide the launchOptions dictionary + +- (void)startWithLaunchOptions:(NSDictionary *_Nullable)*launchOptions* Setting:(SMManagerSetting *_Null_unspecified)*setting* + +#### Parameters + +*launchOptions* +   NSDictionary instance indicating the reason the app was launched (if any). This dictionary is provided by application:didFinishLaunchingWithOptions + +*setting* +   mandatory SMManagerSetting instance to start-up the library + +#### Discussion +This method is mandatory in order to start / initialise the library and should be called in application:didFinishLaunchingWithOptions: + +#### See Also + +* SMManagerSetting + +#### Declared In +* `SMManager.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMManagerSetting.md b/Documentation/MobileSDK Reference/Classes/SMManagerSetting.md new file mode 100644 index 0000000..a1f2331 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMManagerSetting.md @@ -0,0 +1,253 @@ +# SMManagerSetting Class Reference + +**Inherits from** NSObject +**Declared in** SMManagerSetting.h + +## Overview + +

Note about the SMManagerSetting object :

+ +Creating an SMManagerSetting’s instance is pretty straightforward as there’s only one constructor for doing so. +This sole constructor is sufficent to get you started. + +Additional parameters described in this header will provide you with additional control and are all optional. + +

Being user-friendly :

+ +When the application is in foreground and receive a remote-notification, by default, the library will display it on the current visible UIViewController. This behaviour might be unwanted and may disturb the user if he appears to navigate in a different context. Should you want to prevent that behaviour and display the remote-notification shortly after (when the user will be in a more appropriate context), please follow these steps : + + + +At this point, remote-notification are NOT displayed when the application is in foreground. (Other application’s state are not affected). +Then, displaying the remote-notification is up to the application and can be done at any time by : + + + +Or, more straightforwardly : + + + +

IAM :

+ +In-Application-Message-service is configurable using SMManagerSettingIAM which you’ll inject using the API configureInAppMessageServiceWithSetting: +A dedicated topic regarding this topic can be found in SMManager(InAppMessage) + +

IAC :

+ +In-Application-Content-service is configurable using SMManagerSettingIAC which you’ll inject using the API configureInAppContentServiceWithSetting: +A dedicated topic regarding this topic can be found in SMManager(InAppContent) + +

SMManagerSetting :

+ +This class allow you to configure the SMManager. +Such instance must be created before starting the library. + +## Tasks + +### + +[  shouldClearBadge](#//api/name/shouldClearBadge) *property* + +[  shouldDisplayRemoteNotification](#//api/name/shouldDisplayRemoteNotification) *property* + +[  shouldAddInAppMessageFromPushToInAppMessageList](#//api/name/shouldAddInAppMessageFromPushToInAppMessageList) *property* + +[  clearCacheIntervalValue](#//api/name/clearCacheIntervalValue) *property* + +[  appGroupId](#//api/name/appGroupId) *property* + +[+ settingWithUrl:ClientID:PrivateKey:](#//api/name/settingWithUrl:ClientID:PrivateKey:) + +[– configureInAppMessageServiceWithSetting:](#//api/name/configureInAppMessageServiceWithSetting:) + +[– configureInAppContentServiceWithSetting:](#//api/name/configureInAppContentServiceWithSetting:) + +## Properties + + +### appGroupId + +This value provides to the sdk the app group id that you have previously defined in your apple developer portal. + +@property (nonatomic, strong) NSString *appGroupId + +#### Discussion +it is used to allow the sdk to share data between the main app and the notifications extensions (service and/or content) +The deviceid provided by selligent mobile platform is stored encrypted in this container + +#### Declared In +* `SMManagerSetting.h` + + +### clearCacheIntervalValue + +This value tells how often the SDK’s cache mechanism should clear itself. + +@property (nonatomic) SMClearCache clearCacheIntervalValue + +#### Discussion +Internally, each notification-messages has a life-span. +Clearing the cache stands for deleting notification-messages with an expired life-span. +In other words, only old notification-messages are deletesd from the cache. +More recent ones are kept in memory until their life-span expires and a new clearCache is called. +By default, this value is set to kSMClearCache_Auto. +Configuring this value highly depends of how frequently the application will query specific notification-messages. +As if the application query a notification-message which is not in the cache anymore, it will automaticaly fetch it from the backend. +In other words, it depends how often you call the API [SMManager(RemoteNotification) displayNotificationID:]. + +In a nutshell: + + + + +Warning: As soon as IAM-service is enabled, the SDK will consider kSMClearCache_Weekly as being the default value. Except if you explicitly overide the property. +In 99% of the cases, you should not overide this property as the SDK is smart enough to handle the cache mechanism by itself. +Keep also in mind that this behavior is only applicable for notification and IAM that doesn’t have a n expiration date set + +#### Declared In +* `SMManagerSetting.h` + + +### shouldAddInAppMessageFromPushToInAppMessageList + +Used to add the inapp message associated to a remote notification to the inapp message list + +@property (nonatomic) BOOL shouldAddInAppMessageFromPushToInAppMessageList + +#### Discussion +Once a new remote-notification is received, if it contains in the payload datas for an inapp message, this setting will add the inapp message to the in app messages list . You will need to listen to kSMNotification_Event_DidReceiveInAppMessage NSNotification to be informed that an inapp message is available and you can then retrieve it with [SMManager(InAppMessages) getInAppMessages] helper method and use in an inbox for example +by default the in app message will be displayed if you wish to display it by yourself you will need to provide a class by calling [SMManager(InAppMessage) inAppMessageDelegate:] . This class will conform to SMManagerInAppMessageDelegate protocol and implement [SMManagerInAppMessageDelegate displayInAppMessage:] method +Default value is set to FALSE + +#### Declared In +* `SMManagerSetting.h` + + +### shouldClearBadge + +Once a new remote-notification is displayed, the badge is automaticly reseted. +Should you want to handle this property yourself, you can set this property to FALSE before starting the library +Default value is set to TRUE + +@property (nonatomic) BOOL shouldClearBadge + +#### Declared In +* `SMManagerSetting.h` + + +### shouldDisplayRemoteNotification + +Used to configure the remote-notification-display + +@property (nonatomic) BOOL shouldDisplayRemoteNotification + +#### Discussion +When the app is active, once a new remote-notification is received, it is automatically diplayed on the device +Should you want to prevent that behaviour, you can set this property to FALSE before starting the library. +Default value is set to TRUE. + +Warning: This property does not have an impact when app is open from a notification selected by user in the notification center or when [SMManager(RemoteNotification) displayNotificationID:] or [SMManager(RemoteNotification) displayLastReceivedRemotePushNotification] are called. +Once you set this value to TRUE, the application becomes responsable about displaying the remote-notification. (Make sure to read the header file of SMManagerSetting before doing so). + +#### Declared In +* `SMManagerSetting.h` + + +## Class Methods + + +### settingWithUrl:ClientID:PrivateKey: + +Default-mandatory constructor to start the SMManager shared-instance + ++ (instancetype)settingWithUrl:(NSString *)*urlName* ClientID:(NSString *)*clientID* PrivateKey:(NSString *)*privateKey* + +#### Parameters + +*urlName* +   NSString instance representing the urlname of your backend. + +*clientID* +   NSString instance referencing the client’s ID + +*privateKey* +   NSString instance containing a valid private-key used to secure requests + +#### Return Value +SMManagerSetting new instance. SMFailure in case of error + +#### Discussion + + +Warning: All these parameters are mandatory. +If any of them is nil, the library won’t start. +Please contact our support to get valid configuration-setting. + +#### Declared In +* `SMManagerSetting.h` + + +## Instance Methods + + +### configureInAppContentServiceWithSetting: + +An invalid or nil setting is considered as an error and will not startUp the IAC-service. +Don’t forget to enable In App content according to application need by calling [SMManager(InAppContent) enableInAppContent:] + +- (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC *)*settingIAC* + +#### Parameters + +*settingIAC* +   The SMManagerSettingIAC instance containing the IAC desired configuration. + +#### Discussion +This call is optional. It is not needed to successfully start the SDK. +However, it is required to enable In-Application-Content. +Please read SMManager(InAppContent) for additional information. + +Warning: An invalid or nil setting is considered as an error and will not startUp the IAC-service. +Don’t forget to enable In App content according to application need by calling [SMManager(InAppContent) enableInAppContent:] + +#### Declared In +* `SMManagerSetting.h` + + +### configureInAppMessageServiceWithSetting: + +An invalid or nil setting is considered as an error and will not startUp the IAM-service. +Don’t forget to enable In App message according to application need by calling [SMManager(InAppMessage) enableInAppMessage:] + +- (void)configureInAppMessageServiceWithSetting:(SMManagerSettingIAM *)*settingIAM* + +#### Parameters + +*settingIAM* +   The SMManagerSettingIAM instance containing the IAM desired configuration. + +#### Discussion +This call is optional. It is not needed to successfully start the SDK. +However, it is required to enable In-Application-Message. +Please read SMManager(InAppMessage) for additional information. + +Warning: An invalid or nil setting is considered as an error and will not startUp the IAM-service. +Don’t forget to enable In App message according to application need by calling [SMManager(InAppMessage) enableInAppMessage:] + +#### Declared In +* `SMManagerSetting.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAC.md b/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAC.md new file mode 100644 index 0000000..6692bc2 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAC.md @@ -0,0 +1,81 @@ +# SMManagerSettingIAC Class Reference + +**Inherits from** NSObject +**Declared in** SMManagerSettingIAC.h + +## Overview + +This class allow you to configure the In-App-Content service. +Such instance must be created before starting the library. + +## Tasks + +### + +[+ settingWithBackgroundFetchOnly](#//api/name/settingWithBackgroundFetchOnly) + +[+ settingWithRefreshType:](#//api/name/settingWithRefreshType:) + +[+ settingWithRefreshType:ShouldPerformBackgroundFetch:](#//api/name/settingWithRefreshType:ShouldPerformBackgroundFetch:) + + +## Class Methods + + +### settingWithBackgroundFetchOnly + +Constructor to be used in order to create the SMManagerSettingIAC instance + ++ (instancetype)settingWithBackgroundFetchOnly + +#### Discussion +use this constructor to enable background-mode only. +The OS will refresh automaticly the IAC based on how often the user interacts with the application + +Warning: If background-fetch is not enabled in Application’s Capabilities, the IAC-service will not start. +See SMManager(InAppContent) for additional information. + +#### Declared In +* `SMManagerSettingIAC.h` + + +### settingWithRefreshType: + +Constructor to be used in order to create the SMManagerSettingIAC instance + ++ (instancetype)settingWithRefreshType:(SMInAppRefreshType)*refreshType* + +#### Parameters + +*refreshType* +   The type of refresh to consider when the application is in foreground + +#### Discussion +Use this constructor should you want to perform periodic refresh when the application is in foreground-state only. +For enabling backgroundState, use settingWithRefreshType:ShouldPerformBackgroundFetch: instead + +#### Declared In +* `SMManagerSettingIAC.h` + + +### settingWithRefreshType:ShouldPerformBackgroundFetch: + +Constructor to be used in order to create the SMManagerSettingIAC instance + ++ (instancetype)settingWithRefreshType:(SMInAppRefreshType)*refreshType* ShouldPerformBackgroundFetch:(BOOL)*shouldPerformBackgroundFetch* + +#### Parameters + +*refreshType* +   The type of refresh to consider when the application is in foreground + +*shouldPerformBackgroundFetch* +   If set to TRUE, it will activate UIApplication-BackGround-Fetch-mode automaticly + +#### Discussion +This constructor provides you with more control on foreground / background fetch. +Should you want to restrict to only one fetch-mode, feel free to use other constructors. + +#### Declared In +* `SMManagerSettingIAC.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAM.md b/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAM.md new file mode 100644 index 0000000..0c1a98e --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMManagerSettingIAM.md @@ -0,0 +1,81 @@ +# SMManagerSettingIAM Class Reference + +**Inherits from** NSObject +**Declared in** SMManagerSettingIAM.h + +## Overview + +This class allow you to configure the In-App-Message service. +Such instance must be created before starting the library. + +## Tasks + +### + +[+ settingWithBackgroundFetchOnly](#//api/name/settingWithBackgroundFetchOnly) + +[+ settingWithRefreshType:](#//api/name/settingWithRefreshType:) + +[+ settingWithRefreshType:ShouldPerformBackgroundFetch:](#//api/name/settingWithRefreshType:ShouldPerformBackgroundFetch:) + + +## Class Methods + + +### settingWithBackgroundFetchOnly + +Constructor to be used in order to create the SMManagerSettingIAM instance + ++ (instancetype)settingWithBackgroundFetchOnly + +#### Discussion +use this constructor to enable background-mode only. +The OS will refresh automaticly the IAM based on how often the user interacts with the application + +Warning: If background-fetch is not enabled in Application’s Capabilities, the IAM-service will not start. +See SMManager(InAppMessage) for additional information. + +#### Declared In +* `SMManagerSettingIAM.h` + + +### settingWithRefreshType: + +Constructor to be used in order to create the SMManagerSettingIAM instance + ++ (instancetype)settingWithRefreshType:(SMInAppRefreshType)*refreshType* + +#### Parameters + +*refreshType* +   The type of refresh to consider when the application is in foreground + +#### Discussion +Use this constructor should you want to perform periodic refresh when the application is in foreground-state only. +For enabling backgroundState, use settingWithRefreshType:ShouldPerformBackgroundFetch: instead + +#### Declared In +* `SMManagerSettingIAM.h` + + +### settingWithRefreshType:ShouldPerformBackgroundFetch: + +Constructor to be used in order to create the SMManagerSettingIAM instance + ++ (instancetype)settingWithRefreshType:(SMInAppRefreshType)*refreshType* ShouldPerformBackgroundFetch:(BOOL)*shouldPerformBackgroundFetch* + +#### Parameters + +*refreshType* +   The type of refresh to consider when the application is in foreground + +*shouldPerformBackgroundFetch* +   If set to TRUE, it will activate UIApplication-BackGround-Fetch-mode automaticly + +#### Discussion +This constructor provides you with more control on foreground / background fetch. +Should you want to restrict to only one fetch-mode, feel free to use other constructors. + +#### Declared In +* `SMManagerSettingIAM.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMMessage.md b/Documentation/MobileSDK Reference/Classes/SMMessage.md new file mode 100644 index 0000000..867d966 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMMessage.md @@ -0,0 +1,27 @@ +# SMMessage Class Reference + +**Inherits from** NSObject +**Declared in** SMMessage.h + +## Overview + +This Class is provided as a root Class and should not be used. + +## Tasks + +### + +[  messageSM](#//api/name/messageSM) *property* + +## Properties + + +### messageSM + +NSString instance providing a brief description of the message + +@property (nonatomic, strong) NSString *messageSM + +#### Declared In +* `SMMessage.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMNotificationAnnotationData.md b/Documentation/MobileSDK Reference/Classes/SMNotificationAnnotationData.md new file mode 100644 index 0000000..f951b70 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMNotificationAnnotationData.md @@ -0,0 +1,63 @@ +# SMNotificationAnnotationData Class Reference + +**Inherits from** NSObject +**Declared in** SMNotificationAnnotationData.h + +## Overview + +

SMNotificationAnnotationData :

+ +## Tasks + +### + +[  titleAnnotation](#//api/name/titleAnnotation) *property* + +[  descriptionAnnotation](#//api/name/descriptionAnnotation) *property* + +[  latitude](#//api/name/latitude) *property* + +[  longitude](#//api/name/longitude) *property* + +## Properties + + +### descriptionAnnotation + +NSString instance providing the description of the annotation + +@property (nonatomic, strong) NSString *descriptionAnnotation + +#### Declared In +* `SMNotificationAnnotationData.h` + + +### latitude + +NSString instance providing the latitude of the annotation + +@property (nonatomic) float latitude + +#### Declared In +* `SMNotificationAnnotationData.h` + + +### longitude + +NSString instance providing the longitude of the message + +@property (nonatomic) float longitude + +#### Declared In +* `SMNotificationAnnotationData.h` + + +### titleAnnotation + +NSString instance providing the title of the annotation + +@property (nonatomic, strong) NSString *titleAnnotation + +#### Declared In +* `SMNotificationAnnotationData.h` + diff --git a/Documentation/MobileSDK Reference/Classes/SMNotificationButtonData.md b/Documentation/MobileSDK Reference/Classes/SMNotificationButtonData.md new file mode 100644 index 0000000..5efddbc --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMNotificationButtonData.md @@ -0,0 +1,12 @@ +# SMNotificationButtonData Class Reference + +**Inherits from** SMLink : +NSObject +**Declared in** SMNotificationButtonData.h + +## Overview + +This class is used to wrap informations about a notification button. + +Additional information provided in SMManager + diff --git a/Documentation/MobileSDK Reference/Classes/SMSuccess.md b/Documentation/MobileSDK Reference/Classes/SMSuccess.md new file mode 100644 index 0000000..87937a2 --- /dev/null +++ b/Documentation/MobileSDK Reference/Classes/SMSuccess.md @@ -0,0 +1,12 @@ +# SMSuccess Class Reference + +**Inherits from** SMMessage : +NSObject +**Declared in** SMSuccess.h + +## Overview + +This class is used to return a successfull action + +

SMSuccess:

+ diff --git a/Documentation/MobileSDK Reference/Constants/SMClearCache.md b/Documentation/MobileSDK Reference/Constants/SMClearCache.md new file mode 100644 index 0000000..8b1d239 --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMClearCache.md @@ -0,0 +1,47 @@ +# SMClearCache Constants Reference + +**Declared in** SMClearCache.h + +### SMClearCache + +Enumeration used to define how often the SDK’s cache should automaticaly clear itself + +

SMClearCache :

+ +#### Definition + typedef NS_ENUM(NSInteger, SMClearCache ) { + + kSMClearCache_Auto, + + kSMClearCache_None, + + kSMClearCache_Week, + + kSMClearCache_Month, + + kSMClearCache_Quarter, + + }; + +#### Constants + +kSMClearCache_Auto + +This is the default value. + +kSMClearCache_None + +This explicitely disable the SDK-cache mechanism + +kSMClearCache_Week + +Clear the cache weekly + +kSMClearCache_Month + +Clear the cache each month + +kSMClearCache_Quarter + +Clear the cache every three months + diff --git a/Documentation/MobileSDK Reference/Constants/SMContentAlignment.md b/Documentation/MobileSDK Reference/Constants/SMContentAlignment.md new file mode 100644 index 0000000..29c9f31 --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMContentAlignment.md @@ -0,0 +1,33 @@ +# SMContentAlignment Constants Reference + +**Declared in** SMContentAlignment.h + +### SMContentAlignment + +

SMContentAlignment :

+ +#### Definition + typedef NS_ENUM(NSInteger, SMContentAlignment ) { + + kSMAlignLeft, + + kSMAlignRight, + + kSMAlignCenter, + + }; + +#### Constants + +kSMAlignLeft + +The content will be left-aligned. + +kSMAlignRight + +The content will be right-aligned. + +kSMAlignCenter + +The content will be centered. + diff --git a/Documentation/MobileSDK Reference/Constants/SMDisplayMode.md b/Documentation/MobileSDK Reference/Constants/SMDisplayMode.md new file mode 100644 index 0000000..ad87d67 --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMDisplayMode.md @@ -0,0 +1,33 @@ +# SMDisplayMode Constants Reference + +**Declared in** SMDisplayMode.h + +### SMDisplayMode + +

SMDisplayMode :

+ +#### Definition + typedef NS_ENUM(NSInteger, SMDisplayMode ) { + + kSMDisplayMode_Unknown = -1, + + kSMDisplayMode_OnlyOnce = 0, + + kSMDisplayMode_UntilReplaced = 1, + + }; + +#### Constants + +kSMDisplayMode_Unknown + +This explicitely sets the displayMode to unknown + +kSMDisplayMode_OnlyOnce + +Display only once + +kSMDisplayMode_UntilReplaced + +Always display until replaced + diff --git a/Documentation/MobileSDK Reference/Constants/SMInAppContentType.md b/Documentation/MobileSDK Reference/Constants/SMInAppContentType.md new file mode 100644 index 0000000..b9aae6a --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMInAppContentType.md @@ -0,0 +1,39 @@ +# SMInAppContentType Constants Reference + +**Declared in** SMInAppContentType.h + +### SMInAppContentType + +

SMInAppContentType :

+ +#### Definition + typedef NS_OPTIONS(NSInteger, SMInAppContentType ) { + + kSMInAppContentType_Unknown = -2, + + kSMInAppContentType_HTML = 1, + + kSMInAppContentType_Url = 2, + + kSMInAppContentType_Image = 3, + + }; + +#### Constants + +kSMInAppContentType_Unknown + +In App content of unknown type. + +kSMInAppContentType_HTML + +In App content of HTML type. + +kSMInAppContentType_Url + +In App content of URL type. + +kSMInAppContentType_Image + +In App content of Image type. + diff --git a/Documentation/MobileSDK Reference/Constants/SMInAppMessageType.md b/Documentation/MobileSDK Reference/Constants/SMInAppMessageType.md new file mode 100644 index 0000000..db19c5f --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMInAppMessageType.md @@ -0,0 +1,63 @@ +# SMInAppMessageType Constants Reference + +**Declared in** SMInAppMessageType.h + +### SMInAppMessageType + +

SMInAppMessageType :

+ +#### Definition + typedef NS_ENUM(NSInteger, SMInAppMessageType ) { + + kSMInAppMessageType_Unknown = -2, + + kSMInAppMessageType_Hidden = -1, + + kSMInAppMessageType_Alert = 0, + + kSMInAppMessageType_HTML = 1, + + kSMInAppMessageType_Url = 2, + + kSMInAppMessageType_Image = 3, + + kSMInAppMessageType_Map = 4, + + kSMInAppMessageType_Passbook = 5, + + }; + +#### Constants + +kSMInAppMessageType_Unknown + +In App message of unknown type. + +kSMInAppMessageType_Hidden + +In App message of hidden type. + +kSMInAppMessageType_Alert + +In App message of alert type. + +kSMInAppMessageType_HTML + +In App message of.md type. + +kSMInAppMessageType_Url + +In App message of url type. + +kSMInAppMessageType_Image + +In App message of image type. + +kSMInAppMessageType_Map + +In App message of map type. + +kSMInAppMessageType_Passbook + +In App message of passbook type. + diff --git a/Documentation/MobileSDK Reference/Constants/SMInAppRefreshType.md b/Documentation/MobileSDK Reference/Constants/SMInAppRefreshType.md new file mode 100644 index 0000000..07b556c --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMInAppRefreshType.md @@ -0,0 +1,39 @@ +# SMInAppRefreshType Constants Reference + +**Declared in** SMInAppRefreshType.h + +### SMInAppRefreshType + +

SMInAppRefreshType :

+ +#### Definition + typedef NS_ENUM(NSInteger, SMInAppRefreshType ) { + + kSMIA_RefreshType_None, + + kSMIA_RefreshType_Minutely, + + kSMIA_RefreshType_Hourly, + + kSMIA_RefreshType_Daily, + + }; + +#### Constants + +kSMIA_RefreshType_None + +This explicitely disable the In App fetch mecahnism + +kSMIA_RefreshType_Minutely + +Allow to fetch In App Minutely (to be used only in development) + +kSMIA_RefreshType_Hourly + +Allow to fetch In App hourly + +kSMIA_RefreshType_Daily + +Allow to fetch In App Daily + diff --git a/Documentation/MobileSDK Reference/Constants/SMLogLevel.md b/Documentation/MobileSDK Reference/Constants/SMLogLevel.md new file mode 100644 index 0000000..4b7e0af --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMLogLevel.md @@ -0,0 +1,59 @@ +# SMLogLevel Constants Reference + +**Declared in** SMLog.h + +### SMLogLevel + +Enumeration type for the log granularity + +#### Definition + typedef NS_OPTIONS(NSInteger, SMLogLevel ) { + + kSMLogLevel_None = 0, + + kSMLogLevel_Info = 1 < < 1, + + kSMLogLevel_Warning = 1 < < 2, + + kSMLogLevel_Error = 1 < < 3, + + kSMLogLevel_HTTPCall = 1 < < 4, + + kSMLogLevel_Location = 1 < < 5, + + kSMLogLevel_All = 0 xFF, + + }; + +#### Constants + +kSMLogLevel_None + +No log printed at all. +This is the suggested log-level for release. + +kSMLogLevel_Info + +Default log-entry. +Basically inform user when library starts / ends. + +kSMLogLevel_Warning + +Only warning messages are printed + +kSMLogLevel_Error + +Only Error messages are being printed + +kSMLogLevel_HTTPCall + +Print only HTTP-requests stuff + +kSMLogLevel_Location + +Print only location-requests stuff + +kSMLogLevel_All + +Print everything. Do not use for release!!! + diff --git a/Documentation/MobileSDK Reference/Constants/SMNSNotification.md b/Documentation/MobileSDK Reference/Constants/SMNSNotification.md new file mode 100644 index 0000000..dd8c6aa --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMNSNotification.md @@ -0,0 +1,63 @@ +# SMNSNotification Constants Reference + +**Declared in** SMNSNotification.h + +### SMNSNotification + +This file gathers all kSMNotification values used as NSNotification-names and NSNotification data keys + +#### Constants + + +kSMNotification_Event_ButtonClicked + +An NSNotification with this name is broadcasted when the user interacts with a remote-notification. +Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. + + +kSMNotification_Event_WillDisplayNotification + +An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification. +Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification). + + +kSMNotification_Event_DidReceiveRemoteNotification + +An NSNotification with this name is broadcasted shortly after receiving a remote-notification. +Primary-application may use this notification to decide when to display any remote-notification + + +kSMNotification_Event_DidReceiveInAppMessage + +An NSNotification with this name is broadcasted shortly after receiving InApp messages. +Primary-application may use this notification to manage the received InApp messages. + + +kSMNotification_Event_DidReceiveInAppContent + +An NSNotification with this name is broadcasted shortly after receiving device id from mobile platform. +Primary-application may use this notification to manage the received device id. + + +kSMNotification_Data_ButtonData + +NSString representing a key to retrieve an object inside NSNotification. +Use the key kSMNotification_Data_RemoteNotification to retrieve an NSDictionary instance with push ID and name. + + +kSMNotification_Data_InAppMessage + +NSString representing a key to retrieve an object inside NSNotification. +Use the key kSMNotification_Data_InAppMessage to retrieve an NSDictionary instance with an array of SMNotificationMessage. + + +kSMNotification_Data_InAppContent + +NSString representing a key to retrieve an object inside NSNotification. +Use the key kSMNotification_Data_InAppContent to retrieve an NSDictionary instance with an array of in app contents categories as key and number of in app contents for the category as value. + + +kSMNotification_Data_DeviceId + +NSString representing a key to retrieve a string inside NSNotification. +Use the key kSMNotification_Data_DeviceId to retrieve an NString instance with device id value. diff --git a/Documentation/MobileSDK Reference/Constants/SMNotificationButtonType.md b/Documentation/MobileSDK Reference/Constants/SMNotificationButtonType.md new file mode 100644 index 0000000..4d1607c --- /dev/null +++ b/Documentation/MobileSDK Reference/Constants/SMNotificationButtonType.md @@ -0,0 +1,107 @@ +# SMNotificationButtonType Constants Reference + +**Declared in** SMNotificationButtonType.h + +### SMNotificationButtonType + +This enumeration declares all known button-type + +#### Definition + typedef NS_ENUM(NSInteger, SMNotificationButtonType ) { + + kSMNotificationButtonType_Unknown = -1, + + kSMNotificationButtonType_Simple = 0, + + kSMNotificationButtonType_OpenPhoneCall = 1, + + kSMNotificationButtonType_OpenSms = 2, + + kSMNotificationButtonType_OpenMail = 3, + + kSMNotificationButtonType_OpenBrowser = 4, + + kSMNotificationButtonType_OpenApplication = 5, + + kSMNotificationButtonType_RateApplication = 6, + + kSMNotificationButtonType_CustomActionBroadcastEvent = 7, + + kSMNotificationButtonType_Return_Text = 8, + + kSMNotificationButtonType_Return_Photo = 9, + + kSMNotificationButtonType_Return_TextAndPhoto = 10, + + kSMNotificationButtonType_Passbook = 11, + + kSMNotificationButtonType_DeepLink = 13, + + }; + +#### Constants + +kSMNotificationButtonType_Unknown + +Any received button-type not in this enumeration type will be considered as unknown + +kSMNotificationButtonType_Simple + +A button-type that will have no action but when clicked will send back button value to the platform + +kSMNotificationButtonType_OpenPhoneCall + +A button-type that will open the Phone application with a ready to use number to dial + +kSMNotificationButtonType_OpenSms + +A button-type that will open the sms application with a ready to dial sms + +kSMNotificationButtonType_OpenMail + +A button-type that will open the mail application + +kSMNotificationButtonType_OpenBrowser + +Button that will open a ready to use safari-browser + +kSMNotificationButtonType_OpenApplication + +Button that will open a third party application + +kSMNotificationButtonType_RateApplication + +Button-type which will allow application rating. +This will behave similarly to kSMNotificationButtonType_OpenApplication +In Android terminology, this notion is called “Store” + +kSMNotificationButtonType_CustomActionBroadcastEvent + +Button that will trigger a notification (broadcast in Android terminology) inside the application for any interested listener. +You may register in your application to a specific event from NSNotificationCenter. The notification is broadcasted as soon as the push is received. +Your back-end team should inform you about the notification-name. +No parameters are currently supported. + +kSMNotificationButtonType_Return_Text + +Button-type which will allow user to provide back a media-type as answer +Media-type of kind Text + +kSMNotificationButtonType_Return_Photo + +Button-type which will allow user to provide back a media-type as answer +Media-type of kind Picture + +kSMNotificationButtonType_Return_TextAndPhoto + +Button-type which will allow user to provide back a media-type as answer +Media-type of kind Text + Picture + +kSMNotificationButtonType_Passbook + +Button-type which will allow user to add pkpass file inside wallet app + +kSMNotificationButtonType_DeepLink + +Button-type which will allow user depplink inside specific page in the app + diff --git a/Documentation/MobileSDK Reference/Protocols/SMManagerInAppMessageDelegate.md b/Documentation/MobileSDK Reference/Protocols/SMManagerInAppMessageDelegate.md new file mode 100644 index 0000000..50c2f4a --- /dev/null +++ b/Documentation/MobileSDK Reference/Protocols/SMManagerInAppMessageDelegate.md @@ -0,0 +1,35 @@ +# SMManagerInAppMessageDelegate Protocol Reference + +**Conforms to** NSObject +**Declared in** SMManagerInAppMessageDelegate.h + +## Overview + +This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later. + +

SMManagerInAppMessageDelegate :

+ +## Tasks + +### + +[– displayInAppMessage:](#//api/name/displayInAppMessage:) + + +## Instance Methods + + +### displayInAppMessage: + +Invoked when an inapp message linked to a remote notification is received by sdk. + +- (void)displayInAppMessage:(SMInAppMessage *)*inAppMessage* + +#### Parameters + +*inAppMessage* +   The inAppMessage object containing all necessary datas for you to display content of the message + +#### Declared In +* `SMManagerInAppMessageDelegate.h` + diff --git a/Documentation/MobileSDK Reference/README.md b/Documentation/MobileSDK Reference/README.md new file mode 100644 index 0000000..52d71fb --- /dev/null +++ b/Documentation/MobileSDK Reference/README.md @@ -0,0 +1,54 @@ +# MobileSDK Reference +## Category References +* [SMManager(DataTransaction)](Categories/SMManager+DataTransaction.md) +* [SMManager(InAppContent)](Categories/SMManager+InAppContent.md) +* [SMManager(InAppMessage)](Categories/SMManager+InAppMessage.md) +* [SMManager(Location)](Categories/SMManager+Location.md) +* [SMManager(Log)](Categories/SMManager+Log.md) +* [SMManager(RemoteNotification)](Categories/SMManager+RemoteNotification.md) +* [SMManager(SMEvent)](Categories/SMManager+SMEvent.md) +* [SMManager(SilentPush)](Categories/SMManager+SilentPush.md) +* [SMManager(StyleOptions)](Categories/SMManager+StyleOptions.md) +* [SMManager(UserNotification)](Categories/SMManager+UserNotification.md) +* [SMManagerSetting(Location)](Categories/SMManagerSetting+Location.md) + +## Constant References +* [SMClearCache](Constants/SMClearCache.md) +* [SMContentAlignment](Constants/SMContentAlignment.md) +* [SMDisplayMode](Constants/SMDisplayMode.md) +* [SMInAppContentType](Constants/SMInAppContentType.md) +* [SMInAppMessageType](Constants/SMInAppMessageType.md) +* [SMInAppRefreshType](Constants/SMInAppRefreshType.md) +* [SMLogLevel](Constants/SMLogLevel.md) +* [SMNotificationButtonType](Constants/SMNotificationButtonType.md) +* [SMNSNotification](Constants/SMNSNotification.md) + +## Class References +* [SMBaseMessage](Classes/SMBaseMessage.md) +* [SMDeviceInfos](Classes/SMDeviceInfos.md) +* [SMEvent](Classes/SMEvent.md) +* [SMEventUser](Classes/SMEventUser.md) +* [SMEventUserLogin](Classes/SMEventUserLogin.md) +* [SMEventUserLogout](Classes/SMEventUserLogout.md) +* [SMEventUserRegistration](Classes/SMEventUserRegistration.md) +* [SMEventUserUnregistration](Classes/SMEventUserUnregistration.md) +* [SMFailure](Classes/SMFailure.md) +* [SMInAppContentHTMLViewController](Classes/SMInAppContentHTMLViewController.md) +* [SMInAppContentImageViewController](Classes/SMInAppContentImageViewController.md) +* [SMInAppContentMessage](Classes/SMInAppContentMessage.md) +* [SMInAppContentStyleOptions](Classes/SMInAppContentStyleOptions.md) +* [SMInAppContentURLViewController](Classes/SMInAppContentURLViewController.md) +* [SMInAppContentViewController](Classes/SMInAppContentViewController.md) +* [SMInAppMessage](Classes/SMInAppMessage.md) +* [SMLink](Classes/SMLink.md) +* [SMManager](Classes/SMManager.md) +* [SMManagerSetting](Classes/SMManagerSetting.md) +* [SMManagerSettingIAC](Classes/SMManagerSettingIAC.md) +* [SMManagerSettingIAM](Classes/SMManagerSettingIAM.md) +* [SMMessage](Classes/SMMessage.md) +* [SMNotificationAnnotationData](Classes/SMNotificationAnnotationData.md) +* [SMNotificationButtonData](Classes/SMNotificationButtonData.md) +* [SMSuccess](Classes/SMSuccess.md) + +## Protocol References +* [SMManagerInAppMessageDelegate](Protocols/SMManagerInAppMessageDelegate.md) diff --git a/Documentation/README.md b/Documentation/README.md new file mode 100644 index 0000000..62b23b5 --- /dev/null +++ b/Documentation/README.md @@ -0,0 +1,1788 @@ +# iOS – Using the SDK + +## Foreword + +Copyright + +The contents of this manual cover material copyrighted by Selligent. Selligent reserves all intellectual property rights on the manual, which should be treated as confidential information as defined under the agreed upon software licence/lease terms and conditions. + +The use and distribution of this manual is strictly limited to authorised users of the Selligent Interactive Marketing Software (hereafter the "Software") and can only be used for the purpose of using the Software under the agreed upon software licence/lease terms and conditions. Upon termination of the right to use the Software, this manual and any copies made must either be returned to Selligent or be destroyed, at the latest two weeks after the right to use the Software has ended. + +With the exception of the first sentence of the previous paragraph, no part of this manual may be reprinted or reproduced or distributed or utilised in any form or by any electronic, mechanical or other means, not known or hereafter invented, included photocopying and recording, or in any information storage or retrieval or distribution system, without the prior permission in writing from Selligent. + +Selligent will not be responsible or liable for any accidental or inevitable damage that may result from unauthorised access or modifications. + +User is aware that this manual may contain errors or inaccuracies and that it may be revised without advance notice. This manual is updated frequently. + +Selligent welcomes any recommendations or suggestions regarding the manual, as it helps to continuously improve the quality of our products and manuals. + + +## Table of Contents + +* [**Foreword**](#foreword) +* [**Table of contents**](#contents) +* [**Intro**](#intro) +* [**Create an APNS Key**](#apns_key) + * [**Enable Push Notifications**](#enable_push_notifications) + * [**Create a Key**](#create_key) +* [**Include the SDK in your target**](#include_sdk) + * [**Import the library**](#import_library) + * [**Install the SDK as a framework**](#install_sdk) + * [**Note for Swift projects**](#note_for_swift) + * [**Add entries to your app .plist file**](#plist_entries) + * [**Deep Linking**](#deep_linking) + * [**Permission for geolocation**](#geolocation_permission) + * [**External framework**](#external_framework) +* [**Starting the SDK**](#starting_sdk) + * [**Push Notifications**](#push_notifications) + * [**Register for Push Notifications**](#register_for_push) + * [**Provide the Device token to the SDK**](#provide_device_token) + * [**Provide Push Notifications status to the SDK**](#provide_information_sdk) + * [**Disable Selligent Push Notifications**](#disable_selligent_push) + * [**Listening and displaying the Push Notifications**](#displaying_push) + * [**Helper methods**](#notification_helper_methods) + * [**Broadcasts**](#push_broadcasts) +* [**InApp Messages**](#inapp_messages) + * [**Enable IAM**](#enable_iam) + * [**Display IAM**](#display_iam) + * [**Implement WKNavigationDelegate**](#wknavigationdelegate) + * [**Display IAM linked to a Push Notification**](#display_iam_from_push) + * [**Broadcasts**](#iam_broadcasts) +* [**Geolocation**](#geolocation) +* [**Events**](#events) + * [**Registration / Unregistration**](#events_register_unregister) + * [**Login/Logout**](#events_login_logout) + * [**Custom**](#events_custom) +* [**Broadcasts summary**](#broadcasts_summary) + * [**Event broadcasts**](#event_broadcasts) + * [**Data broadcasts**](#data_broadcasts) + * [**Examples**](#broadcasts_examples) +* [**Miscellaneous**](#miscellaneous) + * [**Reload**](#reload) + * [**LogLevel**](#loglevel) + * [**Retrieve Device ID**](#deviceId) +* [**Notification Extensions**](#notification_extensions) + * [**General set up**](#extensions_setup) + * [**Notification Service Extension**](#service_extension) + * [**Notification Content Extension**](#content_extension) + + +## Intro +The purpose of this document is to detail how to install the SDK into your App and how to easily start using it. +* For more detailed technical reference of the SDK please refer to **iOS - MobileSDK Reference**. +* For an example of implementation check the **iOSSDKTemplate** project. + +>**Important Remark:** Core version of the SDK is fully compliant to AppTrackingTransparency framework (starting from iOS and iPadOS 14.5) as we never +>make any usage of [data used to track the device](https://developer.apple.com/app-store/app-privacy-details/) (except if you are using the geolocation +>version of the SDK). The device ID is for example a generated ID provided by the Selligent platform to the SDK at launch time.
+>About the PlotProjects Geolocation version of the SDK please refer to [PlotProjects FAQs](https://www.plotprojects.com/faqs/) for more information. + + +## Create an APNS Key + +### Enable Push Notifications +To enable Push Notifications, go to the [Apple Developer Portal](https://developer.apple.com/) and login to your account. + +
+ + When logged in, go to the Certificates, Identifiers & Profiles section to manage the certificates.
+ + ![](images/Picture1.png) +
+ +
+ In the Certificates, Identifiers & Profiles page go to Identifiers.
+ + ![](images/Picture2.png) +
+ +
+ In the list of your App IDs select the App that you want to edit.
+ + ![](images/Picture3.png) +
+ +
+ In the list of capabilities enable Push Notifications.
+ + ![](images/Picture4.png) +
+ +
+ In this screen you can also note the Bundle ID and Team ID associated to your App as you will need to provide them to Selligent.
+ + ![](images/Picture5.png) +
+ + +### Create a Key +
+ Back to the Certificates, Identifiers & Profiles page go to Keys and click on the + button to add a new Key.
+ + ![](images/Picture7.png) +
+ +
+ Give a name to your Key, enable Apple Push Notifications service (APNS) and click on "continue" and then "register" in the next screen.
+ + ![](images/Picture8.png) + ![](images/Picture9.png) +
+ +
+ In the next screen, carefully read the warning, note down the Key ID and download it (you can only download the Key once!).
+ + ![](images/Picture11.png) +
+ +To use Selligent Push services you will need to provide to us: +- the downloaded **.p8** file +- the **Key ID** +- your **Team ID** +- the **Bundle ID** of the App + + +## Include the SDK in your target + +### Import the library +
+ Right click (CTRL + Left click) on your App target and select "Add Files to YOURTARGET".
+ + ![](images/Picture12.png) +
+ +
+ Select the lib folder (the main folder containing the header and the lib files). Depending on your project, check the option "Copy items if needed" and select the "Create groups" option.
+ + ![](images/Picture13.png) +
+ +
+ Make sure the library has been added to your target and that its status is "Required".
+ + ![](images/Picture14.png) +
+ +
+ Then, go to the "Build Settings" of your App target, search for "Other Linker Flags" property and set the value to "–ObjC".
+ + ![](images/Picture15.png) +
+ +> For Objective-C Apps, import `SMHelper.h` where needed, for Swift Apps refer to [Note for Swift projects](#note_for_swift) + + +### Install the SDK as a framework +Since version 2.6, the SDK is also available on github as a **.xcframework**. + +You can either install it via cocoapod ([learn more](../README.md)) or as a stand alone by downloading and dropping the .xcframework package into your project (don't forget to add it into the App and the Notification Extensions where you will use the framework). + +To use it, you will need to import the following where needed: + +**Swift** +```swift +import SelligentMobileSDK +``` + +**Objective-C** +```objective-c +#import ; +// Or +@import SelligentMobileSDK; +``` + + +### Note for Swift projects +For a Swift App, you need to create a **Bridging-Header** file. +> Unless you are using the framework, in which case you can import it as a module (as shown above). + +To create it automatically, add an Objective-C file to your Swift App and Xcode will offer you the possibility to create this header file. + +
+ If you accept, Xcode creates the header file along with the file you were creating, and names it by your product module name followed by "-Bridging-Header.h".
+ + ![](images/Picture16.png) +
+ +You can also create it manually by adding a header file to your project, named `[MyProjectName]-Bridging-Header.h`. In your project build settings, find `Swift Compiler – Code Generation`, and next to `Objective-C Bridging Header` add the path to your bridging header file from the project's root folder. So, it could be `MyProject/MyProject-Bridging-Header.h` or simply `MyProject-Bridging-Header.h` if the file is in the project root folder. + +In both cases, you will need to import a header file to expose the SDK APIs to Swift. Do it by adding this line: + +```objective-c +// Static Library +#import "SMHelper.h"; + +// Framework +#import ; +``` + +More information about this configuration in [Apple documentation](https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html). + + +### Add entries to your App .plist file + +### Deep Linking +You should configure correctly the **plist** of your App to allow this to work, by registering a custom URL scheme: +```xml +CFBundleURLTypes + + + CFBundleURLName + yourappbundle + CFBundleURLSchemes + + yourscheme + + + +``` + +You will also have to add `LSApplicationQueriesSchemes` Key, with your scheme as string, to allow your App to open the URL: +```xml +LSApplicationQueriesSchemes + + appscheme + +``` + +By doing this, you will be able to parse the URL and process it like you want in openURL. + +**Swift** +```swift +// When the SDK calls for example: +let url = URL(string: "yourscheme://anypage")! +UIApplication.shared.openURL(url) + +// What you need to implement in your AppDelegate: +func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool { + // Here you will be able to parse your url + print(url.absoluteString) + return true +} +``` + +**Objective-C** +```objective-c +// When the SDK calls for example: +NSURL *url = [NSURL URLWithString:@"yourscheme://anypage"]; +[[UIApplication sharedApplication] openURL:url]; + +// What you need to implement in your AppDelegate: +-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options { + // Here you will be able to parse your url + NSLog(@"%@", [url absoluteString]); + return YES; +} +``` +If all is correctly set then when the user receives a Push and clicks it, the App will open, and will trigger the `appscheme://anypage`. + + +### Permission for geolocation +Add the `NSLocationWhenInUseUsageDescription` and the `NSLocationAlwaysAndWhenInUseUsageDescription` Keys in your **Info.plist** file (Xcode displays these Keys as `Privacy - Location When In Use Usage Description` and `Privacy - Location Always and When In Use Usage Description` in the editor). + +If your App supports iOS 10 and earlier, add the `NSLocationAlwaysUsageDescription` Key to your Info.plist file (Xcode displays this Key as `Privacy - Location Always Usage Description` in the editor). + +Pay attention to the description that you will provide to those Keys, as that is what will be displayed to the user when the permissions are asked. + +>To use Geolocation, you will need a **specific version of the SDK**. Contact Selligent support for more information about this. + + +### External framework +If you consider using the Geolocation module of the library and you have the correct version of the Selligent SDK, you will need to embed **PlotProjects.framework** besides the Selligent library in your App. +> Since SDK v2.1, minimum supported version of PlotProjects is v3.2.0. + +You will also need to configure it with the **plotconfig.json** file in the root folder of your project ([learn more](#geolocation)). + + +## Starting the SDK +To start the library, please follow the steps below (will mainly happen in your `UIApplication`'s delegate). +The following must be done in: + +**Swift** +```swift +func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool +``` + +**Objective-C** +```objective-c +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +``` + +* Create an instance of `SMManagerSetting` with the **url**, **clientID** and **privateKey** provided by Selligent. +* Set the following optional properties according to your needs: + + | Property | Description | + | --------- | --------- | + | `shouldClearBadge` | If you want the SDK to manage badge clearance. | + | `shouldDisplayRemoteNotification` | If you want to prevent the display of Push Notifications by the SDK and manage it in your App ([learn more](#notification_helper_methods)). | + | `shouldAddInAppMessageFromPushToInAppMessageList` | If you want to add the InApp Message associated to a Push Notification to the InApp Message list ([learn more](#display_iam)). | + | `clearCacheIntervalValue` | Define the interval value to clear the SDK internal cache (this setting is only used for messages that do not have an expiration date – otherwise expiration date of the message will be taken into account for lifetime of the message in cache). | + | `appGroupId` | Provide the App GroupId to the SDK (`group.yourGroupName`) that you will have previously configured in your Apple Developer Portal. This is mandatory when you use one Notification extension (service and/or content) ([learn more](#notification_extensions)). | + +* Optionally initialise and configure InApp Messages. +* Optionally configure location services (may not be available depending on your SDK version). + +**Swift** +```swift +let url = "URL"; +let clientID = "ClientID"; +let privateKey = "privateKey"; + +// Create the SMManagerSetting instance +let settings: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) + +// Optional - Default value is true +settings.shouldClearBadge = true +settings.shouldDisplayRemoteNotification = true +settings.shouldAddInAppMessageFromPushToInAppMessageList = false + +// Optional - Default value is .auto +settings.clearCacheIntervalValue = .auto + +// Only mandatory when you want to use a Notification extension (service or/and content) +settings.appGroupId = "group.yourGroupName"; + +// Optional - Initialize InApp Messages settings +let settingIAM = SMManagerSettingIAM.setting(with: .smia_RefreshType_Daily) +settings.configureInAppMessageService(withSetting: settingIAM) + +// Optional - Initialize location services +settings.configureLocationService() +``` + +**Objective-C** +```objective-c +NSString *url = @"YourProvidedURL"; +NSString *clientID = @"YourClientID"; +NSString *privatKey = @"YourPrivateKey"; + +// Create the SMManagerSetting instance +SMManagerSetting *settings = [SMManagerSetting settingWithUrl:url ClientID:clientID PrivateKey:privatKey]; + +// Optional - Default value is true +settings.shouldClearBadge = TRUE; +settings.shouldDisplayRemoteNotification = TRUE; +settings.shouldAddInAppMessageFromPushToInAppMessageList = FALSE; + +// Optional - Default value is kSMClearCache_Auto +settings.clearCacheIntervalValue = kSMClearCache_Auto; +// Only mandatory when you want to use a Notification extension (Services or/and Content) +settings.appGroupId = @"group.yourGroupName"; + +// Initialize InApp Messages settings - other constructors exist (cf. documentation) +SMManagerSettingIAM *iamSetting = [SMManagerSettingIAM settingWithRefreshType:kSMIA_RefreshType_Daily]; +[settings configureInAppMessageServiceWithSetting:iamSetting]; + +// Optional - Initialize location services +[settings configureLocationService]; +``` + +**Mandatory**: call the `start` API of the SDK right afterwards. + +**Swift** +```swift +// Starting the SDK +SMManager.sharedInstance().start(launchOptions: launchOptions, setting: settings) +``` + +**Objective-C** +```objective-c +// Starting the SDK +[[SMManager sharedInstance] startWithLaunchOptions:launchOptions Setting:settings]; +``` + + +### Push Notifications + +### Register for Push Notifications +Starting the library won't register for Push Notifications. You will need to call: + +**Swift** +```swift +SMManager.sharedInstance().registerForRemoteNotification() +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] registerForRemoteNotification]; +``` + +This can be called whenever you need to do it in your App. +> If you plan to trigger this when a certain page or criteria is met, do take into account to trigger it for users that might have already given the permission in a previous version of your App without the Selligent SDK.
+> Not doing so, would make it impossible for Selligent to receive the necessary **device push token**, to be used when sending Push Notifications. + +
+ You can then customize the way you inform the user before the display of iOS alert which will let the user allow Push Notifications for the App on the device (the iOS alert is displayed only once).
+ + ![](images/Picture17.png) +
+ + +### Provide the Device token to the SDK +If the user has accepted to receive Push Notifications, the device will be given a **device push token** by Apple, that you must provide to the Selligent platform. To do that you must implement: + +**Swift** +```swift +func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { + SMManager.sharedInstance().didRegisterForRemoteNotifications(withDeviceToken: deviceToken) +} +``` + +**Objective-C** +```objective-c +-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + [[SMManager sharedInstance] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; +} +``` + + +### Provide Push Notifications status to the SDK +> Optional, the SDK is able to get this information by itself.
+> **Since iOS 10 didRegisterUserNotificationSettings has been deprecated.** + +**Swift** +```swift +func application(_ application: UIApplication, didRegister notificationSettings: UIUserNotificationSettings) { + SMManager.sharedInstance().didRegister(notificationSettings) +} + +func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { + SMManager.sharedInstance().didFailToRegisterForRemoteNotificationsWithError(error) +} +``` + +**Objective-C** +```objective-c +-(void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings { + [[SMManager sharedInstance] didRegisterUserNotificationSettings:notificationSettings]; +} + +-(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { + [[SMManager sharedInstance] didFailToRegisterForRemoteNotificationsWithError:error]; +} +``` + + +### Disable Selligent Push Notifications +By default, Selligent Push Notifications are enabled and, if the device is correctly registered to iOS, then you don't have anything else to do. + +But if you want to disable (or enable) Selligent Pushes only (and still be able to receive other third party pushes), you have the possibility to do so by using: + +**Swift** +```swift +SMManager.sharedInstance().enableRemoteNotification() +SMManager.sharedInstance().disableRemoteNotification() +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] enableRemoteNotification]; +[[SMManager sharedInstance] disableRemoteNotification]; +``` + +Keep in mind that if, at device level, the Push Notifications are not registered and enabled then `enableRemoteNotification` won't be enough to receive Selligent Pushes. + + +### Listening and displaying the Push Notifications + +### App that builds against iOS + 10 +Besides the implementation described in [App that doesn't build against iOS + 10](#doesnt_build_against_ios10) (in case you need to support iOS 8 and 9), you will also need to implement a few methods from `UNUserNotificationCenterDelegate`. + +**Swift** +```swift +class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterDelegate { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]?) -> Bool { + // Other code + UNUserNotificationCenter.current().delegate = self + // Start the SDK below +} + +func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping(UNNotificationPresentationOptions) -> Void) { + SMManager.sharedInstance().willPresent(notification) + completionHandler(.alert) // or any UNNotificationPresentationOptions + // OR + // SMManager.sharedInstance().willPresent(response, withCompletionHandler: completionHandler) + // In this case the SDK will be in charge to call completionHandler with .alert as UNNotificationPresentationOptions +} + +func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping() -> Void) { + SMManager.sharedInstance().didReceive(response) + completionHandler() + // OR + // SMManager.sharedInstance().didReceive(response, withCompletionHandler: completionHandler) + // In this case the SDK will be in charge to call completionHandler +} +``` + +**Objective-C** +```objective-c +// AppDelegate.h +#import + +@interface AppDelegate: UIResponder + +// AppDelegate.m +-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Other code + UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; + center.delegate = self; + // Start the SDK below +} + +-(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void(^)(UNNotificationPresentationOptions))completionHandler { + [[SMManager sharedInstance] willPresentNotification:notification]; + completionHandler(UNNotificationPresentationOptionAlert); + // OR + // [[SMManager sharedInstance] willPresentNotification:notification withCompletionHandler:completionHandler]; + // In this case the SDK will be in charge to call completionHandler with UNNotificationPresentationOptionAlert as UNNotificationPresentationOptions: +} + +-(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)(void))completionHandler { + [[SMManager sharedInstance] didReceiveNotificationResponse:response]; + completionHandler(); + // OR + // [[SMManager sharedInstance] didReceiveNotificationResponse:response withCompletionHandler:completionHandler]; + // In this case the sdk will be in charge to call completionHandler: +} +``` + + +### App that doesn't build against iOS + 10 +Implement the methods described in [SMManager(RemoteNotification)](MobileSDK%20Reference/Categories/SMManager%2BRemoteNotification.md) in your `UIApplication`'s delegate. + +**Swift** +```swift +func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) { + SMManager.sharedInstance().didReceiveRemoteNotification(userInfo) +} +``` + +**Objective-C** +```objective-c +-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { + [[SMManager sharedInstance] didReceiveRemoteNotification:userInfo]; +} +``` + +> You can also implement specific delegates when your App supports background modes ([learn more](MobileSDK%20Reference/Categories/SMManager+SilentPush.md)). + + +### Helper methods +There are two useful methods which allow you to manage when you want to display the Push Notification when `SMManagerSetting shouldDisplayRemoteNotification` is set to `FALSE` (and the App is in foreground). + +**Swift** +```swift +// Display last received Push Notification +SMManager.sharedInstance().displayLastReceivedRemotePushNotification() + +// Retrieve last Push Notification (NSDictionary with id and title) +SMManager.sharedInstance().retrieveLastRemotePushNotification() +``` + +**Objective-C** +```objective-c +// Display last received Push Notification +[[SMManager sharedInstance] displayLastReceivedRemotePushNotification]; + +// Retrieve last Push Notification (NSDictionary with id and title) + [[SMManager sharedInstance] retrieveLastRemotePushNotification]; +``` + + +### Broadcasts + +| Name | Type | Description | +| --------- | --------- | --------- | +| `kSMNotification_Event_ButtonClicked` | `NSNotification` name | It is broadcasted when the user interacts with a Remote Notification. Useful to retrieve user's actions on a received Remote Notification. | +| `kSMNotification_Event_WillDisplayNotification` | `NSNotification` name | It is broadcasted shortly before displaying a Remote Notification. Primary Application may use this notification to pause any ongoing work before the Remote Notification is displayed. This notification-name is also triggered even if you disable `shouldDisplayRemoteNotification` ([learn more](MobileSDK%20Reference/Classes/SMManagerSetting.md)). | +| `kSMNotification_Event_WillDismissNotification` | `NSNotification` name | It is broadcasted shortly before dismissing the current Remote Notification. Primary application may use this notification to resume any paused work (see `kSMNotification_Event_WillDisplayNotification`). | +| `kSMNotification_Event_DidReceiveRemoteNotification` | `NSNotification` name | It is broadcasted shortly after receiving a Remote Notification. Primary Application may use this notification to decide when to display any Remote Notification. | +| `kSMNotification_Data_ButtonData` | `NSString` Key | Use this Key to retrieve the object [SMNotificationButtonData](MobileSDK%20Reference/Classes/SMNotificationButtonData.md), from the NSNotification-name `kSMNotification_Event_ButtonClicked`. | +| `kSMNotification_Data_RemoteNotification` | `NSString` Key | Use this Key to retrieve an `NSDictionary` instance with the Push ID and name, from the NSNotification-name `kSMNotification_Event_DidReceiveRemoteNotification`. | + +Examples can be found [here](#broadcasts_examples). + + +## InApp Messages + +### Enable IAM +If InApp Messages (we will refer to them with IAM) are correctly configured ([learn more](#starting_sdk)), you will need to enable them once, wherever you want in your App, by calling: + +**Swift** +```swift +SMManager.sharedInstance().enable(inAppMessage: true) +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] enableInAppMessage:TRUE]; +``` + +> It is also possible to fetch IAM in background mode ([learn more](MobileSDK%20Reference/Classes/SMManagerSettingIAM.md)). + + +### Display IAM +To retrieve the IAM delivered to the device you must listen to `kSMNotification_Event_DidReceiveInAppMessage` ([learn more](#iam_broadcasts)). + +### With SDK helper functions +This will provide you an `NSArray` of `NSDictionary` containing 2 properties: **id** and **title**, for each IAM available for the device. + +**Swift** +```swift +NotificationCenter.default.addObserver(self, selector: #selector(didReceiveInAppMessage(_:)), name: NSNotification.Name(rawValue: kSMNotification_Event_DidReceiveInAppMessage), object: nil) + +@objc func didReceiveInAppMessage(_ notif: Notification) { + let dictIAM = notif.userInfo + let array: Array = dictIAM![kSMNotification_Data_InAppMessage] as! Array +} +``` + +**Objective-C** +```objective-c +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveInAppMessage:) name:kSMNotification_Event_DidReceiveInAppMessage object:nil]; + +-(void)didReceiveInAppMessage:(NSNotification *)notif { + NSDictionary *dictIAM = [notif userInfo]; + NSMutableArray *arrayIAM = [dictIAM objectForKey:kSMNotification_Data_InAppMessage]; +} +``` + +Once your IAM is retrieved you can for example create an inbox page and when the user clicks on the IAM you can tell the SDK to display it calling: + +**Swift** +```swift +SMManager.sharedInstance().displayNotificationID("notificationID") +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] displayNotificationID:@"notificationID"]; +``` + +### With your own layout +Since SDK v.2.5, once notified that IAM are available, you can retrieve them and store them on App side. This will give you more flexibility when displaying them. To do that you will have to: + +**Swift** +```swift +// This method will provide you an array of SMInAppMessage +let inAppMessages: [Any]? = SMManager.sharedInstance().getInAppMessages() + +if let messages = inAppMessages { + let message = messages.first as! SMInAppMessage + // If an IAM has links associated to it, you can retrieve them with arrayIAMLinks on the SMInAppMessage object, you can then display the link the way you prefer, + // and once the user has clicked the link you will have to do a call to executeLinkAction + if let links = message.arrayIAMLinks { + let link = links.first + SMManager.sharedInstance().executeLinkAction(link as? SMLink, inAppMessage: message) + } + + // When an IAM has been displayed to the user you will have to mandatory call + // This will permit to the Selligent platform to set the adequate (open) event to the IAM + SMManager.sharedInstance().setInAppMessageAsSeen(message) + + // If you wish to remove the flag of a message as seen you can do so (this won't change the event state at platform level) + SMManager.sharedInstance().setInAppMessageAsUnseen(message) + + // This helper method that will allow you to set a message as deleted (in this case the message won't be provided to you anymore) + SMManager.sharedInstance().setInAppMessageAsDeleted(message) +} +``` + +**Objective-C** +```objective-c +// This method will provide you an array of SMInAppMessage +NSArray *inAppMessages = [[SMManager sharedInstance] getInAppMessages]; + +SMInAppMessage *message = inAppMessages[0]; + +// If an IAM has links associated to it, you can retrieve them with arrayIAMLinks on the SMInAppMessage object, you can then display the link the way you prefer, +// and once the user has clicked the link you will have to do a call to executeLinkAction +SMLink *link = message.arrayIAMLinks[0]; +[[SMManager sharedInstance] executeLinkAction:link InAppMessage:message]; + +// When an IAM has been displayed to the user you will have to mandatory call +// This will permit to the Selligent platform to set the adequate (open) event to the IAM +[[SMManager sharedInstance] setInAppMessageAsSeen:message]; + +// If you wish to remove the flag of a message as seen you can do so (this won't change the event state at platform level) +[[SMManager sharedInstance] setInAppMessageAsUnseen:message]; + +// This helper method that will allow you to set a message as deleted (in this case the message won't be provided to you anymore) +[[SMManager sharedInstance] setInAppMessageAsDeleted:message]; +``` + + +### Implement WKNavigationDelegate +When an IAM of type URL/PAGE is displayed by the SDK in a webView, if you wish for example to process the clicked link inside the webView on the App side, the SDK gives you the ability to do so by having a class in your App that implements the `WKNavigationDelegate` and providing an instance of this class to the SDK. + +> This is necessary if you want to have deep and universal links working from within this type of SDK IAM. + +To achieve this, you can call the method `SMManagerSetting inAppMessageWKNavigationDelegate` and give the instance of the class that will be in charge of implementing the `WKNavigationDelegate` methods as parameter. + +You will also need to call `SMManager removeViewController` whenever you wish to close the webView controller displayed by the SDK. + +**Swift** +```swift +// Provide an instance of a class implementing WKNavigatonDelegate to the SDK (you can do that for example at launch time) +SMManager.sharedInstance().inAppMessageWKNavigationDelegate(AppWKNavigationDelegateExample()) + +// Your class will look like +import Foundation + +class AppWKNavigationDelegateExample: NSObject, WKNavigationDelegate { + func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { + if navigationAction.navigationType == .linkActivated { + if let url = navigationAction.request.url, + let host = url.host, host.hasPrefix("myDomain"), + UIApplication.shared.canOpenURL(url) { + // Logic here to show your App page + // Remove SDK's webView controller + SMManager.sharedInstance().removeViewController() + decisionHandler(.cancel) + return + } + } + + decisionHandler(.allow) + } + + // The below functions are necessary to keep the SDK webview's navigation arrows working + func webView(_ webView: WKWebView, didFail navigation: WKNavigation!, withError error: Error) { + SMManager.sharedInstance().webView(webView, didFail: navigation, withError: error) + } + + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { + SMManager.sharedInstance().webView(webView, didFinish: navigation) + } + + func webView(_ webView: WKWebView, didCommit navigation: WKNavigation!) { + SMManager.sharedInstance().webView(webView, didCommit: navigation) + } +} +``` + +**Objective-C** +```objective-c +// Provide an instance of a class implementing WKNavigatonDelegate to the SDK (you can do that for example at launch time) +[[SMManager sharedInstance] inAppMessageWKNavigationDelegate:[AppWKNavigationDelegateExample new]]; + +// Your class will look like +// AppWKNavigationDelegateExample.h +#import +#import + +@interface AppWKNavigationDelegateExample: NSObject +@end + +// AppWKNavigationDelegateExample.m +#import "AppWKNavigationDelegateExample.h" +#import "SMHelper.h" + +@implementation AppWKNavigationDelegateExample + +-(void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(nonnull WKNavigationAction *)navigationAction decisionHandler:(nonnull void(^)(WKNavigationActionPolicy))decisionHandler { + if(navigationAction.navigationType == WKNavigationTypeLinkActivated) { + if(navigationAction.request.URL) { + if(![navigationAction.request.URL.resourceSpecifier containsString:@"myDomain"]) { + // Logic here to show your App page + // Remove SDK's webView controller + [[SMManager sharedInstance] removeViewController]; + decisionHandler(WKNavigationActionPolicyCancel); + return; + } + } + } + + decisionHandler(WKNavigationActionPolicyAllow); +} + +// The below functions are necessary to keep the SDK webview's navigation arrows working +-(void)webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error { + [[SMManager sharedInstance] webView:webView didFailNavigation: navigation withError: error]; +} + +-(void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { + [[SMManager sharedInstance] webView:webView didFinishNavigation: navigation]; +} + +-(void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation { + [[SMManager sharedInstance] webView:webView didCommitNavigation: navigation]; +} + +@end +``` + + +### Display IAM linked to a Push Notification +When an IAM is available with the payload of a Push Notification, you can also decide to process its content and display it on App side. + +To achieve this, you can call the method `inAppMessageDelegate` and give the instance of the class that will be in charge of implementing the `SMManagerInAppMessageDelegate ` methods as a parameter. + +**Swift** +```swift +// Provide an instance of a class implementing SMManagerInAppMessageDelegate to the SDK (you can do that for example at launch time) +SMManager.sharedInstance().inAppMessageDelegate(AppInAppMessageDelegateExample()) + +// Your class will look like +import Foundation + +class AppInAppMessageDelegateExample: NSObject,SMManagerInAppMessageDelegate { + // This will be called when the IAM (from a Push Notification) would be about to be displayed + func display(_ inAppMessage: SMInAppMessage) { + print(inAppMessage.title!) + print(inAppMessage.body!) + //print(inAppMessage.arrayIAMLinks!) + } +} +``` + +**Objective-C** +```objective-c +// Provide an instance of a class implementing SMManagerInAppMessageDelegate to the SDK (you can do that for example at launch time) +[[SMManager sharedInstance] inAppMessageDelegate:[AppInAppMessageDelegateExample new]]; + +// Your class will look like +// AppInAppMessageDelegateExample.h +#import +#import "SMHelper.h" + +@interface AppInAppMessageDelegateExample: NSObject +@end + +// AppInAppMessageDelegateExample.m +#import "AppInAppMessageDelegateExample.h" +#import "SMHelper.h" + +@implementation AppInAppMessageDelegateExample + +// This will be called when the IAM (from a Push Notification) would be about to be displayed +-(void)displayInAppMessage:(SMInAppMessage *)inAppMessage { + NSLog(@"title :%@", inAppMessage.title); + NSLog(@"content :%@", inAppMessage.body); + //NSLog(@"links :%@", inAppMessage.arrayIAMLinks); +} + +@end +``` + + +### Broadcasts + +| Name | Type | Description | +| --------- | --------- | --------- | +| `kSMNotification_Event_DidReceiveInAppMessage ` | `NSNotification` name | It is broadcasted shortly after receiving an IAM. Primary application may use this notification to manage the received IAM. | +| `kSMNotification_Data_InAppMessage ` | `NSString` Key | Use this Key to retrieve an `NSArray` instance with an `NSDictionary` of `SMNotificationMessage` with title and id as properties, from the NSNotification-name `kSMNotification_Event_DidReceiveInAppMessage`. | + +Examples can be found [here](#broadcasts_examples). + + +## Geolocation +Geolocation is managed through a 3rd party framework: `PlotProjects.framework`. To fully use this feature, you will have to download a **specific version of the SDK**, contact Selligent support for more information and embed the `PlotProjects.framework` in your App. +> Since SDK v2.1, minimum supported version of PlotProjects is v3.2.0). + +Beside this, PlotProjects framework needs the presence of a config file `plotconfig.json` ([learn more](https://www.plotprojects.com/documentation/#ConfigurationFile)) at the root of your project. +The content of this file will look like: +```json +{ + "publicToken": "REPLACE_ME", + "enableOnFirstRun": true, + "maxRegionsMonitored": 10, + "automaticallyAskLocationPermission": true +} +``` + +| Property | Description | +| --------- | --------- | +| `publicToken` | Will be the token provided for you to be able to use PlotProjects framework. | +| `enableOnFirstRun` | Will allow you to enable PlotProjects framework automatically if value is set to true, otherwise you will need to call `SMManager enableGeoLocation`. | +| `maxRegionsMonitored` | Is the maximum regions monitored by PlotProjects. The value of this property should be an integer between 5 and 20. This allows to keep some regions in case you want to monitor regions with another tool or by yourself. Keep in mind that the maximum regions that iOS allows to monitor is 20. | +| `automaticallyAskLocationPermission` | If set to true and your plist file is correctly configured ([learn more](#geolocation_permission)), then iOS opt-in dialog for geolocation will be displayed when the module is enabled for the first time. If set to false, you will be able to ask user opt-in whenever you want. Try considering this [best practice](https://www.plotprojects.com/blog/how-to-convince-your-app-users-to-opt-in-for-location-permissions-on-ios-13/) if you desire to do it this way. | + +Whenever you decide to enable PlotProjects framework, another method exists which allows you to disable it: + +**Swift** +```swift +SMManager.sharedInstance().disableGeoLocation() +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] disableGeoLocation]; +``` + +Once your App is correctly configured, you will be able to define your campaigns in PlotProjects dashboard. + + +## Events +* Sending any set of data to the backend can be done with `SMManager sendSMEvent`. +* A helper method `sendDeviceInfo` allows you to send a specific set of device information. + +This method takes as a parameter a `SMDeviceInfos` object. This object contains for the moment one unique property: `externalId`. + +**Swift** +```swift +let deviceInfos = SMDeviceInfos(externalId: "your CRM unique ID") +SMManager.sharedInstance().sendDeviceInfo(deviceInfos) +``` + +**Objective-C** +```objective-c +SMDeviceInfos *deviceInfos = [SMDeviceInfos deviceInfosWithExternalId:@"your CRM unique ID"]; +[[SMManager sharedInstance] sendDeviceInfo:deviceInfos]; +``` +* Default events are available for you to be used. They all inherit from `SMEvent` and are configurable through their constructors: + * `SMEventUserLogin` + * `SMEventUserLogout` + * `SMEventUserRegistration` + * `SMEventUserUnregistration` + +* `shouldCache` property on events: if the event fails to be delivered to our backend, then by default it is cached into an internal queue. After a while, the library will automatically try to send it again. Should you want to prevent this behaviour, feel free to set this property to `FALSE`. By default, it is set to `TRUE`. +* You can also initialize a success block and/or a failure block that will be triggered after an event is sent to the services. + + +### Registration / Unregistration +Three possible constructors: +```objective-c ++(instancetype)eventWithEmail:(NSString *)mail ++(instancetype)eventWithEmail:(NSString *)mail Dictionary:(NSDictionary *)dict ++(instancetype)eventWithDictionary:(NSDictionary *)dict +``` + +| Property | Description | +| --------- | --------- | +| `mail` | The e-mail of the user as an `NSString`. | +| `dict` | An `NSDictionary` containing a `NSString` as Key and a `NSString` as Data, for additional user data you want to provide to Selligent. | + +### SMUserEventRegistration +This object is used to send a **register** event to the server with the e-mail of the user, potential data and a callback, with the purpose of linking the device to an user. + +You can use an alternate key/value field to search for the user, in the `NSDictionary`. +> This event will create a new user in your Selligent database, if none was found. + +**Swift** +```swift +let event = SMEventUserRegistration.event(withEmail: "usermail@mail.com", dictionary: ["key": "value"]) + +// Optional +event.shouldCache = true // Not necessary as it is the default value +event.applyBlockSuccess({ (success) -> Void in + print("success") +}){ (failure) -> Void in + print("failure") +} + +SMManager.sharedInstance().send(event) +``` + +**Objective-C** +```objective-c +SMEventUserRegistration *event = [SMEventUserRegistration eventWithEmail:@"usermail@mail.com" Dictionary:@{@"key":@"value"}]; + +// Optional +event.shouldCache = TRUE; // Not necessary as it is the default value +[event applyBlockSuccess:^(SMSuccess *success) { + NSLog(@"success"); +} BlockFailure:^(SMFailure *failure) { + NSLog(@"failure"); +}]; + +[[SMManager sharedInstance] sendSMEvent:event]; +``` + +### SMEventUserUnregistration +This object is used to send an **unregister** event to the server with the e-mail of the user, potential data, and a callback. +> This event is not unlinking the user from the device (automatically), at the moment. + +**Swift** +```swift +let event = SMEventUserUnregistration.event(withEmail: "usermail@mail.com", dictionary: ["key": "value"]) + +// Optional +event.shouldCache = true // Not necessary as it is the default value +event.applyBlockSuccess({ (success) -> Void in + print("success") +}){ (failure) -> Void in + print("failure") +} + +SMManager.sharedInstance().send(event) +``` + +**Objective-C** +```objective-c +SMEventUserUnregistration *event = [SMEventUserUnregistration eventWithEmail:@"usermail@mail.com" Dictionary:@{@"key":@"value"}]; + +// Optional +event.shouldCache = TRUE; // Not necessary as it is the default value +[event applyBlockSuccess:^(SMSuccess *success) { + NSLog(@"success"); +} BlockFailure:^(SMFailure *failure) { + NSLog(@"failure"); +}]; + +[[SMManager sharedInstance] sendSMEvent:event]; +``` + + +### Login/Logout +Three possible constructors: +```objective-c ++(instancetype)eventWithEmail:(NSString *)mail ++(instancetype)eventWithEmail:(NSString *)mail Dictionary:(NSDictionary *)dict ++(instancetype)eventWithDictionary:(NSDictionary *)dict +``` + +| Property | Description | +| --------- | --------- | +| `mail` | The e-mail of the user as an `NSString`. | +| `dict` | An `NSDictionary` containing a `NSString` as Key and a `NSString` as Data, for additional user data you want to provide to Selligent. | + +### SMEventUserLogin +This object is used to send a **login** event to the server with the e-mail of the user, potential data, and a callback, with the purpose of linking the device to an user. + +You can use an alternate key/value field to search for the user, in the `NSDictionary`. +> This event will **NOT** create a new user in your Selligent database, if none found. + +**Swift** +```swift +let event = SMEventUserLogin.event(withEmail: "usermail@mail.com", dictionary: ["key": "value"]) + +// Optional +event.shouldCache = true // Not necessary as it is the default value +event.applyBlockSuccess({ (success) -> Void in + print("success") +}){ (failure) -> Void in + print("failure") +} + +SMManager.sharedInstance().send(event) +``` + +**Objective-C** +```objective-c +SMEventUserLogin *event = [SMEventUserLogin eventWithEmail:@"usermail@mail.com" Dictionary:@{@"key":@"value"}]; + +// Optional +event.shouldCache = TRUE; // Not necessary as it is the default value +[event applyBlockSuccess:^(SMSuccess *success) { + NSLog(@"success"); +} BlockFailure:^(SMFailure *failure) { + NSLog(@"failure"); +}]; + +[[SMManager sharedInstance] sendSMEvent:event]; +``` + +### SMEventUserLogout +This object is used to send a **logout** event to the server with the e-mail of the user, potential data and a callback. +You can use in the dictionary an alternate key/value field to search for the user +> This event is not unlinking the user from the device (automatically), at the moment. + +**Swift** +```swift +let event = SMEventUserLogout.event(withEmail: "usermail@mail.com", dictionary: ["key": "value"]) + +// Optional +event.shouldCache = true // Not necessary as it is the default value +event.applyBlockSuccess({ (success)-> Void in + print("success") +}){ (failure)-> Void in + print("failure") +} + +SMManager.sharedInstance().send(event) +``` + +**Objective-C** +```objective-c +SMEventUserLogout *event = [SMEventUserLogout eventWithEmail:@"usermail@mail.com" Dictionary:@{@"key":@"value"}]; + +// Optional +event.shouldCache = TRUE; // Not necessary as it is the default value +[event applyBlockSuccess:^(SMSuccess *success) { + NSLog(@"success"); +} BlockFailure:^(SMFailure *failure) { + NSLog(@"failure"); +}]; + +[[SMManager sharedInstance] sendSMEvent:event]; +``` + + +### Custom +One constructor: +```objective-c ++(instancetype)eventWithDictionary:(NSDictionary *)dict +``` + +| Property | Description | +| --------- | --------- | +| `dict` | An `NSDictionary` containing a `NSString` as Key and a `NSString` as Data, for additional user data you want to provide to Selligent. | + +### SMEvent +This object is used to send a custom event to the server with some data and a callback, for the only purpose of storing data. + +**Swift** +```swift +let event = SMEvent.init(dictionary: ["key": "value"]) + +// Optional +event.shouldCache = true // Not necessary as it is the default value +event.applyBlockSuccess({ (success) -> Void in + print("success") +}){ (failure) -> Void in + print("failure") +} + +SMManager.sharedInstance().send(event) +``` + +**Objective-C** +```objective-c +SMEvent *event = [SMEvent eventWithDictionary:@{@"key":@"value"}]; + +// Optional +event.shouldCache = TRUE; // Not necessary as it is the default value +[event applyBlockSuccess:^(SMSuccess *success) { + NSLog(@"success"); +} BlockFailure:^(SMFailure *failure) { + NSLog(@"failure"); +}]; + +[[SMManager sharedInstance] sendSMEvent:event]; +``` + + +## Broadcasts summary +You can listen to some `NSNotification` by observing the correct notification name. + +### Event broadcasts + +| Name | Type | Description | +| --------- | --------- | --------- | +| `kSMNotification_Event_ButtonClicked` | `NSNotification` name | It is broadcasted when the user interacts with a Remote Notification. Useful to retrieve user's actions on a received Remote Notification. | +| `kSMNotification_Event_WillDisplayNotification` | `NSNotification` name | It is broadcasted shortly before displaying a Remote Notification. Primary Application may use this notification to pause any ongoing work before the Remote Notification is displayed. This notification-name is also triggered even if you disable `shouldDisplayRemoteNotification` ([learn more](MobileSDK%20Reference/Classes/SMManagerSetting.md)). | +| `kSMNotification_Event_WillDismissNotification` | `NSNotification` name | It is broadcasted shortly before dismissing the current Remote Notification. Primary Application may use this notification to resume any paused work (see `kSMNotification_Event_WillDisplayNotification`). | +| `kSMNotification_Event_DidReceiveRemoteNotification` | `NSNotification` name | It is broadcasted shortly after receiving a Remote Notification. Primary Application may use this notification to decide when to display any Remote Notification. | +| `kSMNotification_Event_DidReceiveInAppMessage` | `NSNotification` name | It is broadcasted shortly after receiving InApp Messages. Primary Application may use this notification to manage the received InApp Messages. | + + +### Data broadcasts + +| Name | Type | Description | +| --------- | --------- | --------- | +| `kSMNotification_Data_ButtonData` | `NSString` Key | Use this Key to retrieve the object [SMNotificationButtonData](MobileSDK%20Reference/Classes/SMNotificationButtonData.md), from the NSNotification-name `kSMNotification_Event_ButtonClicked`. | +| `kSMNotification_Data_RemoteNotification` | `NSString` Key | Use this Key to retrieve an `NSDictionary` instance with push ID and name, from the NSNotification-name `kSMNotification_Event_DidReceiveRemoteNotification`. | +| `kSMNotification_Data_InAppMessage` | `NSString` Key | Use this Key to retrieve an `NSDictionary` instance with an array of `SMNotificationMessage` with title and id as properties, from the NSNotification-name `kSMNotification_Event_DidReceiveInAppMessage`. | + + +### Examples + +**Swift** +```swift +// Listen to broadcasting +NotificationCenter.default.addObserver(self, selector: #selector(anyMethodNameDidReceiveInAppMessage(notif:)), name: NSNotification.Name(rawValue: kSMNotification_Event_DidReceiveInAppMessage), object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(anyMethodNameButtonClicked(notif:)), name: NSNotification.Name(rawValue: kSMNotification_Event_ButtonClicked), object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(anyMethodNameDidReceiveRemoteNotification(notif:)), name: .smNotification_Event_DidReceiveRemote, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(anyMethodNameWillDisplayNotification(notif:)), name: NSNotification.Name.smNotification_Event_WillDisplay, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(anyMethodNameWillDismissNotification(notif:)), name: NSNotification.Name.smNotification_Event_WillDismiss, object: nil) + +// Notifications selectors +@objc func anyMethodNameDidReceiveInAppMessage(notif: NSNotification) { + let dict = notif.userInfo + let inAppData = dict![kSMNotification_Data_InAppMessage]; +} + +@objc func anyMethodNameButtonClicked(notif: NSNotification) { + let dict = notif.userInfo + let btnData: SMNotificationButtonData = dict![kSMNotification_Data_ButtonData] as! SMNotificationButtonData; +} + +@objc func anyMethodNameDidReceiveRemoteNotification(notif: NSNotification) { + let dict = notif.userInfo + let notifData = dict![NSNotification.Name.smNotification_Data_Remote]; +} + +@objc func anyMethodNameWillDisplayNotification(notif: NSNotification) {} +@objc func anyMethodNameWillDismissNotification(notif: NSNotification) {} +``` + +**Objective-C** +```objective-c +// Listen to broadcasting +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anyMethodNameDidReceiveInAppMessage:) name:kSMNotification_Event_DidReceiveInAppMessage object:nil]; +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anyMethodNameButtonClicked:) name:kSMNotification_Event_ButtonClicked object:nil]; +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anyMethodNameWillDisplayNotification:) name:kSMNotification_Event_WillDisplayNotification object:nil]; +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anyMethodNameWillDismissNotification :) name:kSMNotification_Event_WillDismissNotification object:nil]; +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anyMethodNameDidReceiveRemoteNotification:) name:kSMNotification_Event_DidReceiveRemoteNotification object:nil]; + +// Notifications selectors +-(void)anyMethodNameDidReceiveInAppMessage:(NSNotification *)notif { + NSDictionary *dict =[notif userInfo]; + NSDictionary *inAppData = dict[kSMNotification_Data_InAppMessage]; +} + +-(void)anyMethodNameButtonClicked:(NSNotification *)notif { + NSDictionary *dict =[notif userInfo]; + SMNotificationButtonData *btnData = dict[kSMNotification_Data_ButtonData]; +} + +-(void)anyMethodNameDidReceiveRemoteNotification:(NSNotification *)notif { + NSDictionary *dict =[notif userInfo]; + NSDictionary *notifData = dict[kSMNotification_Data_RemoteNotification]; +} + +-(void)anyMethodNameWillDisplayNotification:(NSNotification *)notif {} +-(void)anyMethodNameWillDismissNotification:(NSNotification *)notif {} +``` + + +## Miscellaneous + +### Reload +In case you want to change the web service URL, there is a reload method to restart the SDK. +It takes as parameter the same `SMSetting` object as the start method (all the values must be set in the object, even if they did not change). +> **IMPORTANT**: This method is for development purposes only, not meant to be used in production. + +**Swift** +```swift +let settings = SMManagerSetting(url: currentUrl, clientID: clientID, privateKey: privateKey) +SMManager.sharedInstance().reload(settings) +``` + +**Objective-C** +```objective-c +SMManagerSetting *settings = [SMManagerSetting settingWithUrl:currentUrl ClientID:clientID PrivateKey:privateKey]; +[[SMManager sharedInstance] reloadSetting:settings]; +``` + + +### LogLevel +This method `SMManager applyLogLevel` will allow you to debug the library.
+`SMLogLevel` values: + +| Property | Description | +| --------- | --------- | +| `kSMLogLevel_None` | No log printed at all. This is the suggested log-level for release. | +| `kSMLogLevel_Info` | Default log-entry. Basically, informs when the library starts/ends. | +| `kSMLogLevel_Warning` | Only warning messages are printed. | +| `kSMLogLevel_Error` | Only error messages are printed. | +| `kSMLogLevel_HTTPCall` | Print only HTTP-requests stuff. | +| `kSMLogLevel_All` | Print everything. Do not use for release!!! | + +**Swift** +```swift +SMManager.sharedInstance().apply(.all) +``` + +**Objective-C** +```objective-c +[[SMManager sharedInstance] applyLogLevel:kSMLogLevel_All]; +``` + + +### Retrieve Device ID +In case you need the Selligent device ID, you can use this helper method `SMManager deviceID`.
+To be notified if the device ID has changed, the App must register to the correct notification `kSMNotification_Event_DidReceiveInDeviceId`. + +The Notification will provide the new device ID to the App (Key `kSMNotification_Data_DeviceId`). + +**Swift** +```swift +// Retrieve the device ID +SMManager.sharedInstance().deviceID() + +// Listen to the broadcast in case device ID has changed and retrieve new device ID +NotificationCenter.default.addObserver(self, selector: #selector(didReceiveDeviceId(_:)), name: NSNotification.Name(rawValue: kSMNotification_Event_DidReceiveDeviceId), object: nil) + +@objc func didReceiveDeviceId (_ notif: Notification) { + let dict = notif.userInfo + let deviceid: String = dict![kSMNotification_Data_DeviceId] as! String +} +``` + +**Objective-C** +```objective-c +// Retrieve the device ID +[[SMManager sharedInstance] deviceID]; + +// Listen to the broadcast in case device ID has changed and retrieve new device ID +[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveDeviceId:) name: kSMNotification_Event_DidReceiveDeviceId object:nil]; + +-(void)didReceiveDeviceId:(NSNotification *)notif { + NSDictionary *dict = [notif userInfo]; + NSString *deviceID = [dict objectForKey:kSMNotification_Data_DeviceId]; +} +``` + + +## Notification Extensions +Some SDK functionalities are only possible with the implementation of Notification Extension targets. +Those functionalities available through Selligent Marketing Cloud are: +* Push action buttons: buttons to be displayed inside the notification center. +* Decrypt an encrypted payload. +* Rich Push content. + +These features are also only available for iOS + 10 devices. + +They are also only configurable in Selligent Marketing Cloud. + + +### General set up +To correctly use those extensions a first set up must be done inside your [Apple Developer Account](https://developer.apple.com/account/). + +
+ Connect to your account and go to Identifiers to create a new App Group.
+ + ![](images/Picture19.png) + ![](images/Picture20.png) +
+ +
+ Create an App Group named "group.yourGroupName".
+ + ![](images/Picture21.png) +
+ +When this is done, you will need to enable App group capabilities and check `group.yourGroupName` in the Capabilities tab of your main App target. + +
+ You can do this either in your Apple Developer Account.
+ + ![](images/Picture22.png) + ![](images/Picture23.png) +
+ +
+ Or directly in your Xcode project.
+ + ![](images/Picture24.png) +
+ + +### Notification Service Extension +This extension will allow: +* To decrypt a payload before it is provided in the Push banner. +* To download the media of the Rich Push payload. + +### Configuration +
+ To get started you will need to add a new target "Notification Service Extension" to your project.
+ + ![](images/Picture25.png) +
+ +Note the creation of the files (in Swift in this example): +* `NotificationService.swift`: a subclass of `UNNotificationServiceExtension`. +* `Info.plist` + +
+ In the capabilities of your notification service extension target, enable App groups and check "group.yourGroupName".
+ + ![](images/Picture24.png) +
+ +
+ And finally link the Selligent SDK to the Service Extension target.
+ + ![](images/Picture28.png) +
+ +> Remember, if your target is in swift, do not forget to set the correct path in the `Objective-C bridging-header` property, in the build settings of your target.
+> Unless you are using the framework version and importing the module. + +### Start the SDK from inside the extension +**Swift** +```swift +let url = "URL" +let clientID = "ClientID" +let privateKey = "privateKey" + +// Create the SMManagerSetting instance +let settings: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) + +// Provide the App Groupd Id to the SDK +settings.appGroupId = "group.yourGroupName" + +// Start the SDK +SMManager.sharedInstance().startExtension(with: settings) +``` + +**Objective-C** +```objective-c +NSString *url = @"YourProvidedURL"; +NSString *clientID = @"YourClientID"; +NSString *privatKey = @"YourPrivateKey"; + +// Create the SMManagerSetting instance +SMManagerSetting *settings = [SMManagerSetting settingWithUrl:url ClientID:clientID PrivateKey:privatKey]; + +// Provide the App Groupd Id to the SDK +settings.appGroupId = @"group.yourGroupName"; + +// Start the SDK +[[SMManager sharedInstance] startExtensionWithSetting:settings]; +``` + +### Push notification content modification before displaying to user +Once your service extension is correctly configured and the library is started, the extension will allow you to modify the Push content before displaying it to the user. + +This feature is used by the SDK to `decrypt` the payload if it is flagged as encrypted. + +You have the possibility to choose between two methods: either you want to manage the call to the block, which is executed with the modified content, by yourself, or you want to let the library manage this for you. + +* In the first case, a `UNMutableNotificationContent` object will be returned to you. + +**Swift** +```swift +// Storage for the completion handler and content. +var contentHandler: ((UNNotificationContent) -> Void)? +var bestAttemptContent: UNMutableNotificationContent? + +// Modify the payload contents. +override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping(UNNotificationContent) -> Void) { + self.contentHandler = contentHandler + self.bestAttemptContent = (request.content.mutableCopy() as? UNMutableNotificationContent) + + // Init and start the SDK + let url = "URL" + let clientID = "ClientID" + let privateKey = "privateKey" + + // Create the SMManagerSetting instance + let settings: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) + + // Provide the App Group Id to the SDK + settings.appGroupId = "group.yourGroupName" + + // Start the SDK + SMManager.sharedInstance().startExtension(with: settings) + + // Provide the request with the original notification content to the SDK and return the updated Notification content + bestAttemptContent = SMManager.sharedInstance().didReceive(request) + + // Call the completion handler when done. + if let bestAttemptContent = self.bestAttemptContent { + contentHandler(bestAttemptContent) + } +} + +// Return something before time expires. +override func serviceExtensionTimeWillExpire() { + if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent { + // Mark the message as still encrypted. + bestAttemptContent.subtitle = "(Encrypted)" + bestAttemptContent.body = "" + contentHandler(bestAttemptContent) + } +} +``` + +**Objective-C** +```objective-c +#import "SMHelper.h" + +@interface NotificationService() +@property(nonatomic, strong)void(^contentHandler)(UNNotificationContent *contentToDeliver); +@property(nonatomic, strong)UNMutableNotificationContent *bestAttemptContent; +@end + + @implementation NotificationService + +-(void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void(^)(UNNotificationContent *_Nonnull))contentHandler { + self.contentHandler = contentHandler; + + NSString *url = @"YourProvidedURL"; + NSString *clientID = @"YourClientID"; + NSString *privatKey = @"YourPrivateKey"; + + // Create the SMManagerSetting instance + SMManagerSetting *settings = [SMManagerSetting settingWithUrl:url ClientID:clientID PrivateKey:privatKey]; + + // Provide the App Group Id to the SDK + settings.appGroupId = @"group.yourGroupName"; + + // Starting the library + [[SMManager sharedInstance] startExtensionWithSetting:settings]; + + // Provide the request with the original notification content to the SDK and return the updated Notification content + self.bestAttemptContent = [[SMManager sharedInstance] didReceiveNotificationRequest:request]; + + // Call the completion handler when done + contentHandler(_bestAttemptContent); +} + +-(void)serviceExtensionTimeWillExpire { + // Called just before the extension will be terminated by the system. + // Use this as an opportunity to deliver your "best attempt" at modified content, otherwise the original push payload will be used. + self.contentHandler(self.bestAttemptContent); +} + +@end +``` + +* In the second case, the SDK will manage everything. + +**Swift** +```swift +import UserNotifications + +class NotificationService: UNNotificationServiceExtension { + // Modify the payload contents. + override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping(UNNotificationContent) -> Void) { + // Init and start the SDK + let url = "URL" + let clientID = "ClientID" + let privateKey = "privateKey" + + // Create the SMManagerSetting instance + let settings: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) + + // Provide the App Group Id to the SDK + settings.appGroupId = "group.yourGroupName" + + // Start the SDK + SMManager.sharedInstance().startExtension(with: settings) + + // Provide the request with the original Notification content to the SDK and the contentHandler + SMManager.sharedInstance().didReceive(request, withContentHandler: contentHandler) + } + + // Return something before time expires. + override func serviceExtensionTimeWillExpire() { + SMManager.sharedInstance().serviceExtensionTimeWillExpire() + } +} +``` + +**Objective-C** +```objective-c +#import "SMHelper.h" + +@implementation NotificationService + +-(void)didReceiveNotificationRequest:(UNNotificationRequest *)request withContentHandler:(void(^)(UNNotificationContent *_Nonnull))contentHandler { + NSString *url = @"YourProvidedURL"; + NSString *clientID = @"YourClientID"; + NSString *privatKey = @"YourPrivateKey"; + + // Create the SMManagerSetting instance + SMManagerSetting *settings = [SMManagerSetting settingWithUrl:url ClientID:clientID PrivateKey:privatKey]; + + // Provide the App Group Id to the SDK + settings.appGroupId = @"group.yourGroupName"; + + // Starting the library + [[SMManager sharedInstance] startExtensionWithSetting:settings]; + + // Provide the request with the original Notification content to the SDK and the contentHandler + [[SMManager sharedInstance] didReceiveNotificationRequest:request withContentHandler:contentHandler]; +} + +-(void)serviceExtensionTimeWillExpire { + // Called just before the extension will be terminated by the system. + [[SMManager sharedInstance] serviceExtensionTimeWillExpire]; +} + +@end +``` + +> Remember, if the content can't be decrypted or if `serviceExtensionTimeWillExpire` has been called before decryption is complete, "(Encrypted)" will be the values of all encrypted payload properties (when using Encryption feature).
+> If you don't choose to use encryption feature, do not call SDK `serviceExtensionTimeWillExpire` and let the original push payload to be used. + +For more information on Notification service extension you can also refer to [Apple documentation](https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications). + + +### Notification Content Extension +This extension will: +* Provide to you the content of the Rich Push media (if the extension is not present and depending on the type of the media, iOS will use a default template to display the message, but in this case the action buttons won't be displayed). +* Display action buttons in the Push. + +> This Extension is triggered when performing a `long press` or `3D touch` in a Push Notification. + +### Configuration +
+ To get started you will need to add a new target "Notification Content Extension" to your project.
+ + ![](images/Picture30.png) +
+ +You will notice the creation of those files (in Objective C in this example): +* `MainInterface.storyboard`: where you will be able to design the notification. +* `NotificationViewController.m`: an `UIViewController` subclassz +* `Info.plist`. + +
+ In the capabilities of your target enable App groups and check "group.yourGroupName".
+ + ![](images/Picture24.png) +
+ +Now you will need to associate the Extension with a Selligent Notification Category. + +A category is a property inside the payload that will inform your App which extension should manage the content of the payload. + +It is mandatory to have one once a button is present in the payload and should be displayed in the notification center. + +By default, the Selligent category will be `SELLIGENT_BUTTON`. If you plan to also send Rich Push, Selligent provides you the ability to have a specific extension to manage the way you want to display it in the UI. The category will be named `SELLIGENT_IMAGE` in this case. + +To set the category in your content extension, just open the `Info.plist` of the extension, find the `NSExtensionAttributes` dictionary and set the value of the `UNNotificationExtensionCategory` Key to `SELLIGENT_BUTTON` or `SELLIGENT_IMAGE`. + +
+ You can also have both category in one extension as `UNNotificationExtensionCategory` can be an Array type.
+ + ![](images/Picture33.png) +
+ +
+ And finally link the Selligent SDK to the Content Extension target.
+ + ![](images/Picture28.png) +
+ +> Remember, if your target is in swift, do not forget to set the correct path in the `Objective-C bridging-header` property, in the build settings of your target.
+> Unless you are using the framework version and importing the module. + +The storyboard will allow you to customise the display of the Push Notifications. + +If you want to keep the default one, just hide the `UIView` created by default and do not set the `UNNotificationExtensionDefaultContentHidden` Key. On the other hand, set the Key to `YES` and customise the display of the body and title of your notification. + +For more information about Notification Content Extensions please check the [Apple documentation](https://developer.apple.com/documentation/usernotificationsui/customizing_the_appearance_of_notifications). + +### Start the SDK from inside the extension +
+ If you have correctly added a Selligent Notification Content Extension target to your project, you will be able to display Rich Push media and action buttons directly in the Push Notification.
+ + ![](images/Picture36.png) +
+ +> Do note that if you want to support `GIF` format you will need to implement it on your own, from the provided image `NSData`. + +**Swift** +```swift +import UIKit +import UserNotifications +import UserNotificationsUI + +class NotificationViewController: UIViewController, UNNotificationContentExtension { + // UI elements from the storyboard + @IBOutlet var titleLabel: UILabel? + @IBOutlet var bodyLabel: UILabel? + @IBOutlet weak var imageView: UIImageView! + + override func viewDidLoad() { + super.viewDidLoad() + // Do any required interface initialization here. + } + + func didReceive(_ notification: UNNotification) { + // UI elements from the storyboard + self.titleLabel?.text = notification.request.content.title + self.bodyLabel?.text = notification.request.content.body + + // "SELLIGENT_IMAGE" category must be configured + if(notification.request.content.attachments.count > 0) { + let attachment: UNNotificationAttachment = notification.request.content.attachments[0]; + + if(attachment.url.startAccessingSecurityScopedResource()) { + let imageData = NSData(contentsOf: attachment.url) + let image = UIImage(data: imageData! as Data) + + self.imageView.image = image + attachment.url.stopAccessingSecurityScopedResource() + } + } + + // Init and start the SDK + let url = "URL" + let clientID = "ClientID" + let privateKey = "privateKey" + + // Create the SMManagerSetting instance + let settings: SMManagerSetting = SMManagerSetting(url: url, clientID: clientID, privateKey: privateKey) + + // Provide the App Group Id to the SDK + settings.appGroupId = "group.yourGroupName" + + // Start the SDK + SMManager.sharedInstance().startExtension(with: settings) + + // SDK API to add Push Notification buttons + // "SELLIGENT_BUTTON" category must be configured + SMManager.sharedInstance().didReceive(notification) + } + + // If you want the Push Notification buttons to be processed without the need of opening the App + func didReceive(_ response: UNNotificationResponse, completionHandler completion: @escaping(UNNotificationContentExtensionResponseOption) -> Void) { + SMManager.sharedInstance().didReceive(response) + completion(.dismiss) + } +} +``` + +**Objective-C** +```objective-c +#import "NotificationViewController.h" +#import +#import +#import "SMHelper.h" + +@interface NotificationViewController () +// UI elements from the storyboard +@property(weak, nonatomic)IBOutlet UILabel *titleLabel; +@property(weak, nonatomic)IBOutlet UILabel *bodyLabel; +@property(weak, nonatomic)IBOutlet UIImageView *imageView; + +@end + +@implementation NotificationViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any required interface initialization here. +} + +- (void)didReceiveNotification:(UNNotification *)notification { + self.titleLabel.text = notification.request.content.title; + self.bodyLabel.text = notification.request.content.body; + + // "SELLIGENT_IMAGE" category must be configured + if(notification.request.content.attachments.count > 0) { + UNNotificationAttachment *attachment = notification.request.content.attachments[0]; + + if(attachment.URL.startAccessingSecurityScopedResource) { + NSData *imageData = [NSData dataWithContentsOfURL:attachment.URL]; + UIImage *image = [UIImage imageWithData:imageData]; + + self.imageView.image = image; + [attachment.URL stopAccessingSecurityScopedResource]; + } + } + + NSString *url = @"YourProvidedURL"; + NSString *clientID = @"YourClientID"; + NSString *privatKey = @"YourPrivateKey"; + + // Create the SMManagerSetting instance + SMManagerSetting *settings = [SMManagerSetting settingWithUrl:url ClientID:clientID PrivateKey:privatKey]; + + // Provide the App Group Id to the SDK + settings.appGroupId = @"group.yourGroupName"; + + // Starting the library + [[SMManager sharedInstance] startExtensionWithSetting:settings]; + + // SDK API to add Push Notification buttons + // "SELLIGENT_BUTTON" category must be configured + [[SMManager sharedInstance] didReceiveNotification:notification]; +} + +// If you want the Push Notification buttons to be processed without the need of opening the App +-(void)didReceiveNotificationResponse:(UNNotificationResponse *)response completionHandler:(void(^)(UNNotificationContentExtensionResponseOption option))completion { + [[SMManager sharedInstance] didReceiveNotificationResponse:response]; + completion(UNNotificationContentExtensionResponseOptionDismiss); +} + +@end +``` + diff --git a/Documentation/Using the SDK.pdf b/Documentation/Using the SDK.pdf deleted file mode 100644 index 5686b32..0000000 Binary files a/Documentation/Using the SDK.pdf and /dev/null differ diff --git a/Documentation/iOSSDKTemplate.zip b/Documentation/iOSSDKTemplate.zip index d1029ff..8f164ef 100644 Binary files a/Documentation/iOSSDKTemplate.zip and b/Documentation/iOSSDKTemplate.zip differ diff --git a/Documentation/images/Picture1.png b/Documentation/images/Picture1.png new file mode 100644 index 0000000..7aa66d2 Binary files /dev/null and b/Documentation/images/Picture1.png differ diff --git a/Documentation/images/Picture11.png b/Documentation/images/Picture11.png new file mode 100644 index 0000000..9af634a Binary files /dev/null and b/Documentation/images/Picture11.png differ diff --git a/Documentation/images/Picture12.png b/Documentation/images/Picture12.png new file mode 100644 index 0000000..6c4f5ea Binary files /dev/null and b/Documentation/images/Picture12.png differ diff --git a/Documentation/images/Picture13.png b/Documentation/images/Picture13.png new file mode 100644 index 0000000..2682e48 Binary files /dev/null and b/Documentation/images/Picture13.png differ diff --git a/Documentation/images/Picture14.png b/Documentation/images/Picture14.png new file mode 100644 index 0000000..e979617 Binary files /dev/null and b/Documentation/images/Picture14.png differ diff --git a/Documentation/images/Picture15.png b/Documentation/images/Picture15.png new file mode 100644 index 0000000..d4b230b Binary files /dev/null and b/Documentation/images/Picture15.png differ diff --git a/Documentation/images/Picture16.png b/Documentation/images/Picture16.png new file mode 100644 index 0000000..ca046f0 Binary files /dev/null and b/Documentation/images/Picture16.png differ diff --git a/Documentation/images/Picture17.png b/Documentation/images/Picture17.png new file mode 100644 index 0000000..f8e1b76 Binary files /dev/null and b/Documentation/images/Picture17.png differ diff --git a/Documentation/images/Picture19.png b/Documentation/images/Picture19.png new file mode 100644 index 0000000..d12021b Binary files /dev/null and b/Documentation/images/Picture19.png differ diff --git a/Documentation/images/Picture2.png b/Documentation/images/Picture2.png new file mode 100644 index 0000000..fc76cec Binary files /dev/null and b/Documentation/images/Picture2.png differ diff --git a/Documentation/images/Picture20.png b/Documentation/images/Picture20.png new file mode 100644 index 0000000..c34a710 Binary files /dev/null and b/Documentation/images/Picture20.png differ diff --git a/Documentation/images/Picture21.png b/Documentation/images/Picture21.png new file mode 100644 index 0000000..85616d6 Binary files /dev/null and b/Documentation/images/Picture21.png differ diff --git a/Documentation/images/Picture22.png b/Documentation/images/Picture22.png new file mode 100644 index 0000000..e694f61 Binary files /dev/null and b/Documentation/images/Picture22.png differ diff --git a/Documentation/images/Picture23.png b/Documentation/images/Picture23.png new file mode 100644 index 0000000..cf675a5 Binary files /dev/null and b/Documentation/images/Picture23.png differ diff --git a/Documentation/images/Picture24.png b/Documentation/images/Picture24.png new file mode 100644 index 0000000..75f026d Binary files /dev/null and b/Documentation/images/Picture24.png differ diff --git a/Documentation/images/Picture25.png b/Documentation/images/Picture25.png new file mode 100644 index 0000000..f240c8d Binary files /dev/null and b/Documentation/images/Picture25.png differ diff --git a/Documentation/images/Picture28.png b/Documentation/images/Picture28.png new file mode 100644 index 0000000..bf5f88b Binary files /dev/null and b/Documentation/images/Picture28.png differ diff --git a/Documentation/images/Picture3.png b/Documentation/images/Picture3.png new file mode 100644 index 0000000..36268b8 Binary files /dev/null and b/Documentation/images/Picture3.png differ diff --git a/Documentation/images/Picture30.png b/Documentation/images/Picture30.png new file mode 100644 index 0000000..87087f4 Binary files /dev/null and b/Documentation/images/Picture30.png differ diff --git a/Documentation/images/Picture33.png b/Documentation/images/Picture33.png new file mode 100644 index 0000000..ca8232b Binary files /dev/null and b/Documentation/images/Picture33.png differ diff --git a/Documentation/images/Picture36.png b/Documentation/images/Picture36.png new file mode 100644 index 0000000..3e27a97 Binary files /dev/null and b/Documentation/images/Picture36.png differ diff --git a/Documentation/images/Picture4.png b/Documentation/images/Picture4.png new file mode 100644 index 0000000..874d316 Binary files /dev/null and b/Documentation/images/Picture4.png differ diff --git a/Documentation/images/Picture5.png b/Documentation/images/Picture5.png new file mode 100644 index 0000000..4a1ea45 Binary files /dev/null and b/Documentation/images/Picture5.png differ diff --git a/Documentation/images/Picture7.png b/Documentation/images/Picture7.png new file mode 100644 index 0000000..846dbf1 Binary files /dev/null and b/Documentation/images/Picture7.png differ diff --git a/Documentation/images/Picture8.png b/Documentation/images/Picture8.png new file mode 100644 index 0000000..75b39f5 Binary files /dev/null and b/Documentation/images/Picture8.png differ diff --git a/Documentation/images/Picture9.png b/Documentation/images/Picture9.png new file mode 100644 index 0000000..0bfeae6 Binary files /dev/null and b/Documentation/images/Picture9.png differ diff --git a/README.md b/README.md index b430f1c..63708e3 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ What is the Selligent Marketing Cloud - Mobile SDK for iOS? The Selligent Marketing Cloud - Mobile SDK is a tool that enables you to use the Selligent Marketing Cloud - Mobile feature in a very easy and straightforward way. -By incorporating our latest SDK for iOS in your app, we support you in handling push messages, in app messages, in app content, standard and custom events as well as logins and logouts in the app. +By incorporating our latest SDK for iOS in your app, we support you in handling Push Notifications, InApp Messages, standard and custom events as well as registrations, unregistrations, logins and logouts in the App. # MobileSDK-iOS Integration To integrate the library yourself just download, depending of your needs one of those links: -​ - iOS Framework : sdk framework +​ - iOS Framework: SDK framework -​ - iOS Library : sdk static library +​ - iOS Library: SDK static library -​ - iOS Lib- Plot geofencing support : sdk static library with support of geofencing +​ - iOS Lib- Plot geofencing support: SDK static library with support of geofencing Or you can use CocoaPods by adding one of these pod to your main target, and also to your notification extensions targets in your Podfile: @@ -34,12 +34,12 @@ then run pod install -Then please refer to the SDK full documentation for a correct implementation of the sdk +Then please refer to the SDK full documentation for a correct implementation of the SDK # MobileSDK-iOS Documentation -Please check our SDK full documentation +Please check our SDK full documentation -Use our Reference manual to quickly check all our available methods +Use our Reference manual to quickly check all our available methods -Download our iOS example application to see how our SDK needs to be implemented - The swift target (and the extensions inside the project) embed the sdk framework, and the objective c target use the static library. +Download our iOS example application to see how our SDK needs to be implemented - The swift target (and the extensions inside the project) embed the sdk framework, and the objective c target use the static library. diff --git a/SelligentMobileSDK.podspec b/SelligentMobileSDK.podspec index 01e3dfe..b6428c6 100644 --- a/SelligentMobileSDK.podspec +++ b/SelligentMobileSDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.platform = :ios, "9.0" s.name = "SelligentMobileSDK" - s.version = "2.6.1" + s.version = "2.6.2" s.summary = "Selligent Marketing Cloud - Mobile SDK for iOS" s.description = <<-DESC The Selligent Marketing Cloud - Mobile SDK is a tool that enables you to use the Selligent Marketing Cloud - Mobile feature in a very easy and straightforward way. diff --git a/iOS Framework/SelligentMobileSDK.xcframework/Info.plist b/iOS Framework/SelligentMobileSDK.xcframework/Info.plist index cd6591f..1fe8f83 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/Info.plist +++ b/iOS Framework/SelligentMobileSDK.xcframework/Info.plist @@ -6,32 +6,32 @@ LibraryIdentifier - ios-arm64_armv7 + ios-arm64_i386_x86_64-simulator LibraryPath SelligentMobileSDK.framework SupportedArchitectures arm64 - armv7 + i386 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator LibraryIdentifier - ios-arm64_i386_x86_64-simulator + ios-arm64_armv7 LibraryPath SelligentMobileSDK.framework SupportedArchitectures arm64 - i386 - x86_64 + armv7 SupportedPlatform ios - SupportedPlatformVariant - simulator CFBundlePackageType diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMBlock.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMBlock.h index 60c84d9..cf27fb8 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMBlock.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMBlock.h @@ -18,4 +18,4 @@ typedef void(^SMCompletionBlockSuccess)(SMSuccess *success); * @typedef type of block that will be triggered when an event has failed to be sent * @param failure a SMFailure failure */ -typedef void(^SMCompletionBlockFailure)(SMFailure *failure); \ No newline at end of file +typedef void(^SMCompletionBlockFailure)(SMFailure *failure); diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUser.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUser.h index b2e5d8f..0dc4375 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUser.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUser.h @@ -9,7 +9,6 @@ #import "SMEvent.h" /*! - * @inherits SMEvent * @discussion Class representing all User-eventing * Instances of this class should not be directly created. * Please use children classes instead. diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h index 030614b..51b0ace 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogin - * @inherits SMEventUser - * @discussion user login event class + * @discussion User login event class * #SMEventUserLogin:# */ @interface SMEventUserLogin : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h index 5ff4ef8..b82383f 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogout - * @inherits SMEventUser - * @discussion user logout event class + * @discussion User logout event class * #SMEventUserLogout:# */ @interface SMEventUserLogout : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h index 7b0efd5..53cc6ef 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserRegistration - * @inherits SMEventUser - * @discussion user registration event class + * @discussion User registration event class * #SMEventUserRegistration:# */ @interface SMEventUserRegistration : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h index 4c41f97..6c02856 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserUnregistration - * @inherits SMEventUser - * @discussion user unregistration event class + * @discussion User unregistration event class * #SMEventUserUnregistration:# */ @interface SMEventUserUnregistration : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMHelper.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMHelper.h index d4e62da..20e2129 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMHelper.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMHelper.h @@ -27,6 +27,7 @@ #import "SMManager+SMEvent.h" #import "SMManager+Log.h" #import "SMManager+StyleOptions.h" +#import "SMManager+ViewController.h" #import "SMManagerInAppMessageDelegate.h" diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentType.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentType.h index 09667eb..f2165c0 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentType.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentType.h @@ -33,4 +33,4 @@ typedef NS_OPTIONS (NSInteger, SMInAppContentType) { kSMInAppContentType_Image = 3 -}; \ No newline at end of file +}; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h index 9d1d66e..2743081 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h @@ -31,4 +31,4 @@ @property (nonatomic) bool isEmpty; -@end \ No newline at end of file +@end diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMLink.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMLink.h index 950ff58..896187d 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMLink.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMLink.h @@ -35,7 +35,7 @@ /*! * The type (SMNotificationButtonType) of action that the button will execute. - * @see SMNotificationButtonType for more information about each type + * @see SMNotificationButtonType */ @property (nonatomic) SMNotificationButtonType type; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+Log.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+Log.h index fae50c1..9c20b2a 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+Log.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+Log.h @@ -28,7 +28,7 @@ * @discussion This is an optional setting that may help you debug the library calls. * This call can be done at any time (before or after starting the library). * However, in order to avoid missing any error log, we recommand setting this value before starting the library. - * @param logLevel SMLogLevel enumeration type. Default = kSMLoLevel_None + * @param logLevel SMLogLevel enumeration type. Default = kSMLogLevel_None * @warning It is developer's responsability to enable log-level in Debug or release mode. * No distinction are being aplied by the library. * For obvious performance reason, it is always recommended to turn log off in release mode. diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h index 9bbcce4..2cf8a2e 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h @@ -40,7 +40,7 @@ * @param completionHandler The block-completion to be processed after the download. Provided by the delegate call * @discussion It is recommended to use this API over didReceiveRemoteNotification: as it handles silent-remote-notificaitons. * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; @@ -56,7 +56,7 @@ * Use it only if your application need to overide the service. * Otherwise, please use didReceiveRemoteNotification:fetchCompletionHandler: * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler ForceResultFetch:(UIBackgroundFetchResult)resultFetch; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h new file mode 100644 index 0000000..661f187 --- /dev/null +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h @@ -0,0 +1,47 @@ +// +// SMManager+ViewController.h +// MobileSDK +// +// Created by Gauthier Dumont on 07/07/15. +// Copyright (c) 2015 Selligent. All rights reserved. +// + +/** + * This category will help our SDK making the WKWebView navigation buttons enabled/disabled when needed, if inAppMessageWKNavigationDelegate is set. + * + * #SMManager+ViewController :# + */ +@interface SMManager (ViewController) + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly and log the error when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + * @param error The NSError from the WKNavigationDelegate. + */ +- (void) webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate + */ +- (void) webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + */ +- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation; + +@end + + + diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h index 6f14ce5..788556c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h @@ -11,6 +11,11 @@ NS_ASSUME_NONNULL_BEGIN +/** + * This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later. + * + * #SMManagerInAppMessageDelegate :# + */ @protocol SMManagerInAppMessageDelegate @optional diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerSetting.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerSetting.h index 75ca46f..d679d0c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerSetting.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMManagerSetting.h @@ -149,14 +149,4 @@ */ - (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC*)settingIAC; -/** - * @discussion This call is optional. It is not needed to successfully start the SDK. - * This call is useless if the sdk version is not the one associated to the plotproject framework - * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. - * It is the first step to inform the sdk that geo location services are going to be used by the - * - * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library - */ -- (void)configureLocationService; - @end diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNSNotification.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNSNotification.h index 854470f..55274aa 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNSNotification.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNSNotification.h @@ -6,7 +6,7 @@ /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted when the user interacts with a remote-notification - * Usefull to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. + * Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. */ extern NSString* kSMNotification_Event_ButtonClicked; @@ -21,7 +21,7 @@ extern NSString* kSMNotification_Event_WillDisplayNotification; /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification - * Primary-application may use this notification to resume any paused work. (see kSMNotification_Event_WillDisplayNotification) + * Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification). */ extern NSString* kSMNotification_Event_WillDismissNotification; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h index 59a7832..9ed0e0c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h @@ -8,7 +8,7 @@ /*! - * This enumeration declares all known buttun-type + * This enumeration declares all known button-type */ typedef NS_ENUM(NSInteger, SMNotificationButtonType) { /*! diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Info.plist b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Info.plist index 446ce8c..8de49a5 100644 Binary files a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Info.plist and b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/Info.plist differ diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/SelligentMobileSDK b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/SelligentMobileSDK old mode 100755 new mode 100644 index 9b4a40c..9409c8c Binary files a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/SelligentMobileSDK and b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/SelligentMobileSDK differ diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/_CodeSignature/CodeResources b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/_CodeSignature/CodeResources index 9eaa939..a3584d8 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/_CodeSignature/CodeResources +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_armv7/SelligentMobileSDK.framework/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ Headers/SMBlock.h - Dxtq5rOtaWwz0eEbWl8g0ru64e0= + INtbhkZuwtY/49rGKCx+kACwDfE= Headers/SMClearCache.h @@ -34,31 +34,35 @@ Headers/SMEventUser.h - PprSuPwu/zpUYDr9GSazrhjGN2A= + 8Cd2EHnpK4YNcLqI94D5+fm/jL0= Headers/SMEventUserLogin.h - tSckWKGnGIbAsggflb+ld/RCU1w= + W9j8jeSRkG2pqVehtka02sXpguw= Headers/SMEventUserLogout.h - TivwKd1Q3UwX3umYQSXmoS0V76o= + Y6qKNTUusCBr311+9V4fskeINXs= Headers/SMEventUserRegistration.h - 2KsXZ7rnCIVeKZvnVW4rgiVpFDw= + pviYcpwHxNdHXjcDpPuWv7mea44= Headers/SMEventUserUnregistration.h - 81dw15C8rmxURo7ZIjzv6imGskI= + ihWe0AlRnFeozBGyDDENLYSKXBY= Headers/SMFailure.h Kh4rFecr7WESNcprkgqpLR34EBA= + Headers/SMHelper+Location.h + + reTMXRAclxCgvZbrtsgo/SuhsPM= + Headers/SMHelper.h - crS140w3zAm9TLGsF+mmLWsp9Uk= + N43V04HF6AvPCTQVJ4hz+VTzSwE= Headers/SMInAppContentHTMLViewController.h @@ -78,7 +82,7 @@ Headers/SMInAppContentType.h - aMrxcC4PZQNKRNELhNw9yiyETPc= + 4ODoPwZeWTrKEstvUqcq8WKXJfk= Headers/SMInAppContentURLViewController.h @@ -86,7 +90,7 @@ Headers/SMInAppContentViewController.h - tmaLHzr6ucIAbNhRaJINeVGVNXk= + LhyLxcbJyxz06NwAZSCjGs8CXMA= Headers/SMInAppMessage.h @@ -102,7 +106,7 @@ Headers/SMLink.h - sUSCvd1M9p09xSoFCLRJ8JYTPao= + juktIw07ZswmrHgAv1bUixiNvuI= Headers/SMLog.h @@ -126,7 +130,7 @@ Headers/SMManager+Log.h - wXKuJCPM14zFeRbnwNLMh71gWpM= + /UEwMd++uLifjY7nUqlZdN2+L40= Headers/SMManager+RemoteNotification.h @@ -138,7 +142,7 @@ Headers/SMManager+SilentPush.h - VXIPHrLd/rcDBarLHxMDtHZLdU4= + Oo88Yu5Hen8Id9bxUgKhp7l+u44= Headers/SMManager+StyleOptions.h @@ -148,6 +152,10 @@ VeZhjK//8VyoTtEGWEV4/KEzJ34= + Headers/SMManager+ViewController.h + + 5+F3LBfcIB2e0XlTZa7lOv7Fe3g= + Headers/SMManager.h LgJtjPK807MfzGq5HHqLX999Shc= @@ -158,11 +166,15 @@ Headers/SMManagerInAppMessageDelegate.h - rGHqb+2b7G10/bY1zIN2KuLYs08= + 852o07y/yOKUd9MDAzxc64YV/o0= + + Headers/SMManagerSetting+Location.h + + EPtPs3mG7PugLofX6U6SYEWNfTc= Headers/SMManagerSetting.h - UEpb+9mqWAc5wfJXit5UDS92UNI= + FcqrXyfr2FE5y/c9EctIM2D01qM= Headers/SMManagerSettingIAC.h @@ -178,7 +190,7 @@ Headers/SMNSNotification.h - Tyz7aUVqclaKzgLtuhEFs3APh3c= + 66SnKBhCiuY+7hqgQe3508hkT88= Headers/SMNotificationAnnotationData.h @@ -190,7 +202,7 @@ Headers/SMNotificationButtonType.h - 2acQX8EEy0km+kHPLDFQ4VVVtRY= + +dYL0+UvUAxbXdQ2+NonUVJV+9Q= Headers/SMSuccess.h @@ -202,7 +214,7 @@ Info.plist - dKgfLGMOERhY5beaSKR5lOsJ+8k= + eFyNXHsi6bfAZKTHsCojmbXWDzA= Modules/module.modulemap @@ -226,11 +238,11 @@ hash - Dxtq5rOtaWwz0eEbWl8g0ru64e0= + INtbhkZuwtY/49rGKCx+kACwDfE= hash2 - /Kx/wkDj/29akVYzOrft2uSyzz0IyFUZiKbw96z3DpE= + Tot4+Abow71tWWrTbSEp3xt3PXn4GlfPEGTfKen6O1o= Headers/SMClearCache.h @@ -292,55 +304,55 @@ hash - PprSuPwu/zpUYDr9GSazrhjGN2A= + 8Cd2EHnpK4YNcLqI94D5+fm/jL0= hash2 - 5Qyf96vTd1oSG02oxb5l2QZDnzGf6p947YE+xFEZbdY= + KAKrEYAGEA//REMCx4np8gYlTfbVWyh7RNe9mKpamZw= Headers/SMEventUserLogin.h hash - tSckWKGnGIbAsggflb+ld/RCU1w= + W9j8jeSRkG2pqVehtka02sXpguw= hash2 - uo+13dVH1B+QsrAUK6aHpneVroOHX547viqG+2W5O80= + 7i54ED95jdp+HQDXaPfiazvR5MSkLOBJrmOGP+llJvU= Headers/SMEventUserLogout.h hash - TivwKd1Q3UwX3umYQSXmoS0V76o= + Y6qKNTUusCBr311+9V4fskeINXs= hash2 - FnGaHhnSngaw7gT9B/RnxOOT4y281ZhAZ2f07SuVTRA= + JdmhiD+wATc+CSQ5X1iQgmhl5nbz0UNLHgLG1IBmeAg= Headers/SMEventUserRegistration.h hash - 2KsXZ7rnCIVeKZvnVW4rgiVpFDw= + pviYcpwHxNdHXjcDpPuWv7mea44= hash2 - 1z3F8BzBjMb+ernkhKv2oYU/dx88SW8gXRp9pHjgvfk= + p1cdBO9fkJ455+N8tUFLDP+DGVvbNilOAs1WBJ/S5kc= Headers/SMEventUserUnregistration.h hash - 81dw15C8rmxURo7ZIjzv6imGskI= + ihWe0AlRnFeozBGyDDENLYSKXBY= hash2 - NA1DMFIU9x8rioukUY5VsS9YOYujkaSreobw9ap02MU= + 24z6NFalUTgdBxc3gQci6zVF5Ji4APjTigKZNeQHZZE= Headers/SMFailure.h @@ -354,15 +366,26 @@ Iyi1Yf8FshMbGAyXhQIPPN1I609J2FTNJVNW0QSTqSg= + Headers/SMHelper+Location.h + + hash + + reTMXRAclxCgvZbrtsgo/SuhsPM= + + hash2 + + qm2l8S3J9XiAw5ZtAt4qoB+0w//7rSzyL63uQpWA/zU= + + Headers/SMHelper.h hash - crS140w3zAm9TLGsF+mmLWsp9Uk= + N43V04HF6AvPCTQVJ4hz+VTzSwE= hash2 - t4ZotF7MYEEekDOh4awtO1U71gQGHQPzS0fm51QDDAM= + DsLNzQY8nBoaQX/0sONv9N1Gxfrt0tTzGFAWxmgpYCc= Headers/SMInAppContentHTMLViewController.h @@ -413,11 +436,11 @@ hash - aMrxcC4PZQNKRNELhNw9yiyETPc= + 4ODoPwZeWTrKEstvUqcq8WKXJfk= hash2 - LLz6RJnCH8i8pOHoRku4Gg9L54N1q1+qn10UwaLiklA= + H7xKGX3/D54OCBJaWlklBggMsN2HYyze5JnoGaSm6VI= Headers/SMInAppContentURLViewController.h @@ -435,11 +458,11 @@ hash - tmaLHzr6ucIAbNhRaJINeVGVNXk= + LhyLxcbJyxz06NwAZSCjGs8CXMA= hash2 - NdtxAEz/8v+DJjgVyi0Lw57ljrNtOQNJR0CkgS+sx7Y= + CTICIeVlMaRHl+VaepWYOzI9ht7dvwJWAqRmR0/Vkbw= Headers/SMInAppMessage.h @@ -479,11 +502,11 @@ hash - sUSCvd1M9p09xSoFCLRJ8JYTPao= + juktIw07ZswmrHgAv1bUixiNvuI= hash2 - WjSaCeztfWTxhiI+KNhK1fnhiTuwcgy5mL3QDRc1Gxo= + pB9yIA98Fb6Oj7J6Nawb32MrIHP0LCd0aeV54CQ7qgM= Headers/SMLog.h @@ -545,11 +568,11 @@ hash - wXKuJCPM14zFeRbnwNLMh71gWpM= + /UEwMd++uLifjY7nUqlZdN2+L40= hash2 - S5FQoG6a6FxY7j4qxP5eLIIkfyum5EW10612p7oy1eo= + qSI9oK0LtxfWjLgyeZLD0URImUa0WluoTbODpnxugvs= Headers/SMManager+RemoteNotification.h @@ -578,11 +601,11 @@ hash - VXIPHrLd/rcDBarLHxMDtHZLdU4= + Oo88Yu5Hen8Id9bxUgKhp7l+u44= hash2 - eHVRUb5b5X8KuVxuooshoG7etdKdbdm1cWEO2F/Wo3c= + QwcrdX+JL+Vmf6qIMHTXcBCatySaUSvG0rUEpcBqWEQ= Headers/SMManager+StyleOptions.h @@ -607,6 +630,17 @@ AiZU/vSxwpHnhQvDM/AFlLvXC15jOB+gIxzeIYR9XzA= + Headers/SMManager+ViewController.h + + hash + + 5+F3LBfcIB2e0XlTZa7lOv7Fe3g= + + hash2 + + DN2qVwYe4YjbcsBYRObRI/aPUhCT/8klIvuNF+cgW3M= + + Headers/SMManager.h hash @@ -633,22 +667,33 @@ hash - rGHqb+2b7G10/bY1zIN2KuLYs08= + 852o07y/yOKUd9MDAzxc64YV/o0= + + hash2 + + mVKJBgG7Gt+/ZXvC9RpbobCSZv4C+QDk9P1YAinhwss= + + + Headers/SMManagerSetting+Location.h + + hash + + EPtPs3mG7PugLofX6U6SYEWNfTc= hash2 - u85MLoP4TN1W/c1gAW1J+rUKqAEwqjqTrsE2q0Py6nM= + ybdKtgs4+B3Nw8yOXTygMDItmcQTG33ieRIbl84jv84= Headers/SMManagerSetting.h hash - UEpb+9mqWAc5wfJXit5UDS92UNI= + FcqrXyfr2FE5y/c9EctIM2D01qM= hash2 - p6vFpQoiSKri0uhRWPholIECWoft52wNIH0jsfolgDA= + cTWmsNeDMXNgsv8k1dAwOtdOOlg+ydo5OxCr6Hpm4YQ= Headers/SMManagerSettingIAC.h @@ -688,11 +733,11 @@ hash - Tyz7aUVqclaKzgLtuhEFs3APh3c= + 66SnKBhCiuY+7hqgQe3508hkT88= hash2 - 2hsPPuvYG21UY948A7tss/m7daSFtLdC1DYYNUJB7Ok= + OsN4GT80ZLuVBd4i12FNwxw02MWv6Nnxa1kl5ncZdas= Headers/SMNotificationAnnotationData.h @@ -721,11 +766,11 @@ hash - 2acQX8EEy0km+kHPLDFQ4VVVtRY= + +dYL0+UvUAxbXdQ2+NonUVJV+9Q= hash2 - lekbdj3kSoRTtaooAwcqeggInnT22k0F/GrFM+F1qSA= + dkiNCOo9Gowv/vK1gUFIxh6LYakE7KKvtZJs7zQZgCU= Headers/SMSuccess.h diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMBlock.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMBlock.h index 60c84d9..cf27fb8 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMBlock.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMBlock.h @@ -18,4 +18,4 @@ typedef void(^SMCompletionBlockSuccess)(SMSuccess *success); * @typedef type of block that will be triggered when an event has failed to be sent * @param failure a SMFailure failure */ -typedef void(^SMCompletionBlockFailure)(SMFailure *failure); \ No newline at end of file +typedef void(^SMCompletionBlockFailure)(SMFailure *failure); diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUser.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUser.h index b2e5d8f..0dc4375 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUser.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUser.h @@ -9,7 +9,6 @@ #import "SMEvent.h" /*! - * @inherits SMEvent * @discussion Class representing all User-eventing * Instances of this class should not be directly created. * Please use children classes instead. diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h index 030614b..51b0ace 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogin.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogin - * @inherits SMEventUser - * @discussion user login event class + * @discussion User login event class * #SMEventUserLogin:# */ @interface SMEventUserLogin : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h index 5ff4ef8..b82383f 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserLogout.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogout - * @inherits SMEventUser - * @discussion user logout event class + * @discussion User logout event class * #SMEventUserLogout:# */ @interface SMEventUserLogout : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h index 7b0efd5..53cc6ef 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserRegistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserRegistration - * @inherits SMEventUser - * @discussion user registration event class + * @discussion User registration event class * #SMEventUserRegistration:# */ @interface SMEventUserRegistration : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h index 4c41f97..6c02856 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMEventUserUnregistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserUnregistration - * @inherits SMEventUser - * @discussion user unregistration event class + * @discussion User unregistration event class * #SMEventUserUnregistration:# */ @interface SMEventUserUnregistration : SMEventUser diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMHelper.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMHelper.h index d4e62da..20e2129 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMHelper.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMHelper.h @@ -27,6 +27,7 @@ #import "SMManager+SMEvent.h" #import "SMManager+Log.h" #import "SMManager+StyleOptions.h" +#import "SMManager+ViewController.h" #import "SMManagerInAppMessageDelegate.h" diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentType.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentType.h index 09667eb..f2165c0 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentType.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentType.h @@ -33,4 +33,4 @@ typedef NS_OPTIONS (NSInteger, SMInAppContentType) { kSMInAppContentType_Image = 3 -}; \ No newline at end of file +}; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h index 9d1d66e..2743081 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMInAppContentViewController.h @@ -31,4 +31,4 @@ @property (nonatomic) bool isEmpty; -@end \ No newline at end of file +@end diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMLink.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMLink.h index 950ff58..896187d 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMLink.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMLink.h @@ -35,7 +35,7 @@ /*! * The type (SMNotificationButtonType) of action that the button will execute. - * @see SMNotificationButtonType for more information about each type + * @see SMNotificationButtonType */ @property (nonatomic) SMNotificationButtonType type; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+Log.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+Log.h index fae50c1..9c20b2a 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+Log.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+Log.h @@ -28,7 +28,7 @@ * @discussion This is an optional setting that may help you debug the library calls. * This call can be done at any time (before or after starting the library). * However, in order to avoid missing any error log, we recommand setting this value before starting the library. - * @param logLevel SMLogLevel enumeration type. Default = kSMLoLevel_None + * @param logLevel SMLogLevel enumeration type. Default = kSMLogLevel_None * @warning It is developer's responsability to enable log-level in Debug or release mode. * No distinction are being aplied by the library. * For obvious performance reason, it is always recommended to turn log off in release mode. diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h index 9bbcce4..2cf8a2e 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+SilentPush.h @@ -40,7 +40,7 @@ * @param completionHandler The block-completion to be processed after the download. Provided by the delegate call * @discussion It is recommended to use this API over didReceiveRemoteNotification: as it handles silent-remote-notificaitons. * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; @@ -56,7 +56,7 @@ * Use it only if your application need to overide the service. * Otherwise, please use didReceiveRemoteNotification:fetchCompletionHandler: * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler ForceResultFetch:(UIBackgroundFetchResult)resultFetch; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h new file mode 100644 index 0000000..661f187 --- /dev/null +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManager+ViewController.h @@ -0,0 +1,47 @@ +// +// SMManager+ViewController.h +// MobileSDK +// +// Created by Gauthier Dumont on 07/07/15. +// Copyright (c) 2015 Selligent. All rights reserved. +// + +/** + * This category will help our SDK making the WKWebView navigation buttons enabled/disabled when needed, if inAppMessageWKNavigationDelegate is set. + * + * #SMManager+ViewController :# + */ +@interface SMManager (ViewController) + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly and log the error when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + * @param error The NSError from the WKNavigationDelegate. + */ +- (void) webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate + */ +- (void) webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + */ +- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation; + +@end + + + diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h index 6f14ce5..788556c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerInAppMessageDelegate.h @@ -11,6 +11,11 @@ NS_ASSUME_NONNULL_BEGIN +/** + * This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later. + * + * #SMManagerInAppMessageDelegate :# + */ @protocol SMManagerInAppMessageDelegate @optional diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerSetting.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerSetting.h index 75ca46f..d679d0c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerSetting.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMManagerSetting.h @@ -149,14 +149,4 @@ */ - (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC*)settingIAC; -/** - * @discussion This call is optional. It is not needed to successfully start the SDK. - * This call is useless if the sdk version is not the one associated to the plotproject framework - * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. - * It is the first step to inform the sdk that geo location services are going to be used by the - * - * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library - */ -- (void)configureLocationService; - @end diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNSNotification.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNSNotification.h index 854470f..55274aa 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNSNotification.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNSNotification.h @@ -6,7 +6,7 @@ /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted when the user interacts with a remote-notification - * Usefull to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. + * Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. */ extern NSString* kSMNotification_Event_ButtonClicked; @@ -21,7 +21,7 @@ extern NSString* kSMNotification_Event_WillDisplayNotification; /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification - * Primary-application may use this notification to resume any paused work. (see kSMNotification_Event_WillDisplayNotification) + * Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification). */ extern NSString* kSMNotification_Event_WillDismissNotification; diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h index 59a7832..9ed0e0c 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Headers/SMNotificationButtonType.h @@ -8,7 +8,7 @@ /*! - * This enumeration declares all known buttun-type + * This enumeration declares all known button-type */ typedef NS_ENUM(NSInteger, SMNotificationButtonType) { /*! diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Info.plist b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Info.plist index 131f63c..f867f75 100644 Binary files a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Info.plist and b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/Info.plist differ diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/SelligentMobileSDK b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/SelligentMobileSDK old mode 100755 new mode 100644 index 40985a1..ea05935 Binary files a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/SelligentMobileSDK and b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/SelligentMobileSDK differ diff --git a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/_CodeSignature/CodeResources b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/_CodeSignature/CodeResources index a20bc97..fc26224 100644 --- a/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/_CodeSignature/CodeResources +++ b/iOS Framework/SelligentMobileSDK.xcframework/ios-arm64_i386_x86_64-simulator/SelligentMobileSDK.framework/_CodeSignature/CodeResources @@ -10,7 +10,7 @@ Headers/SMBlock.h - Dxtq5rOtaWwz0eEbWl8g0ru64e0= + INtbhkZuwtY/49rGKCx+kACwDfE= Headers/SMClearCache.h @@ -34,31 +34,35 @@ Headers/SMEventUser.h - PprSuPwu/zpUYDr9GSazrhjGN2A= + 8Cd2EHnpK4YNcLqI94D5+fm/jL0= Headers/SMEventUserLogin.h - tSckWKGnGIbAsggflb+ld/RCU1w= + W9j8jeSRkG2pqVehtka02sXpguw= Headers/SMEventUserLogout.h - TivwKd1Q3UwX3umYQSXmoS0V76o= + Y6qKNTUusCBr311+9V4fskeINXs= Headers/SMEventUserRegistration.h - 2KsXZ7rnCIVeKZvnVW4rgiVpFDw= + pviYcpwHxNdHXjcDpPuWv7mea44= Headers/SMEventUserUnregistration.h - 81dw15C8rmxURo7ZIjzv6imGskI= + ihWe0AlRnFeozBGyDDENLYSKXBY= Headers/SMFailure.h Kh4rFecr7WESNcprkgqpLR34EBA= + Headers/SMHelper+Location.h + + reTMXRAclxCgvZbrtsgo/SuhsPM= + Headers/SMHelper.h - crS140w3zAm9TLGsF+mmLWsp9Uk= + N43V04HF6AvPCTQVJ4hz+VTzSwE= Headers/SMInAppContentHTMLViewController.h @@ -78,7 +82,7 @@ Headers/SMInAppContentType.h - aMrxcC4PZQNKRNELhNw9yiyETPc= + 4ODoPwZeWTrKEstvUqcq8WKXJfk= Headers/SMInAppContentURLViewController.h @@ -86,7 +90,7 @@ Headers/SMInAppContentViewController.h - tmaLHzr6ucIAbNhRaJINeVGVNXk= + LhyLxcbJyxz06NwAZSCjGs8CXMA= Headers/SMInAppMessage.h @@ -102,7 +106,7 @@ Headers/SMLink.h - sUSCvd1M9p09xSoFCLRJ8JYTPao= + juktIw07ZswmrHgAv1bUixiNvuI= Headers/SMLog.h @@ -126,7 +130,7 @@ Headers/SMManager+Log.h - wXKuJCPM14zFeRbnwNLMh71gWpM= + /UEwMd++uLifjY7nUqlZdN2+L40= Headers/SMManager+RemoteNotification.h @@ -138,7 +142,7 @@ Headers/SMManager+SilentPush.h - VXIPHrLd/rcDBarLHxMDtHZLdU4= + Oo88Yu5Hen8Id9bxUgKhp7l+u44= Headers/SMManager+StyleOptions.h @@ -148,6 +152,10 @@ VeZhjK//8VyoTtEGWEV4/KEzJ34= + Headers/SMManager+ViewController.h + + 5+F3LBfcIB2e0XlTZa7lOv7Fe3g= + Headers/SMManager.h LgJtjPK807MfzGq5HHqLX999Shc= @@ -158,11 +166,15 @@ Headers/SMManagerInAppMessageDelegate.h - rGHqb+2b7G10/bY1zIN2KuLYs08= + 852o07y/yOKUd9MDAzxc64YV/o0= + + Headers/SMManagerSetting+Location.h + + EPtPs3mG7PugLofX6U6SYEWNfTc= Headers/SMManagerSetting.h - UEpb+9mqWAc5wfJXit5UDS92UNI= + FcqrXyfr2FE5y/c9EctIM2D01qM= Headers/SMManagerSettingIAC.h @@ -178,7 +190,7 @@ Headers/SMNSNotification.h - Tyz7aUVqclaKzgLtuhEFs3APh3c= + 66SnKBhCiuY+7hqgQe3508hkT88= Headers/SMNotificationAnnotationData.h @@ -190,7 +202,7 @@ Headers/SMNotificationButtonType.h - 2acQX8EEy0km+kHPLDFQ4VVVtRY= + +dYL0+UvUAxbXdQ2+NonUVJV+9Q= Headers/SMSuccess.h @@ -202,7 +214,7 @@ Info.plist - gjdKM4s1y32zA6ZPbofyKTJvoWc= + F/zpw4ajsUiUUyA0vD60oU3+lRQ= Modules/module.modulemap @@ -226,11 +238,11 @@ hash - Dxtq5rOtaWwz0eEbWl8g0ru64e0= + INtbhkZuwtY/49rGKCx+kACwDfE= hash2 - /Kx/wkDj/29akVYzOrft2uSyzz0IyFUZiKbw96z3DpE= + Tot4+Abow71tWWrTbSEp3xt3PXn4GlfPEGTfKen6O1o= Headers/SMClearCache.h @@ -292,55 +304,55 @@ hash - PprSuPwu/zpUYDr9GSazrhjGN2A= + 8Cd2EHnpK4YNcLqI94D5+fm/jL0= hash2 - 5Qyf96vTd1oSG02oxb5l2QZDnzGf6p947YE+xFEZbdY= + KAKrEYAGEA//REMCx4np8gYlTfbVWyh7RNe9mKpamZw= Headers/SMEventUserLogin.h hash - tSckWKGnGIbAsggflb+ld/RCU1w= + W9j8jeSRkG2pqVehtka02sXpguw= hash2 - uo+13dVH1B+QsrAUK6aHpneVroOHX547viqG+2W5O80= + 7i54ED95jdp+HQDXaPfiazvR5MSkLOBJrmOGP+llJvU= Headers/SMEventUserLogout.h hash - TivwKd1Q3UwX3umYQSXmoS0V76o= + Y6qKNTUusCBr311+9V4fskeINXs= hash2 - FnGaHhnSngaw7gT9B/RnxOOT4y281ZhAZ2f07SuVTRA= + JdmhiD+wATc+CSQ5X1iQgmhl5nbz0UNLHgLG1IBmeAg= Headers/SMEventUserRegistration.h hash - 2KsXZ7rnCIVeKZvnVW4rgiVpFDw= + pviYcpwHxNdHXjcDpPuWv7mea44= hash2 - 1z3F8BzBjMb+ernkhKv2oYU/dx88SW8gXRp9pHjgvfk= + p1cdBO9fkJ455+N8tUFLDP+DGVvbNilOAs1WBJ/S5kc= Headers/SMEventUserUnregistration.h hash - 81dw15C8rmxURo7ZIjzv6imGskI= + ihWe0AlRnFeozBGyDDENLYSKXBY= hash2 - NA1DMFIU9x8rioukUY5VsS9YOYujkaSreobw9ap02MU= + 24z6NFalUTgdBxc3gQci6zVF5Ji4APjTigKZNeQHZZE= Headers/SMFailure.h @@ -354,15 +366,26 @@ Iyi1Yf8FshMbGAyXhQIPPN1I609J2FTNJVNW0QSTqSg= + Headers/SMHelper+Location.h + + hash + + reTMXRAclxCgvZbrtsgo/SuhsPM= + + hash2 + + qm2l8S3J9XiAw5ZtAt4qoB+0w//7rSzyL63uQpWA/zU= + + Headers/SMHelper.h hash - crS140w3zAm9TLGsF+mmLWsp9Uk= + N43V04HF6AvPCTQVJ4hz+VTzSwE= hash2 - t4ZotF7MYEEekDOh4awtO1U71gQGHQPzS0fm51QDDAM= + DsLNzQY8nBoaQX/0sONv9N1Gxfrt0tTzGFAWxmgpYCc= Headers/SMInAppContentHTMLViewController.h @@ -413,11 +436,11 @@ hash - aMrxcC4PZQNKRNELhNw9yiyETPc= + 4ODoPwZeWTrKEstvUqcq8WKXJfk= hash2 - LLz6RJnCH8i8pOHoRku4Gg9L54N1q1+qn10UwaLiklA= + H7xKGX3/D54OCBJaWlklBggMsN2HYyze5JnoGaSm6VI= Headers/SMInAppContentURLViewController.h @@ -435,11 +458,11 @@ hash - tmaLHzr6ucIAbNhRaJINeVGVNXk= + LhyLxcbJyxz06NwAZSCjGs8CXMA= hash2 - NdtxAEz/8v+DJjgVyi0Lw57ljrNtOQNJR0CkgS+sx7Y= + CTICIeVlMaRHl+VaepWYOzI9ht7dvwJWAqRmR0/Vkbw= Headers/SMInAppMessage.h @@ -479,11 +502,11 @@ hash - sUSCvd1M9p09xSoFCLRJ8JYTPao= + juktIw07ZswmrHgAv1bUixiNvuI= hash2 - WjSaCeztfWTxhiI+KNhK1fnhiTuwcgy5mL3QDRc1Gxo= + pB9yIA98Fb6Oj7J6Nawb32MrIHP0LCd0aeV54CQ7qgM= Headers/SMLog.h @@ -545,11 +568,11 @@ hash - wXKuJCPM14zFeRbnwNLMh71gWpM= + /UEwMd++uLifjY7nUqlZdN2+L40= hash2 - S5FQoG6a6FxY7j4qxP5eLIIkfyum5EW10612p7oy1eo= + qSI9oK0LtxfWjLgyeZLD0URImUa0WluoTbODpnxugvs= Headers/SMManager+RemoteNotification.h @@ -578,11 +601,11 @@ hash - VXIPHrLd/rcDBarLHxMDtHZLdU4= + Oo88Yu5Hen8Id9bxUgKhp7l+u44= hash2 - eHVRUb5b5X8KuVxuooshoG7etdKdbdm1cWEO2F/Wo3c= + QwcrdX+JL+Vmf6qIMHTXcBCatySaUSvG0rUEpcBqWEQ= Headers/SMManager+StyleOptions.h @@ -607,6 +630,17 @@ AiZU/vSxwpHnhQvDM/AFlLvXC15jOB+gIxzeIYR9XzA= + Headers/SMManager+ViewController.h + + hash + + 5+F3LBfcIB2e0XlTZa7lOv7Fe3g= + + hash2 + + DN2qVwYe4YjbcsBYRObRI/aPUhCT/8klIvuNF+cgW3M= + + Headers/SMManager.h hash @@ -633,22 +667,33 @@ hash - rGHqb+2b7G10/bY1zIN2KuLYs08= + 852o07y/yOKUd9MDAzxc64YV/o0= + + hash2 + + mVKJBgG7Gt+/ZXvC9RpbobCSZv4C+QDk9P1YAinhwss= + + + Headers/SMManagerSetting+Location.h + + hash + + EPtPs3mG7PugLofX6U6SYEWNfTc= hash2 - u85MLoP4TN1W/c1gAW1J+rUKqAEwqjqTrsE2q0Py6nM= + ybdKtgs4+B3Nw8yOXTygMDItmcQTG33ieRIbl84jv84= Headers/SMManagerSetting.h hash - UEpb+9mqWAc5wfJXit5UDS92UNI= + FcqrXyfr2FE5y/c9EctIM2D01qM= hash2 - p6vFpQoiSKri0uhRWPholIECWoft52wNIH0jsfolgDA= + cTWmsNeDMXNgsv8k1dAwOtdOOlg+ydo5OxCr6Hpm4YQ= Headers/SMManagerSettingIAC.h @@ -688,11 +733,11 @@ hash - Tyz7aUVqclaKzgLtuhEFs3APh3c= + 66SnKBhCiuY+7hqgQe3508hkT88= hash2 - 2hsPPuvYG21UY948A7tss/m7daSFtLdC1DYYNUJB7Ok= + OsN4GT80ZLuVBd4i12FNwxw02MWv6Nnxa1kl5ncZdas= Headers/SMNotificationAnnotationData.h @@ -721,11 +766,11 @@ hash - 2acQX8EEy0km+kHPLDFQ4VVVtRY= + +dYL0+UvUAxbXdQ2+NonUVJV+9Q= hash2 - lekbdj3kSoRTtaooAwcqeggInnT22k0F/GrFM+F1qSA= + dkiNCOo9Gowv/vK1gUFIxh6LYakE7KKvtZJs7zQZgCU= Headers/SMSuccess.h diff --git a/iOS Lib- Plot geofencing support/include/SMBlock.h b/iOS Lib- Plot geofencing support/include/SMBlock.h index 60c84d9..cf27fb8 100644 --- a/iOS Lib- Plot geofencing support/include/SMBlock.h +++ b/iOS Lib- Plot geofencing support/include/SMBlock.h @@ -18,4 +18,4 @@ typedef void(^SMCompletionBlockSuccess)(SMSuccess *success); * @typedef type of block that will be triggered when an event has failed to be sent * @param failure a SMFailure failure */ -typedef void(^SMCompletionBlockFailure)(SMFailure *failure); \ No newline at end of file +typedef void(^SMCompletionBlockFailure)(SMFailure *failure); diff --git a/iOS Lib- Plot geofencing support/include/SMEventUser.h b/iOS Lib- Plot geofencing support/include/SMEventUser.h index b2e5d8f..0dc4375 100644 --- a/iOS Lib- Plot geofencing support/include/SMEventUser.h +++ b/iOS Lib- Plot geofencing support/include/SMEventUser.h @@ -9,7 +9,6 @@ #import "SMEvent.h" /*! - * @inherits SMEvent * @discussion Class representing all User-eventing * Instances of this class should not be directly created. * Please use children classes instead. diff --git a/iOS Lib- Plot geofencing support/include/SMEventUserLogin.h b/iOS Lib- Plot geofencing support/include/SMEventUserLogin.h index 030614b..51b0ace 100644 --- a/iOS Lib- Plot geofencing support/include/SMEventUserLogin.h +++ b/iOS Lib- Plot geofencing support/include/SMEventUserLogin.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogin - * @inherits SMEventUser - * @discussion user login event class + * @discussion User login event class * #SMEventUserLogin:# */ @interface SMEventUserLogin : SMEventUser diff --git a/iOS Lib- Plot geofencing support/include/SMEventUserLogout.h b/iOS Lib- Plot geofencing support/include/SMEventUserLogout.h index 5ff4ef8..b82383f 100644 --- a/iOS Lib- Plot geofencing support/include/SMEventUserLogout.h +++ b/iOS Lib- Plot geofencing support/include/SMEventUserLogout.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogout - * @inherits SMEventUser - * @discussion user logout event class + * @discussion User logout event class * #SMEventUserLogout:# */ @interface SMEventUserLogout : SMEventUser diff --git a/iOS Lib- Plot geofencing support/include/SMEventUserRegistration.h b/iOS Lib- Plot geofencing support/include/SMEventUserRegistration.h index 7b0efd5..53cc6ef 100644 --- a/iOS Lib- Plot geofencing support/include/SMEventUserRegistration.h +++ b/iOS Lib- Plot geofencing support/include/SMEventUserRegistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserRegistration - * @inherits SMEventUser - * @discussion user registration event class + * @discussion User registration event class * #SMEventUserRegistration:# */ @interface SMEventUserRegistration : SMEventUser diff --git a/iOS Lib- Plot geofencing support/include/SMEventUserUnregistration.h b/iOS Lib- Plot geofencing support/include/SMEventUserUnregistration.h index 4c41f97..6c02856 100644 --- a/iOS Lib- Plot geofencing support/include/SMEventUserUnregistration.h +++ b/iOS Lib- Plot geofencing support/include/SMEventUserUnregistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserUnregistration - * @inherits SMEventUser - * @discussion user unregistration event class + * @discussion User unregistration event class * #SMEventUserUnregistration:# */ @interface SMEventUserUnregistration : SMEventUser diff --git a/iOS Lib- Plot geofencing support/include/SMHelper.h b/iOS Lib- Plot geofencing support/include/SMHelper.h index e50e283..06dbaac 100644 --- a/iOS Lib- Plot geofencing support/include/SMHelper.h +++ b/iOS Lib- Plot geofencing support/include/SMHelper.h @@ -1,11 +1,13 @@ // -// SMHelper.h +// SMHelper+Location.h // MobileSDK // -// Created by Samy Ziat on 29/09/15. -// Copyright (c) 2015 Selligent. All rights reserved. +// Created by Marc Biosca on 6/29/21. +// Copyright © 2021 Selligent. All rights reserved. // +#import "SMManager+Location.h" +#import "SMManagerSetting+Location.h" #import "SMManagerHelper.h" @@ -18,8 +20,6 @@ #import "SMManagerSettingIAM.h" #import "SMManagerSettingIAC.h" -#import "SMManager+Location.h" - #import "SMManager+DataTransaction.h" #import "SMManager+RemoteNotification.h" #import "SMManager+UserNotification.h" diff --git a/iOS Lib- Plot geofencing support/include/SMInAppContentType.h b/iOS Lib- Plot geofencing support/include/SMInAppContentType.h index 09667eb..f2165c0 100644 --- a/iOS Lib- Plot geofencing support/include/SMInAppContentType.h +++ b/iOS Lib- Plot geofencing support/include/SMInAppContentType.h @@ -33,4 +33,4 @@ typedef NS_OPTIONS (NSInteger, SMInAppContentType) { kSMInAppContentType_Image = 3 -}; \ No newline at end of file +}; diff --git a/iOS Lib- Plot geofencing support/include/SMInAppContentViewController.h b/iOS Lib- Plot geofencing support/include/SMInAppContentViewController.h index 9d1d66e..2743081 100644 --- a/iOS Lib- Plot geofencing support/include/SMInAppContentViewController.h +++ b/iOS Lib- Plot geofencing support/include/SMInAppContentViewController.h @@ -31,4 +31,4 @@ @property (nonatomic) bool isEmpty; -@end \ No newline at end of file +@end diff --git a/iOS Lib- Plot geofencing support/include/SMLink.h b/iOS Lib- Plot geofencing support/include/SMLink.h index 950ff58..896187d 100644 --- a/iOS Lib- Plot geofencing support/include/SMLink.h +++ b/iOS Lib- Plot geofencing support/include/SMLink.h @@ -35,7 +35,7 @@ /*! * The type (SMNotificationButtonType) of action that the button will execute. - * @see SMNotificationButtonType for more information about each type + * @see SMNotificationButtonType */ @property (nonatomic) SMNotificationButtonType type; diff --git a/iOS Lib- Plot geofencing support/include/SMManager+Log.h b/iOS Lib- Plot geofencing support/include/SMManager+Log.h index fae50c1..9c20b2a 100644 --- a/iOS Lib- Plot geofencing support/include/SMManager+Log.h +++ b/iOS Lib- Plot geofencing support/include/SMManager+Log.h @@ -28,7 +28,7 @@ * @discussion This is an optional setting that may help you debug the library calls. * This call can be done at any time (before or after starting the library). * However, in order to avoid missing any error log, we recommand setting this value before starting the library. - * @param logLevel SMLogLevel enumeration type. Default = kSMLoLevel_None + * @param logLevel SMLogLevel enumeration type. Default = kSMLogLevel_None * @warning It is developer's responsability to enable log-level in Debug or release mode. * No distinction are being aplied by the library. * For obvious performance reason, it is always recommended to turn log off in release mode. diff --git a/iOS Lib- Plot geofencing support/include/SMManager+SilentPush.h b/iOS Lib- Plot geofencing support/include/SMManager+SilentPush.h index 9bbcce4..2cf8a2e 100644 --- a/iOS Lib- Plot geofencing support/include/SMManager+SilentPush.h +++ b/iOS Lib- Plot geofencing support/include/SMManager+SilentPush.h @@ -40,7 +40,7 @@ * @param completionHandler The block-completion to be processed after the download. Provided by the delegate call * @discussion It is recommended to use this API over didReceiveRemoteNotification: as it handles silent-remote-notificaitons. * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; @@ -56,7 +56,7 @@ * Use it only if your application need to overide the service. * Otherwise, please use didReceiveRemoteNotification:fetchCompletionHandler: * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler ForceResultFetch:(UIBackgroundFetchResult)resultFetch; diff --git a/iOS Lib- Plot geofencing support/include/SMManager+ViewController.h b/iOS Lib- Plot geofencing support/include/SMManager+ViewController.h new file mode 100644 index 0000000..661f187 --- /dev/null +++ b/iOS Lib- Plot geofencing support/include/SMManager+ViewController.h @@ -0,0 +1,47 @@ +// +// SMManager+ViewController.h +// MobileSDK +// +// Created by Gauthier Dumont on 07/07/15. +// Copyright (c) 2015 Selligent. All rights reserved. +// + +/** + * This category will help our SDK making the WKWebView navigation buttons enabled/disabled when needed, if inAppMessageWKNavigationDelegate is set. + * + * #SMManager+ViewController :# + */ +@interface SMManager (ViewController) + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly and log the error when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + * @param error The NSError from the WKNavigationDelegate. + */ +- (void) webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate + */ +- (void) webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + */ +- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation; + +@end + + + diff --git a/iOS Lib- Plot geofencing support/include/SMManagerInAppMessageDelegate.h b/iOS Lib- Plot geofencing support/include/SMManagerInAppMessageDelegate.h index 6f14ce5..788556c 100644 --- a/iOS Lib- Plot geofencing support/include/SMManagerInAppMessageDelegate.h +++ b/iOS Lib- Plot geofencing support/include/SMManagerInAppMessageDelegate.h @@ -11,6 +11,11 @@ NS_ASSUME_NONNULL_BEGIN +/** + * This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later. + * + * #SMManagerInAppMessageDelegate :# + */ @protocol SMManagerInAppMessageDelegate @optional diff --git a/iOS Lib- Plot geofencing support/include/SMManagerSetting+Location.h b/iOS Lib- Plot geofencing support/include/SMManagerSetting+Location.h new file mode 100644 index 0000000..078c5a1 --- /dev/null +++ b/iOS Lib- Plot geofencing support/include/SMManagerSetting+Location.h @@ -0,0 +1,28 @@ +// +// SMManagerSetting+Location.h +// MobileSDK +// +// Created by Marc Biosca on 6/28/21. +// Copyright © 2021 Selligent. All rights reserved. +// + +#import "SMManagerSetting.h" + +/** + * This category will help you to enable the geolocation service. + * + * #SMManagerSetting+Location :# + */ +@interface SMManagerSetting (Location) + +/** + * @discussion This call is optional. It is not needed to successfully start the SDK. + * This call is useless if the sdk version is not the one associated to the plotproject framework + * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. + * It is the first step to inform the sdk that geo location services are going to be used by the + * + * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library + */ +- (void)configureLocationService; + +@end diff --git a/iOS Lib- Plot geofencing support/include/SMManagerSetting.h b/iOS Lib- Plot geofencing support/include/SMManagerSetting.h index 75ca46f..d679d0c 100644 --- a/iOS Lib- Plot geofencing support/include/SMManagerSetting.h +++ b/iOS Lib- Plot geofencing support/include/SMManagerSetting.h @@ -149,14 +149,4 @@ */ - (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC*)settingIAC; -/** - * @discussion This call is optional. It is not needed to successfully start the SDK. - * This call is useless if the sdk version is not the one associated to the plotproject framework - * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. - * It is the first step to inform the sdk that geo location services are going to be used by the - * - * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library - */ -- (void)configureLocationService; - @end diff --git a/iOS Lib- Plot geofencing support/include/SMNSNotification.h b/iOS Lib- Plot geofencing support/include/SMNSNotification.h index 854470f..55274aa 100644 --- a/iOS Lib- Plot geofencing support/include/SMNSNotification.h +++ b/iOS Lib- Plot geofencing support/include/SMNSNotification.h @@ -6,7 +6,7 @@ /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted when the user interacts with a remote-notification - * Usefull to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. + * Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. */ extern NSString* kSMNotification_Event_ButtonClicked; @@ -21,7 +21,7 @@ extern NSString* kSMNotification_Event_WillDisplayNotification; /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification - * Primary-application may use this notification to resume any paused work. (see kSMNotification_Event_WillDisplayNotification) + * Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification). */ extern NSString* kSMNotification_Event_WillDismissNotification; diff --git a/iOS Lib- Plot geofencing support/include/SMNotificationButtonType.h b/iOS Lib- Plot geofencing support/include/SMNotificationButtonType.h index 59a7832..9ed0e0c 100644 --- a/iOS Lib- Plot geofencing support/include/SMNotificationButtonType.h +++ b/iOS Lib- Plot geofencing support/include/SMNotificationButtonType.h @@ -8,7 +8,7 @@ /*! - * This enumeration declares all known buttun-type + * This enumeration declares all known button-type */ typedef NS_ENUM(NSInteger, SMNotificationButtonType) { /*! diff --git a/iOS Lib- Plot geofencing support/libSelligentMobile.a b/iOS Lib- Plot geofencing support/libSelligentMobile.a index f67b598..d976a01 100644 Binary files a/iOS Lib- Plot geofencing support/libSelligentMobile.a and b/iOS Lib- Plot geofencing support/libSelligentMobile.a differ diff --git a/iOS Lib/include/SMBlock.h b/iOS Lib/include/SMBlock.h index 60c84d9..cf27fb8 100644 --- a/iOS Lib/include/SMBlock.h +++ b/iOS Lib/include/SMBlock.h @@ -18,4 +18,4 @@ typedef void(^SMCompletionBlockSuccess)(SMSuccess *success); * @typedef type of block that will be triggered when an event has failed to be sent * @param failure a SMFailure failure */ -typedef void(^SMCompletionBlockFailure)(SMFailure *failure); \ No newline at end of file +typedef void(^SMCompletionBlockFailure)(SMFailure *failure); diff --git a/iOS Lib/include/SMEventUser.h b/iOS Lib/include/SMEventUser.h index b2e5d8f..0dc4375 100644 --- a/iOS Lib/include/SMEventUser.h +++ b/iOS Lib/include/SMEventUser.h @@ -9,7 +9,6 @@ #import "SMEvent.h" /*! - * @inherits SMEvent * @discussion Class representing all User-eventing * Instances of this class should not be directly created. * Please use children classes instead. diff --git a/iOS Lib/include/SMEventUserLogin.h b/iOS Lib/include/SMEventUserLogin.h index 030614b..51b0ace 100644 --- a/iOS Lib/include/SMEventUserLogin.h +++ b/iOS Lib/include/SMEventUserLogin.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogin - * @inherits SMEventUser - * @discussion user login event class + * @discussion User login event class * #SMEventUserLogin:# */ @interface SMEventUserLogin : SMEventUser diff --git a/iOS Lib/include/SMEventUserLogout.h b/iOS Lib/include/SMEventUserLogout.h index 5ff4ef8..b82383f 100644 --- a/iOS Lib/include/SMEventUserLogout.h +++ b/iOS Lib/include/SMEventUserLogout.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserLogout - * @inherits SMEventUser - * @discussion user logout event class + * @discussion User logout event class * #SMEventUserLogout:# */ @interface SMEventUserLogout : SMEventUser diff --git a/iOS Lib/include/SMEventUserRegistration.h b/iOS Lib/include/SMEventUserRegistration.h index 7b0efd5..53cc6ef 100644 --- a/iOS Lib/include/SMEventUserRegistration.h +++ b/iOS Lib/include/SMEventUserRegistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserRegistration - * @inherits SMEventUser - * @discussion user registration event class + * @discussion User registration event class * #SMEventUserRegistration:# */ @interface SMEventUserRegistration : SMEventUser diff --git a/iOS Lib/include/SMEventUserUnregistration.h b/iOS Lib/include/SMEventUserUnregistration.h index 4c41f97..6c02856 100644 --- a/iOS Lib/include/SMEventUserUnregistration.h +++ b/iOS Lib/include/SMEventUserUnregistration.h @@ -9,9 +9,7 @@ #import "SMEventUser.h" /*! - * @class SMEventUserUnregistration - * @inherits SMEventUser - * @discussion user unregistration event class + * @discussion User unregistration event class * #SMEventUserUnregistration:# */ @interface SMEventUserUnregistration : SMEventUser diff --git a/iOS Lib/include/SMHelper.h b/iOS Lib/include/SMHelper.h index d4e62da..20e2129 100644 --- a/iOS Lib/include/SMHelper.h +++ b/iOS Lib/include/SMHelper.h @@ -27,6 +27,7 @@ #import "SMManager+SMEvent.h" #import "SMManager+Log.h" #import "SMManager+StyleOptions.h" +#import "SMManager+ViewController.h" #import "SMManagerInAppMessageDelegate.h" diff --git a/iOS Lib/include/SMInAppContentType.h b/iOS Lib/include/SMInAppContentType.h index 09667eb..f2165c0 100644 --- a/iOS Lib/include/SMInAppContentType.h +++ b/iOS Lib/include/SMInAppContentType.h @@ -33,4 +33,4 @@ typedef NS_OPTIONS (NSInteger, SMInAppContentType) { kSMInAppContentType_Image = 3 -}; \ No newline at end of file +}; diff --git a/iOS Lib/include/SMInAppContentViewController.h b/iOS Lib/include/SMInAppContentViewController.h index 9d1d66e..2743081 100644 --- a/iOS Lib/include/SMInAppContentViewController.h +++ b/iOS Lib/include/SMInAppContentViewController.h @@ -31,4 +31,4 @@ @property (nonatomic) bool isEmpty; -@end \ No newline at end of file +@end diff --git a/iOS Lib/include/SMLink.h b/iOS Lib/include/SMLink.h index 950ff58..896187d 100644 --- a/iOS Lib/include/SMLink.h +++ b/iOS Lib/include/SMLink.h @@ -35,7 +35,7 @@ /*! * The type (SMNotificationButtonType) of action that the button will execute. - * @see SMNotificationButtonType for more information about each type + * @see SMNotificationButtonType */ @property (nonatomic) SMNotificationButtonType type; diff --git a/iOS Lib/include/SMManager+Log.h b/iOS Lib/include/SMManager+Log.h index fae50c1..9c20b2a 100644 --- a/iOS Lib/include/SMManager+Log.h +++ b/iOS Lib/include/SMManager+Log.h @@ -28,7 +28,7 @@ * @discussion This is an optional setting that may help you debug the library calls. * This call can be done at any time (before or after starting the library). * However, in order to avoid missing any error log, we recommand setting this value before starting the library. - * @param logLevel SMLogLevel enumeration type. Default = kSMLoLevel_None + * @param logLevel SMLogLevel enumeration type. Default = kSMLogLevel_None * @warning It is developer's responsability to enable log-level in Debug or release mode. * No distinction are being aplied by the library. * For obvious performance reason, it is always recommended to turn log off in release mode. diff --git a/iOS Lib/include/SMManager+SilentPush.h b/iOS Lib/include/SMManager+SilentPush.h index 9bbcce4..2cf8a2e 100644 --- a/iOS Lib/include/SMManager+SilentPush.h +++ b/iOS Lib/include/SMManager+SilentPush.h @@ -40,7 +40,7 @@ * @param completionHandler The block-completion to be processed after the download. Provided by the delegate call * @discussion It is recommended to use this API over didReceiveRemoteNotification: as it handles silent-remote-notificaitons. * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler; @@ -56,7 +56,7 @@ * Use it only if your application need to overide the service. * Otherwise, please use didReceiveRemoteNotification:fetchCompletionHandler: * @warning You must enable "Remote notifications" in your application's Capabilities in order to use this API. - * If this capability is not usefull to your application, you must use didReceiveRemoteNotification: instead. + * If this capability is not useful to your application, you must use didReceiveRemoteNotification: instead. */ - (void)didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler ForceResultFetch:(UIBackgroundFetchResult)resultFetch; diff --git a/iOS Lib/include/SMManager+ViewController.h b/iOS Lib/include/SMManager+ViewController.h new file mode 100644 index 0000000..661f187 --- /dev/null +++ b/iOS Lib/include/SMManager+ViewController.h @@ -0,0 +1,47 @@ +// +// SMManager+ViewController.h +// MobileSDK +// +// Created by Gauthier Dumont on 07/07/15. +// Copyright (c) 2015 Selligent. All rights reserved. +// + +/** + * This category will help our SDK making the WKWebView navigation buttons enabled/disabled when needed, if inAppMessageWKNavigationDelegate is set. + * + * #SMManager+ViewController :# + */ +@interface SMManager (ViewController) + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly and log the error when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + * @param error The NSError from the WKNavigationDelegate. + */ +- (void) webView:(WKWebView *)webView didFailNavigation:(WKNavigation *)navigation withError:(NSError *)error; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate + */ +- (void) webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation; + +/*! + * Use this API inside the corresponding method in your WKNavigationDelegate when inAppMessageWKNavigationDelegate is set. + * It will enable the SDK to have the navigation arrows working properly when the delegate is implemented in your APP. + * + * @param webView The WKWebView from the WKNavigationDelegate. + * @param navigation The WKNavigation from the WKNavigationDelegate. + */ +- (void)webView:(WKWebView *)webView didCommitNavigation:(WKNavigation *)navigation; + +@end + + + diff --git a/iOS Lib/include/SMManagerInAppMessageDelegate.h b/iOS Lib/include/SMManagerInAppMessageDelegate.h index 6f14ce5..788556c 100644 --- a/iOS Lib/include/SMManagerInAppMessageDelegate.h +++ b/iOS Lib/include/SMManagerInAppMessageDelegate.h @@ -11,6 +11,11 @@ NS_ASSUME_NONNULL_BEGIN +/** + * This protocol will help you intercept the inapp messages and allow you to display them your own way or store them somewhere to be shown later. + * + * #SMManagerInAppMessageDelegate :# + */ @protocol SMManagerInAppMessageDelegate @optional diff --git a/iOS Lib/include/SMManagerSetting.h b/iOS Lib/include/SMManagerSetting.h index 75ca46f..d679d0c 100644 --- a/iOS Lib/include/SMManagerSetting.h +++ b/iOS Lib/include/SMManagerSetting.h @@ -149,14 +149,4 @@ */ - (void)configureInAppContentServiceWithSetting:(SMManagerSettingIAC*)settingIAC; -/** - * @discussion This call is optional. It is not needed to successfully start the SDK. - * This call is useless if the sdk version is not the one associated to the plotproject framework - * However in teh case you are using the sdk version associated to plotproject framework, it is the first step to enable Location service. - * It is the first step to inform the sdk that geo location services are going to be used by the - * - * @warning To use location service you will mandatory need to have PlotProject.framework in your app and the correct version of the selligent sdk library - */ -- (void)configureLocationService; - @end diff --git a/iOS Lib/include/SMNSNotification.h b/iOS Lib/include/SMNSNotification.h index 854470f..55274aa 100644 --- a/iOS Lib/include/SMNSNotification.h +++ b/iOS Lib/include/SMNSNotification.h @@ -6,7 +6,7 @@ /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted when the user interacts with a remote-notification - * Usefull to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. + * Useful to retrieve user's actions on a received remote-notification, developers may listen to kSMNotification_Event_ButtonClicked from NSNotificationCenter. */ extern NSString* kSMNotification_Event_ButtonClicked; @@ -21,7 +21,7 @@ extern NSString* kSMNotification_Event_WillDisplayNotification; /** * NSString representing a notification name you can listen to. * An NSNotification with this name is broadcasted shortly before Dismissing the current remote-notification - * Primary-application may use this notification to resume any paused work. (see kSMNotification_Event_WillDisplayNotification) + * Primary-application may use this notification to resume any paused work (see kSMNotification_Event_WillDisplayNotification). */ extern NSString* kSMNotification_Event_WillDismissNotification; diff --git a/iOS Lib/include/SMNotificationButtonType.h b/iOS Lib/include/SMNotificationButtonType.h index 59a7832..9ed0e0c 100644 --- a/iOS Lib/include/SMNotificationButtonType.h +++ b/iOS Lib/include/SMNotificationButtonType.h @@ -8,7 +8,7 @@ /*! - * This enumeration declares all known buttun-type + * This enumeration declares all known button-type */ typedef NS_ENUM(NSInteger, SMNotificationButtonType) { /*! diff --git a/iOS Lib/libSelligentMobile.a b/iOS Lib/libSelligentMobile.a index d57e041..3a4f249 100644 Binary files a/iOS Lib/libSelligentMobile.a and b/iOS Lib/libSelligentMobile.a differ