Installation Guide
This page contains the installation guide needed for OkayCam in Android, iOS and React-native
Android Installation Guide
In Android, the first step of the installation for OkayCam is to include the following dependencies in the project-level build.gradle file. The build.gradle file will need to make some changes as follow below:
allprojects {
repositories {
...
mavenCentral()
}
} Include the following dependencies in the app-level build.gradle file as shown below:
dependencies{
implementation 'com.innov8tif.okaycam:OkayCam:1.1.1'
}After adding the code, sync the project with gradle files to make sure all of the dependencies are successfully installed.
iOS Installation Guide
In iOS, OkayCam is available through the CocoaPods. The first step of the installation for OkayCam in iOS is to simply add the following line of code to your Podfiles as shown below:
use_frameworks!
pod 'OkayCam', '1.1.1'
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "CryptoSwift"
puts "Enable module stability for CryptoSwift"
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
endAfter adding the code above to the Podfiles:
Run the command "pod install" to install the dependency
Add "NSCameraUsageDescription" to the info.plist in order to gain camera permissions
React-native Installation Guide
In React-native, the first step of the installation is to install the react-native OkayCam into the environment using the command below:
$ react-native install [email protected]For iOS in React-native:
Navigate to the iOS folder and add the following code to the Podfiles:
platform :ios, '11.0'
use_frameworks!
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == "CryptoSwift"
puts "Enable module stability for CryptoSwift"
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
endAfter adding the code above to the Podfiles:
Run the command "pod install" to install the dependency
Add "NSCameraUsageDescription" to the info.plist in order to gain camera permissions
Issues
Android:
There will be a duplicate class "org.hamcrest.xxx"
If the above error is encountered, it can be solved by excluding the "junit" module below:
configurations { compile.exclude group: "junit", module: "junit" }iOS:
There will be several issues stated in the quote below:
Undefined symbol: _swift_FORCE_LOAD$_swiftUniformTypeIdentifiers
Undefined symbol: _swift_FORCE_LOAD$_swiftCoreMIDI
If users encountered the errors above, it can be solved by creating a new swift file called Void.swift without adding a bridging header.

License
After that, a license key is required for both Android and iOS by adding the code below:
const license = Platform.select({
android: "",
ios: ""
})Last updated
Was this helpful?