Socket
Socket
Sign inDemoInstall

expo-aliyun-push

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    expo-aliyun-push

My new module


Version published
Maintainers
1
Created

Readme

Source

安装

  1. npx expo install aliyun-react-native-push
  2. npx expo install expo-aliyun-push

配置

app.json

"plugins": [
  [
    "expo-aliyun-push",
    {
      "appKey": "xxx",
      "appSecret": "xxx"
    }
  ]
]

使用

import * as AliyunPush from 'aliyun-react-native-push';

 AliyunPush.initPush('appKey', 'appSecret').then(initPushRes => {
  const code = initPushRes.code;
  if (code === AliyunPush.kAliyunPushSuccessCode) {
    Alert.alert('Init iOS AliyunPush successfully👋');
  } else {
    const errorMsg = initPushRes.errorMsg?.toString();
    Alert.alert(`Failed to Init iOS AliyunPush, errorMsg: ${errorMsg}`);
  }
  });

TODO

[x] 支持 android

开发

编译 config plugin

yarn build plugin

发布

npm publish

Keywords

FAQs

Last updated on 26 Jan 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc