The process for inserting Herald into your app is similar in concept for both iOS and Android. It involves copying the Herald library from the test app into your app and making the library accessible from your app. This section presents the procedure for inserting the library for iOS and Android.
Open settings.gradle
and insert the following line.
include ':Herald'
File > Sync Project with Gradle Files
, the Herald module should now appear in your project.Open build.gradle
for your app and insert the following line.
implementation project(':Herald')
File > Sync Project with Gradle Files
, the Herald module is now available for use in your project.requestPermissions
and onRequestPermissionsResult
methods from the MainActivity
of the Herald test app into your main app activity, along with the permissionRequestCode
static variable; call the requestPermissions
method on initialisation of your app to ensure all the required permissions are requested and granted for Herald to function.Build > Make Project
to ensure Herald is able to coexist with your existing app code, resolve any naming clashes and compilation errors now before proceeding to integration.Herald.xcodeproj
from the Herald subfolder in your project from Finder into Xcode under your project, the Herald.framework
product is now available for use in your app.General > Frameworks, Libraries, and Embedded Content
, then drag and drop the Herald.framework
product to this list to add the framework as dependency.Product > Clean Build Folder
, then Product > Build For > Testing
to ensure Herald is able to coexist with your existing app code, resolve any naming clashes and compilation errors now before proceeding to integrationThe Herald framework is now available for use in your app by importing the Herald module in your app code with the following line at the top of your code.
import Herald
In future (v1.2) Herald will be available from common Maven, Gradle, and CocoaPods repositories.
There are iOS and Android application integration pages for this
To help you get started, see the documentation.