Skip to content

Latest commit

 

History

History
67 lines (58 loc) · 1.65 KB

File metadata and controls

67 lines (58 loc) · 1.65 KB

DemoApp for React Native

Usage

Adjust your credentials in index.js file, open a bash and run the following commands:

Both

Required to retrieve all dependencies that are required by this demo app:

npm install

iOS

cd ios
pod install
cd ..
react-native run-ios or react-native run-ios --device

Jumio SDK dependencies added in version 3.8.0 make it necessary to add the following pre-install hook to the Podfile:

pre_install do |installer|
  installer.pod_targets.each do |pod|
    puts "Overriding the static_framework? method for #{pod.name}"
    def pod.static_framework?;
      true
    end
    def pod.build_type;
      Pod::BuildType.static_library
    end
  end
end

This pre-install hook ensures that the pods added as dynamic_frameworks are built as dynamic frameworks, while the other pods are built as static libraries.

One additional post-install hook needs to be added to the Podfile so that the dependencies are build for distribution:

post_install do |installer|
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    end
   
   react_native_post_install(
     installer,
     config[:reactNativePath],
     :mac_catalyst_enabled => false
   )
   __apply_Xcode_12_5_M1_post_install_workaround(installer)
end

Android

npm run android-windows
// or
react-native run-android

If you get the error: Unable to crunch file on windows add the following line to your build.gradle (project):

allprojects {
    buildDir = "C:/tmp/${rootProject.name}/${project.name}"
}