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.
settings.gradle and insert the following line.
File > Sync Project with Gradle Files, the Herald module should now appear in your project.
build.gradle for your app and insert the following line.
File > Sync Project with Gradle Files, the Herald module is now available for use in your project.
onRequestPermissionsResultmethods from the
MainActivityof the Herald test app into your main app activity, along with the
permissionRequestCodestatic variable; call the
requestPermissionsmethod on initialisation of your app to ensure all the required permissions are requested and granted for Herald to function.
Build > Make Projectto ensure Herald is able to coexist with your existing app code, resolve any naming clashes and compilation errors now before proceeding to integration.
Herald.xcodeprojfrom the Herald subfolder in your project from Finder into Xcode under your project, the
Herald.frameworkproduct is now available for use in your app.
General > Frameworks, Libraries, and Embedded Content, then drag and drop the
Herald.frameworkproduct to this list to add the framework as dependency.
Product > Clean Build Folder, then
Product > Build For > Testingto ensure Herald is able to coexist with your existing app code, resolve any naming clashes and compilation errors now before proceeding to integration
The 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.
In future (v1.2) Herald will be available from common Maven, Gradle, and CocoaPods repositories.