1.0.13 • Published 5 years ago

react-native-shareinstall v1.0.13

Weekly downloads
62
License
MIT
Repository
github
Last release
5 years ago

react-native-shareinstall

Getting started

$ npm install react-native-shareinstall --save

Mostly automatic installation

$ react-native link react-native-shareinstall

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-shareinstall and add RNShareinstall.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNShareinstall.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)< 5.ios 功能暂且还没完善,后续会更新,2.0版本会更新完整iOS功能

Android

  1. 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 the getPackages() method
  1. 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')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-shareinstall')

Windows

Read it! :D

  1. In Visual Studio add the RNShareinstall.sln in node_modules/react-native-shareinstall/windows/RNShareinstall.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Shareinstall.RNShareinstall; to the usings at the top of the file
  • Add new RNShareinstallPackage() to the List<IReactPackage> returned by the Packages method

Usage

import RNShareinstallModule from 'react-native-shareinstall';

  #该方法用于监听app通过univeral link或scheme拉起后获取唤醒参数
    this.receiveWakeupListener = map => {
       if (map) {
         //do your work here
       }        
     Alert.alert('拉起回调',JSON.stringify(map)) 
    } 
		RNShareinstallModule.addWakeUpListener(this.receiveWakeupListener) 
		
#该方法用于获取安装参数
 RNShareinstallModule.getInstall(10, map => {
      if (map) {
        //do your work here
      }        
      Alert.alert('安装回调',JSON.stringify(map))     
    })
1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago