expo-aliyun-push
TypeScript icon, indicating that this package has built-in type declarations

0.1.8 • Public • Published

安装

  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

Package Sidebar

Install

npm i expo-aliyun-push

Weekly Downloads

0

Version

0.1.8

License

MIT

Unpacked Size

55 kB

Total Files

50

Last publish

Collaborators

  • zijuntang