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

tpns_rn_plugin

v1.1.8

Published

react-native tpns plugin

Downloads

711

Readme

TPNS-RN-Plugin

1.安装

cd rn工程目录
终端执行 npm install tpns_rn_plugin --save

2.APIs

说明 : 提供TPNS的所有业务接口。

点击查看

3.厂商通道接入说明

说明 : 提供安卓各厂商通道接入方法。

点击查看

4.使用:

集群域名配置(如果您的应用非广州集群请按照以下方法进行域名配置,广州集群请忽略)

集群域名:

   中国上海:tpns.sh.tencent.com
   中国香港:tpns.hk.tencent.com
   新加坡:tpns.sgp.tencent.com
  • iOS端需要在注册方法startXg之前调用以下域名配置函数
    • domainStr 对应集群域名
      void configureClusterDomainName(String domainStr);
  • Android端需要在Manifest 文件 application 标签内添加以下元数据:
  <application>
    // 其他安卓组件
    <meta-data
        android:name="XG_SERVER_SUFFIX"
        android:value="其他地区域名" />
  </application>

iOS:

pod集成

  • 进入到iOS工程执行pod install

  • 注意:如果项目里使用pod安装过,请先执行命令pod deintegrate

Android

1. 环境配置

1.1 在项目的package.json中加入依赖

    "dependencies": {
        .....
        "tpns_rn_plugin": "^1.1.4"
    }

1.2 在工程目录运行命令安装插件

    npm install tpns_rn_plugin --save

1.3 在android app模块下的build.gradle中进行配置代码如下:

    android: {
                 ....
                 defaultConfig {
                   applicationId "替换成自己应用 ID"
                   ...
                   //
                   manifestPlaceholders = [
                       XG_ACCESS_ID : "替换自己的ACCESS_ID",  //信鸽官网注册所得ACCESS_ID
                       XG_ACCESS_KEY : "替换自己的ACCESS_KEY", //信鸽官网注册所得ACCESS_KEY
            
                   ]
                 }
               }

1.4 RN0.6以下在Application中getPackages添加XgPushPackage()

     @Override
     protected List<ReactPackage> getPackages() {
          List<ReactPackage> packages = new PackageList(this).getPackages();
          packages.add(new XgPushPackage());
          return packages;
     }

1.5 代码混淆

      #TPNS SDK
      -keep public class * extends android.app.Service
      -keep public class * extends android.content.BroadcastReceiver
      -keep class com.tencent.android.tpush.** {*;}
      -keep class com.tencent.tpns.baseapi.** {*;}
      -keep class com.tencent.tpns.mqttchannel.** {*;}
      -keep class com.tencent.tpns.dataacquisition.** {*;}

5. 常见问题

iOS 常见问题 点击查看
Android 常见问题 点击查看