Skip to main content

Installation

info

This integration replaces the discontinued Cordova plugin. If you were using it, migrate to this Capacitor-based approach.

Integration Example​

You have a repository available on Github with a sample project which contains a working Ionic + Capacitor app integrating the MeetingLawyers iOS and Android SDKs.

How it works​

Capacitor apps run your web code inside a native shell, so the MeetingLawyers native SDKs are integrated through a small local Capacitor plugin that you can copy into your own project. All the SDK integration lives in these pieces — the rest of your app has no dependency on the SDKs:

FileRole
src/plugins/meeting-lawyers/TypeScript API of the wrapper (configure, configureTheme, authenticate, openProfessionalList, openChatWithProfessional, registerForPushNotifications, isAuthenticated, logout)
ios/App/App/MeetingLawyersPlugin.swiftiOS bridge to the MeetingLawyers SDK
ios/App/App/MyViewController.swiftCAPBridgeViewController subclass that registers the plugin
android/.../MeetingLawyersPlugin.javaAndroid bridge to the com.meetinglawyers:sdk library
android/.../MeetingLawyersFirebaseService.javaAndroid FCM service forwarding pushes to the SDK

Requirements​

CapacitorNodeiOSAndroid
8+22+Xcode 26+, iOS 15+Android Studio, minSdk 24

iOS setup​

  1. Open ios/App/App.xcodeproj and add the Swift Package https://github.com/MeetingLawyers/ios-sdk-spm-meetinglawyers (Project > Package Dependencies > +), selecting the MeetingLawyers product.
  2. Copy MeetingLawyersPlugin.swift into the App target and register it from your CAPBridgeViewController subclass:
MyViewController.swift
import Capacitor
import UIKit

class MyViewController: CAPBridgeViewController {
override open func capacitorDidLoad() {
bridge?.registerPluginInstance(MeetingLawyersPlugin())
}
}
  1. Point the storyboard's bridge view controller to your subclass.
  2. Add the camera and microphone usage descriptions to Info.plist — see the iOS access permissions table.
tip

The sample hosts the bridge view controller inside a UINavigationController with a hidden bar. The wrapper detects it and pushes the SDK screens instead of presenting them modally, so native screens feel like part of the app.

Android setup​

  1. Add the MeetingLawyers maven repository to android/build.gradle. GitHub Packages requires credentials even for public consumers — ask support@meetinglawyers.com and provide them as gradle properties or environment variables, never hardcoded:
android/build.gradle
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://maven.pkg.github.com/MeetingLawyers/android-sdk-chat/"
credentials {
username = findProperty('GPR_USER') ?: System.getenv('GPR_USER') ?: ''
password = findProperty('GPR_TOKEN') ?: System.getenv('GPR_TOKEN') ?: ''
}
}
}
}
  1. Add the dependency to android/app/build.gradle:
android/app/build.gradle
dependencies {
implementation "com.meetinglawyers:sdk:2.1.15"
implementation platform("com.google.firebase:firebase-bom:32.7.1")
implementation "com.google.firebase:firebase-messaging"
}
  1. Copy MeetingLawyersPlugin.java (and MeetingLawyersFirebaseService.java for push) into your app module and register the plugin:
MainActivity.java
public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
registerPlugin(MeetingLawyersPlugin.class);
super.onCreate(savedInstanceState);
}
}
caution

The MeetingLawyers SDK pulls in Firebase Crashlytics. Once your app has a google-services.json, the com.google.firebase.crashlytics gradle plugin is required or the app crashes on launch with "The Crashlytics build ID is missing". See Push Notifications.

Usage​

Call the wrapper from TypeScript. Initialize once at app startup:

import { MeetingLawyers } from './plugins/meeting-lawyers';

await MeetingLawyers.configure({ apiKey: 'XXXXX', environment: 'PROD' });

To run against the development environment:

await MeetingLawyers.configure({ apiKey: 'XXXXX', environment: 'DEV' });

Next steps​