react-native-shareinstall
Getting started
$ npm install react-native-shareinstall --save
Mostly automatic installation
$ react-native link react-native-shareinstall
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-shareinstall
and addRNShareinstall.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNShareinstall.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)< 5.ios 功能暂且还没完善,后续会更新,2.0版本会更新完整iOS功能
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNShareinstallPackage;
to the imports at the top of the file - Add
new RNShareinstallPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-shareinstall' project(':react-native-shareinstall').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-shareinstall/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-shareinstall')
Windows
- In Visual Studio add the
RNShareinstall.sln
innode_modules/react-native-shareinstall/windows/RNShareinstall.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Shareinstall.RNShareinstall;
to the usings at the top of the file - Add
new RNShareinstallPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
; #该方法用于监听app通过univeral link或scheme拉起后获取唤醒参数 this { if map //do your work here Alert } RNShareinstallModule #该方法用于获取安装参数 RNShareinstallModule