Giter VIP home page Giter VIP logo

react-native-jumio's Introduction

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

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

dynamic_frameworks = ['Socket.IO-Client-Swift', 'Starscream', 'iProov']

pre_install do |installer|
  installer.pod_targets.each do |pod|
    if !dynamic_frameworks.include?(pod.name)
      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
end

This was added because iProov dependencies SocketIO and Starscream need to be build as dynamic frameworks while React Native are supported only as static libraries. 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
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}"
}

react-native-jumio's People

Contributors

trinadhkoyamm avatar

Watchers

James Cloos avatar trinadhkoya avatar

Forkers

thuy222

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.