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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-pgyer-bridge

v1.1.0

Published

react-native 蒲公英插件

Downloads

15

Readme

react-native-pgyer-bridge

介绍

桥接蒲公英的sdk,以便使用蒲公英的更新检查,bug反馈,异常检测功能,可以直接在蒲公英应用管理端查看。对于公司没有详细测试流程的可以接入。

使用场景

  • 测试人员可以摇一摇反馈bug avatar avatar
  • 检查更新,有更新就会自动安装 avatar avatar avatar avatar
  • 后台查看 avatar avatar

Getting started

$ npm install react-native-pgyer-bridge --save or $ yarn add react-native-pgyer-bridge

Mostly automatic installation

$ react-native link react-native-pgyer-bridge

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-pgyer-bridge and add RNPgyerBridge.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNPgyerBridge.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNPgyerBridgePackage; to the imports at the top of the file
  • Add new RNPgyerBridgePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-pgyer-bridge'
    project(':react-native-pgyer-bridge').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-pgyer-bridge/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-pgyer-bridge')

配置项

  • ios 切换到 Build Phases选项卡中,在 Link Binary With Libraries 中添加如下六个系统 framework
CoreTelephony.framework
OpenGLES.framework
CoreMotion.framework
AudioToolbox.framework
AvFoundation.framework
SystemConfiguration.framework
  • 安卓配置 AndroidManifest
<!-- 必选-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <!-- 获取网络状态 -->
<uses-permission android:name="android.permission.INTERNET" /> <!-- 网络通信-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />  <!-- 获取设备信息 -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <!-- 获取MAC地址-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <!-- 读写sdcard,storage等等 -->
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- 允许程序录制音频 -->
<uses-permission android:name="android.permission.GET_TASKS"/>
<!-- Android8.0 安装 apk 需要添加权限-->
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

<!-- 可选-->
<uses-permission android:name="android.permission.READ_LOGS" /> <!-- 获取logcat日志 -->

<application
   android:allowBackup="true"
   android:icon="@drawable/ic_launcher"
   android:label="@string/app_name"
   android:theme="@style/AppTheme"
   android:networkSecurityConfig="@xml/network_security_config">
<!-- 可选-->
       <activity android:name="com.pgyersdk.feedback.FeedbackActivity"/>
<!-- Jar 包集成的方式 必填 -->
   <provider
           android:name="com.pgyersdk.PgyerProvider"
           android:authorities="${applicationId}.com.pgyer.provider"
           android:exported="false"/>
<!-- 必填 -->
   <meta-data
       android:name="PGYER_APPID"
       android:value="4b6e8877dfcc2462bedb37dcf66b6d87" >
   </meta-data>
</application>


// Android9.0 需要配置允许 SDK http请求配置:
// network_security_config.xml 文件

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
   <domain-config cleartextTrafficPermitted="true">
       <domain includeSubdomains="true">www.pgyer.com</domain>
       <domain includeSubdomains="true">app-global.pgyer.com</domain>
   </domain-config>
</network-security-config>

Usage

import Pgyer from 'react-native-pgyer-bridge';
//在入口处初始化蒲公英,appId为蒲公英上传安装包后应用的appKey
Pgyer.initWithConfig({appId:'xxx'});
//简单的检查更新
Pgyer.checkUpdate();
//截图并且显示反馈弹窗
Pgyer.showFeedbackView();
//获取更新信息
Pgyer.getUpdateInfo();
//自动发送错误日志,ios官方sdkapi有问题,安卓有效
Pgyer.reportException({
              name: 'MY IS CUSTOM EXCEPTION',
              reason: "CUSTOM",
              userInfo: {
                aa: "21321",
                bb: "sadsad",
                cc: {aa: 'SAD21321321'}
              }
            })
//更多详细的用法可以看example