0.0.2 • Published 7 years ago

react-native-dynatrace v0.0.2

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

react-native-dynatrace

Getting started

$ npm install react-native-dynatrace --save

Mostly automatic installation

$ react-native link react-native-dynatrace

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-dynatrace and add ODDynatrace.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libODDynatrace.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.odemolliens.rn.dynatrace.ODDynatracePackage; to the imports at the top of the file
  • Add new ODDynatracePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-dynatrace'
    project(':react-native-dynatrace').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-dynatrace/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:

      compile project(':react-native-dynatrace')
  3. Insert the following lines inside the AndroidManifest file :

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

Usage

Import

import ODDynatrace from 'react-native-dynatrace';

Setup instance

ODDynatrace.startup("APPLICATION_ID","INSTANCE_URL");

Changelog

Version 0.0.2

  • Fix version of RN
  • Fix version of Gradle tools
  • Fix version of Android tools
  • Fix iOS build
  • Added a sample project
  • Update documentation

Version 0.0.1

  • First version

TODO