Manual Installation - aMarCruz/react-native-text-size GitHub Wiki

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-text-size and add RNTextSize.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNTextSize.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/[...]/MainApplication.java

    • Add import com.github.amarcruz.rntextsize.RNTextSizePackage; to the imports at the top of the file
    • Add new RNTextSizePackage() to the list returned by the getPackages() method
  2. Append the following lines to android/settings.gradle:

    include ':react-native-text-size'
    project(':react-native-text-size').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-text-size/android')
    
  3. Insert the following lines inside the dependencies block in android/app/build.gradle:

    compile project(':react-native-text-size')
    

If you are using the Gradle plugin 3 or later (default in RN 0.57), in step 3 change the compile directive to implementation.