Giter VIP home page Giter VIP logo

example-reactnative-master's Introduction

React Native DeepAR SDK example

[This example is outdated since it uses the older DeepAR SDK and it does not run out of the box. We've kept it here as a reference how one could use RN native components to integrate DeepAR. We accept pull-requests for updating to latest DeepAR version.]

To run the example

  • In the root folder:

    • First install all the dependencies with: npm install
    • Install pods for iOS: cd ios; pod update; pod install; cd..;
  • Download the SDK from https://developer.deepar.ai for both iOS and Android and:

    • Drag and drop the DeepAR.framework to your native iOS project. In the project settings General->Frameworks, Libraries and Embedded Content make sure the DeepAR.framework is listed and Embed option is set to "Embed & Sign". For any issues consult native iOS integration documentation.
    • For Android follow the instructions on how to embed the DeepAR SDK into native apps. The workflow is the same:
      • Open the example-reactnative/android project in Android Studio
      • File->Project Structure->Dependencies->Add new (+ sign)->Import .JAR/.AAR Package
      • Select deepar.aar and finish the import
      • Sync gradle to make sure everything is ok
  • Go to https://developer.deepar.ai, sign up, create the project and the Android and iOS apps. Copy the license key and paste it to:

    • Android - RNTDeepAR.java (instead of your_licence_key_here string). Additionally change your applicationId in the application build.gradle file to the one you've set in the developer portal for Android app
    • iOS - RNTDeepAR.m (insted of your_licence_key_here string). Additionally change your bundle identifier in the project settings Signing & Capabilities section to the one you've set in the developer portal for iOS app
  • To run on iOS:

    • Connect your phone to your Mac.
    • Open ios/deeparRNExample.xcworkspace
    • Run the project in the xCode
  • To run on Android:

    • Connect Android phone to the computer
    • In the root folder run 'react-native run-android'
  • This example has been done with RN version 0.61.2. Depending on your RN version some things may differ slightly - for example if you are running on RN < 0.60 you will need to link the dependencies manually etc. Make sure to understand RN native component management for both iOS and Android platforms:

example-reactnative-master's People

Contributors

bardiaalavi-2020 avatar

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.