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:
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
end
After 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:
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
end
After 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: