Skip to main content

SDK Overview

Description

MeetingLawyersApp is the main entry point for the MeetingLawyers iOS SDK. It manages SDK configuration, user authentication, push notifications, color customization, and messaging.

All methods are accessed as static methods on MeetingLawyersApp. It is mandatory to configure the SDK before calling any other method.


Configuration

configure(apiKey: String, environment: RemoteEnvironment, completion: (MeetingLawyersError?) -> Void)

Configures the SDK with an API key and environment.

configure(apiKey: String, environment: RemoteEnvironment) async throws

Async/await version of the configuration method.

configure(_ configuration: MeetingLawyersConfiguration, completion: (MeetingLawyersError?) -> Void)

Configures the SDK using a MeetingLawyersConfiguration object.

configure(_ configuration: MeetingLawyersConfiguration) async throws

Async/await version using a configuration object.

getInstallationId() -> String

Returns the unique installation identifier for the current device.


Authentication

authenticate(userId: String, completion: (MeetingLawyersError?) -> Void)

Authenticates a user on the MeetingLawyers platform.

authenticate(userId: String) async throws

Async/await version of the authentication method.

logout(completion: (MeetingLawyersError?) -> Void)

Logs out the currently authenticated user.

logout() async throws

Async/await version of the logout method.

isAuthenticated() -> Bool

Returns whether a user is currently authenticated.


Push Notifications

setFirebaseMessagingToken(token: String, completion: (MeetingLawyersError?) -> Void)

Registers the Firebase push notification token for the current device.

setFirebaseMessagingToken(token: String) async throws

Async/await version of the token registration method.

isMeetingLawyersPush(notification: UNNotification) -> Bool

Checks if a received notification was sent by MeetingLawyers.

isMeetingLawyersPush(userInfo: [AnyHashable: Any]) -> Bool

Checks if a notification payload was sent by MeetingLawyers.

userNotificationCenter(willPresent: UNNotification) async throws -> UNNotificationPresentationOptions

Handles notification presentation when the app is in the foreground.

userNotificationCenter(willPresent: UNNotificationRequest, completionHandler: (UNNotificationPresentationOptions) -> Void) -> Bool

Completion-based version. Returns true if handled by the SDK.

userNotificationCenter(didReceive: UNNotificationResponse) async throws

Handles the user's response to a notification.

userNotificationCenter(didReceive: UNNotificationRequest, completionHandler: (MeetingLawyersError?) -> Void) -> Bool

Completion-based version. Returns true if handled by the SDK.


UI & Navigation

professionalListViewController(delegate: ProfessionalListOutputType?, filter: ProfessionalListFilter?) -> UINavigationController?

Returns the professional list screen ready to be presented.

execute(action: MeetingLawyersAction, origin: UIViewController?, completionHandler: (MeetingLawyersError?) -> Void)

Executes an internal navigation action like opening a specific chat or a video call.

execute(action: MeetingLawyersAction, origin: UIViewController?) async throws

Async/await version of the action execution method.


Messaging

unreadMessageCount(filter: ProfessionalListFilter?, completion: (Int, MeetingLawyersError?) -> Void)

Returns the unread message count, optionally filtered by speciality.

unreadMessageCount(filter: ProfessionalListFilter?) -> AnyPublisher<Int, Never>


Color Configuration

setStyle(primaryColor: UIColor)

Primary color, used by default in all elements that can be tinted within the application.

setStyle(secondaryColor: UIColor)

Secondary color. Used in the badge for pending messages. Null value or not set → primaryColor.

setStyle(navigationColor: UIColor)

Color used to tint navigation bar elements. Null value or not set → primaryColor.

setStyle(navigationTitleView: UIView?)

Custom view displayed as the navigation bar title.

setStyle(navigationLeftBarButtons: [UIBarButtonItem])

Custom left bar button items for the navigation bar.

setStyle(navigationRightBarButtons: [UIBarButtonItem])

Custom right bar button items for the navigation bar.

setStyle(dividerColor: UIColor)

Color used in the divider background (free or trial users). Null value or not set → primaryColor.

setStyle(chatBackgroundView: UIView?)

Custom background view for the chat screen.

setStyle(incomingBubbleColor: UIColor)

Color for incoming message bubbles in chat. Null value or not set → #E0E0E0.

setStyle(outgoingBubbleColor: UIColor)

Color for outgoing message bubbles in chat. Null value or not set → primaryColor.


Event Tracking

eventTrackingScreen(screenName: String, subType: String?)

Logs a screen view event for external analytics tracking.