IAdvizeSDK
@objc
public final class IAdvizeSDK : NSObject
The iAdvize SDK lets you provide a unique conversational experience to your users.
You access the SDK through the shared
instance.
Start by activating the SDK using activate(projectId:authenticationOption:gdprOption:completion:)
.
You can then rely on the provided controllers to configure and monitor the various parts of the conversational experience:
- The
targetingController
lets you control the targeting process. - The
chatboxController
lets you to configure the chatbox and the chat button. - The
notificationController
lets you configure push notifications. - The
conversationController
lets you monitor the ongoing conversation. - The
transactionController
lets you register transactions.
-
Undocumented
Declaration
Swift
public var dataSource: IAdvizeSDKEnvironmentDataSource?
-
Undocumented
Declaration
Swift
public internal(set) var activationStatus: ActivationStatus { get set }
-
The shared
IAdvizeSDK
instance.Declaration
Swift
@objc public static let shared: IAdvizeSDK
-
An object that allows to configure and monitor the targeting process.
Declaration
Swift
@objc public private(set) lazy var targetingController: TargetingController { get set }
-
An object that allows to monitor the conversation.
Declaration
Swift
@objc public private(set) lazy var conversationController: ConversationController { get set }
-
An object that allows to configure the push notifications.
Declaration
Swift
@objc public private(set) lazy var notificationController: NotificationController { get set }
-
An object that allows to register transactions.
Declaration
Swift
@objc public private(set) lazy var transactionController: TransactionController { get set }
-
An object that controls the chatbox and the chat button.
Declaration
Swift
@objc public private(set) lazy var chatboxController: ChatboxController { get set }
-
Undocumented
Declaration
Swift
@objc public private(set) lazy var visitorController: VisitorController { get set }
-
The log level of the iAdvize SDK console logger.
By default, the iAdvize SDK will only log the
warning
and theerror
message in the console. You can change this value to have more feedbacks on the iAdvize SDK activity.Declaration
Swift
public var logLevel: Logger.LogLevel
-
Activate the iAdvize SDK for the visitor.
Declaration
Swift
public func activate(projectId: Int, authenticationOption: AuthenticationOption, gdprOption: GDPROption = .disabled, completion: ((_ success: Bool) -> Void)? = nil)
Parameters
projectId
Id of the project.
authenticationOption
The option of authentication of the visitor, anonymous or simple.
gdprOption
The option defining the behavior regarding the GDPR message that can be displayed at the beginning of the conversation.
completion
The completion handler called when the activation process is done. The
success
value indicates if the activation process was successful. -
Logout the visitor from the iAdvize SDK.
This hides the chat button, disables push notifications and clears all the locally stored visitor data. You will need to call activate again if the user needs to start a new conversation.
Declaration
Swift
@objc public func logout(completion: (() -> Void)? = nil)
-
Returns a JSON
String
containing detailed information about the current state of the iAdvize SDK.This method is intended for debugging purposes only and should be used to assist in diagnosing issues with the SDK. You can include the returned string in your logs, and share it with iAdvize support for further analysis of any encountered problems.
Important:
- The structure and content of the JSON string may change without notice. Do not rely on it for any functionality in your application.
Do not attempt to parse or manipulate the JSON string; it is meant solely for debugging and support purposes.
Declaration
Swift
@objc public func debugInfo() -> String
Return Value
A JSON
String
representing the current state of the SDK.