TechCentrixSDK
public final class TechCentrixSDK
Undocumented
-
Configuration struct used within the SDK.
See moreDeclaration
Swift
public struct Configuration
-
Configures the SDK with given
Configuration
Declaration
Swift
public static func configure(with configuration: TechCentrixSDK.Configuration)
Parameters
configuration
Contains images, api token, colors and host name
-
Declaration
Swift
public static func isSignedIn() -> Bool
Return Value
true
if user is signed in. -
Signs the user in using one time token
Declaration
Swift
public static func signIn(with oneTimeToken: String, completion: ((_ success: Bool) -> Void)?)
Parameters
oneTimeToken
authentication token with a short expiry date
completion
Optional callback.
-
Undocumented
Declaration
Swift
public static func signOut(completion: (() -> Void)?)
-
Presents TechCentrix UI on the given
UIViewController
Precondition
Use only after successful sign in
Declaration
Swift
public static func present(on viewController: UIViewController, animated: Bool = true)
Parameters
viewController
UIViewController to present on
animated
default
true
-
Returns
true
ifuserInfo
from Remote Notification should be handled by TechCentrixSDK.Declaration
Swift
public static func isTechCentrixPush(userInfo: [String : Any]) -> Bool
Return Value
true
ifmessage
should be handled by TechCentrix SDK;false
otherwise -
Handles
userInfo
dictionary from Remote Notification.Declaration
Swift
public static func handlePush(with userInfo: [String : Any], completion: ((_ success: Bool) -> Void)?)
Parameters
userInfo
dictionary containing Remote Notification data
-
Handles
response
dictionary from User Notification.Declaration
Swift
public static func handleUserNotification(with response: UNNotificationResponse, completion: @escaping () -> Void)
Parameters
response
UNNotificationResponse from userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void)
-
Stores Firebase Registration Identifier device token for using it later.
Declaration
Swift
public static func storeFirebaseRegistrationID(token: String)
Parameters
deviceToken
token data