expo-aliyun-push
v0.1.8
Published
My new module
Downloads
5
Maintainers
Readme
安装
- npx expo install aliyun-react-native-push
- 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