npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shareinstall_rn

v1.0.7

Published

## Getting started(安装)

Readme

shareinstall_rn

Getting started(安装)

$ npm install shareinstall_rn --save

Mostly automatic installation(连接)

$ react-native link shareinstall_rn

Manual installation

iOS

1.把node_modules/shareinstall_rn/ios 路径下shareinstall文件夹拖入ios工程

2.在ios工程buile settings里面的Framework Search Paths里面配置framework路径,例如$(PROJECT_DIR)/../node_modules/shareinstall_rn/ios/shareinstall

3.在ios工程buile settings里面的other linker flags里面添加-ObjC

4.在ios工程info.plist文件中配置appKey键值对,如下:

<key>com.shareinstall.APP_KEY</key>
<string>shareinstall分配给应用的appkey</string>)

5.其余配置请参考shareinstall官网

6.appdelegate代码接入

#import "RNShareinstall.h"
#import <ShareInstallSDK/ShareInstallSDK.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  ...
  [ShareInstallSDK initWithDelegate:[RNShareinstall allocWithZone:nil] withOptions:launchOptions];
  ...
}
//ios9以下 URI Scheme
-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{
  //判断是否通过ShareInstall URL Scheme 唤起App
  if ([RNShareinstall schemeUrlHandler:url]) {
    return YES;
  }else{
    //其他代码
    return YES;
  }
}

//iOS9以上 URL Scheme

- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(nonnull NSDictionary *)options
{
  //判断是否通过ShareInstall URL Scheme 唤起App
  if ([RNShareinstall schemeUrlHandler:url]) {
    return YES;
  }else{
    //其他代码
    return YES;
  }
}

//Universal Links 通用链接

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
{
  //判断是否通过ShareInstall Universal Links 唤起App
  if ([RNShareinstall universalLinkHandler:userActivity]) {
    return YES ;
  }else{
    //其他代码
    return YES;
  }
  
}

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.shareinstall.shareinstallibrary.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 ':shareinstall_rn'
    project(':shareinstall_rn').projectDir = new File(rootProject.projectDir,   '../node_modules/shareinstall_rn/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':shareinstall_rn')
  3. 配置唤醒scheme
 <intent-filter>
      <action android:name="android.intent.action.VIEW" />
      <category android:name="android.intent.category.DEFAULT" />
      <category android:name="android.intent.category.BROWSABLE" />
      <data android:scheme="agec3112" /> //shareinstall后台分配的scheme
 </intent-filter>
  1. 在application里配置appkey
 <meta-data
      android:name="com.shareinstall.APP_KEY"
      android:value="F2BK2K6F7BBAAR" /> //shareinstall后台分配的appkey
  ```


## Usage
```javascript
import RNShareinstall from 'shareinstall_rn';

// TODO: What to do with the module?
RNShareinstall;

//获取安装参数 RNShareinstall.getInstall((result)=>{ console.log('install>>info>>>',JSON.parse(result)); })

//获取唤醒参数 RNShareinstall.addWakeUpListener((result)=>{ console.log('wakeup>>info>>>',JSON.parse(result)); })

//注册上报 RNShareinstall.reportRegister();