1.0.0 • Published 3 years ago
react-native-cf-widget-1.0.0 v1.0.0
react-native-cf-widget
Getting started
$ npm install react-native-cf-widget --save
Mostly automatic installation
$ react-native link react-native-cf-widget
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-cf-widget
and addRNCfWidget.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNCfWidget.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNCfWidgetPackage;
to the imports at the top of the file - Add
new RNCfWidgetPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-cf-widget' project(':react-native-cf-widget').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-cf-widget/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-cf-widget')
Windows
- In Visual Studio add the
RNCfWidget.sln
innode_modules/react-native-cf-widget/windows/RNCfWidget.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Cf.Widget.RNCfWidget;
to the usings at the top of the file - Add
new RNCfWidgetPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNCfWidget from 'react-native-cf-widget';
// TODO: What to do with the module?
RNCfWidget;
1.0.0
3 years ago