0.0.2 • Published 6 months ago

usepiipulrn v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

UsePiipulRN

NPM

License

Getting started

Installation

npm install usepiipulrn react-native-progress react-native-svg react-native-vision-camera --save

or with yarn

yarn add usepiipulrn react-native-progress react-native-svg react-native-vision-camera

Expo

Add the VisionCamera plugin to your Expo config (app.json, app.config.json or app.config.js):

{
  "name": "my app",
  "plugins": [
    [
      "react-native-vision-camera",
      {
        "cameraPermissionText": "$(PRODUCT_NAME) needs access to your Camera."
      }
    ]
  ]
}

React Native

IOS

Open your project's Info.plist and add the following lines inside the outermost \ tag:

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) needs access to your Camera.</string>

Android

Open your project's AndroidManifest.xml and add the following lines inside the \ tag:

<uses-permission android:name="android.permission.CAMERA" />

Requirements

VisionCamera requires iOS 12 or higher, and Android-SDK version 26 or higher.

Usage example

// App.ts
import PiipulProvider from "usepiipulrn"

function App() {
  return (
    <PiipulProvider>
      <SafeAreaView>{/* Rest of your screens and codes */}</SafeAreaView>
    </PiipulProvider>
  )
}

// AuthScreen.ts
import { piipulAuth } from "usepiipulrn"

export default function PaymentScreen() {
  const open = () => {
    piipulAuth.open()
  }

  return (
    <View>
      <Button title="Use piipul" onPress={open} />
    </View>
  )
}
0.0.2

6 months ago

0.0.1

6 months ago