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
| Swift | Xcode | MeetingLawyers SDK | iOS | Status |
|---|---|---|---|---|
| 5+ | 26.2 | 2.0.17 | 14.0+ | Supported |
| 5+ | 16.2 | 2.0.16 | 14.0+ | Supported |
| 5+ | 15.4 | 2.0.0 | 14.0+ | Deprecated |
Swift Package Manager
To install the MeetingLawyers library you must first include MeetingLawyers package.
Steps:
- Open Xcode then select
Project>Package Dependencies>+ - Add the repository URL
https://github.com/MeetingLawyers/ios-sdk-spm-meetinglawyers
CocoaPods
CocoaPods support for the MeetingLawyers SDK is deprecated as of version 2.0.14.
Please migrate to Swift Package Manager (SPM) for continued updates and support. SPM provides better integration with Xcode and improved dependency management.
Learn more about the CocoaPods deprecation or CocoaPods Timeline.
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'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:
source 'https://cdn.cocoapods.org/'
source 'https://bitbucket.org/meetinglawyers/ios-cocoapods-specs.git'
Then, 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
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:
let apiKey = "XXXXX"
MeetingLawyersApp.configure(apiKey: apiKey) { error in
// Handle error
}
To run MeetingLawyers on development environment add environment parameter to configure call:
let apiKey = "XXXXX"
MeetingLawyersApp.configure(apiKey: apiKey, environment: .development) { error in
// Handle error
}
The Async/Await version of the configure method is available:
try await MeetingLawyersApp.configure(apiKey: apiKey)
Next steps
- Authenticate user: Authentication
- Configure PUSH notifications: Firebase
- Unread Messages Count: Messages Count
- Show professionals list: Professionals List
- Customize UI: Customization