1.0.0 • Published 7 years ago

react-native-form-view v1.0.0

Weekly downloads
5
License
-
Repository
-
Last release
7 years ago

react-native-form-view

Getting started

$ npm install react-native-form-view --save

Mostly automatic installation

$ react-native link react-native-form-view

Better follow manual & do not use link twice

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-form-view and add RNFormView.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNFormView.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNFormViewPackage; to the imports at the top of the file
  • Add import com.oblador.vectoricons.VectorIconsPackage; to the imports at the top of the file
  • Add import com.filepicker.FilePickerPackage to the imports at the top of the file

  • Add new RNFormViewPackage() to the list returned by the getPackages() method

  • Add new FilePickerPackage() to the list returned by the getPackages() method
  • Add new VectorIconsPackage(), to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:

    include ':react-native-form-view'
    project(':react-native-form-view').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-form-view/android')
    include ':react-native-file-picker'
    project(':react-native-file-picker').projectDir = new File(settingsDir, '../node_modules/react-native-file-picker/android')
    include ':react-native-vector-icons'
    project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

      compile project(':react-native-form-view')
      compile project(':react-native-mylib')
      compile project(':react-native-file-picker')

Windows

Read it! :D

  1. In Visual Studio add the RNFormView.sln in node_modules/react-native-form-view/windows/RNFormView.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Com.Reactlibrary.RNFormView; to the usings at the top of the file
  • Add new RNFormViewPackage() to the List<IReactPackage> returned by the Packages method

Usage

import FormView from 'react-native-form-view/lib/formView';

//In your components render pass url where you have your form json

 <FormView url = {'url to your json of form'} />