Skip to main content

Installation

Integration Example#

You have a repository available on Github with a sample project which contains an example of how to integrate our SDK.

Requirements#

SwiftXcodeMeetingLawyers SDKiOSStatus
5+15.42.0.014.0+Supported

Swift Package Manager#

To install the MeetingLawyers library you must first include MeetingLawyers package.

Steps:

  1. Open Xcode then select Project > Package Dependencies > +
  2. Add the repository URL https://github.com/MeetingLawyers/ios-sdk-spm-meetinglawyers

CocoaPods#

To install the MeetingLawyers library you must first include MeetingLawyers private pods repository to the Cocoapods list using the following command:

pod repo add meetinglawyers https://bitbucket.org/meetinglawyers/ios-cocoapods-specs.git

Later, in the project 'Podfile' you have to add in the header the new pods origin, in addition to the default header of Cocoapods, and in the target add MeetingLawyers sdk with right version:

source 'https://cdn.cocoapods.org/'
source 'https://bitbucket.org/meetinglawyers/ios-cocoapods-specs.git'

Later, in the project's Podfile, you need to add the new pod source at the top, alongside the default CocoaPods source. Additionally, within the target, include the MeetingLawyers SDK with the correct version:

platform :ios, '14.0'
# CDN and Bitbucket source to download Meetinglawyers SDK
source 'https://cdn.cocoapods.org/'
source 'https://bitbucket.org/meetinglawyers/ios-cocoapods-specs.git'
inhibit_all_warnings!
use_frameworks!
target 'SDK Sample' do
# Replace 'SDK_VERSION' with the actual version of the SDK you want to use
pod 'MeetingLawyers', 'SDK_VERSION'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '14.0'
end
end
end

Now open terminal and execute:

pod repo update && pod install

Access permissions#

Access to camera or photo gallery always requires explicit permission from the user.

Your app must provide an explanation for its use of capture devices using the NSCameraUsageDescription and NSPhotoLibraryUsageDescription Info.plist key. iOS displays this explanation when initially asking the user for permission to attach an element in the current conversation. See: Apple Documentation

caution

Attempting to attach a gallery photo or start a camera session without an usage description will raise an exception.

Migrate from MeetingLawyersSDK (legacy)#

Use this guide to migrate from the legacy SDK: Migration

Usage#

Import#

To use the library it is necessary to import it into your App:

import MeetingLawyers

Configuration#

To initialize MeetingLawyers, you need to call configure method configure(apiKey: String, environment: Environment? = .production, completion: @escaping (MeetingLawyersError?) -> Void).

Example:

ApplicationDelegate.swift
let apiKey = "XXXXX"
MeetingLawyersApp.configure(apiKey: apiKey) { error in
// Handle error
}

To run MeetingLawyers on development environment add environment parameter to configure call:

ApplicationDelegate.swift
let apiKey = "XXXXX"
MeetingLawyersApp.configure(apiKey: apiKey, environment: .development) { error in
// Handle error
}
note

The Async/Await version of the configure method is available:

try await MeetingLawyersApp.configure(apiKey: apiKey)

Next steps#