1.1.3 • Published 3 years ago

react-native-measure-ar v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

react-native-measure-ar

Getting started

$ npm install react-native-measure-ar --save

Installation iOS ONLY

iOS Linking (You must do this - we do not yet support auto-linking)

  1. Add the following lines to your ios/Podfile below use_react_native!(:path => config["reactNativePath"]):

    pod 'ViroReact', :path => '../node_modules/@viro-community/react-viro/ios/'
    pod 'ViroKit_static_lib', :path => '../node_modules/@viro-community/react-viro/ios/dist/ViroRenderer/static_lib'

    See this example

  2. Install the iOS native pods by running:

    $ npx pod-install

    or inside the ios directory...

    $ pod install
  3. If you are going to be doing any AR then you will need to request permissions for using the camera in the ios/APP_NAME/info.plist by adding the following:

        <key>NSCameraUsageDescription</key>
        <string>The camera is needed for AR functionality</string>

    The string can be more appropriate to the needs of your app.

    See an example here.

  4. You're done! You can now run npx react-native ios.

    Remember, if you are using AR, you need to run on a real device.

Usage

import MeasureAr from "react-native-measure-ar";

return (
  <MeasureAr
    onPolygonDetected={(polygon) => console.log(polygon)}
    strings={{
      help: "Wie ging das nochmal?",
      restart: "Neu starten",
      stepBack: "Schitt Zurück",
      notSupported: "AR wird von Ihrem Gerät nicht unterstützt",
    }}
    TutorialViewChild={
      <Text
        style={{
          fontSize: 12,
          color: "#ffffff",
        }}
      >
        Ich bin ein Erklärbär
      </Text>
    }
    tutorialState={true}
    options={{ minDist: 0.1, confirmAlert: true }}
  />
);

powered by ViroReact

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.1.3

3 years ago

1.0.4

3 years ago

1.1.2

3 years ago

1.0.3

3 years ago

1.0.0

3 years ago