Manual Installation - aMarCruz/react-native-text-size GitHub Wiki
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-text-size
and addRNTextSize.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNTextSize.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)
Android
-
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 thegetPackages()
method
- Add
-
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')
-
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
.