Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpush/jpush-flutter-plugin
JPush's officially supported Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)。
https://github.com/jpush/jpush-flutter-plugin
android flutter ios jpush
Last synced: 3 days ago
JSON representation
JPush's officially supported Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)。
- Host: GitHub
- URL: https://github.com/jpush/jpush-flutter-plugin
- Owner: jpush
- License: mit
- Created: 2018-09-07T06:22:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-05T08:51:24.000Z (6 days ago)
- Last Synced: 2024-11-05T09:35:18.325Z (6 days ago)
- Topics: android, flutter, ios, jpush
- Language: Objective-C
- Homepage: http://docs.jiguang.cn
- Size: 4.21 MB
- Stars: 842
- Watchers: 31
- Forks: 352
- Open Issues: 190
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![QQ Group](https://img.shields.io/badge/QQ%20Group-862401307-red.svg)]()
# JPush Flutter Plugin
> flutter 2.0 请切换至 dev-2.x 分支。
### 安装在工程 pubspec.yaml 中加入 dependencies
```
//github 集成
dependencies:
jpush_flutter:
git:
url: git://github.com/jpush/jpush-flutter-plugin.git
ref: master
// pub 集成
dependencies:
jpush_flutter: 2.1.4
```### 配置
##### Android:
在 `/android/app/build.gradle` 中添加下列代码:
```groovy
android: {
....
defaultConfig {
applicationId "替换成自己应用 ID"
...
ndk {
//选择要添加的对应 cpu 类型的 .so 库。
abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a',
}manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : "appkey", // NOTE: JPush 上注册的包名对应的 Appkey.
JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
]
}
}
```##### iOS:
- 在 xcode8 之后需要点开推送选项: TARGETS -> Capabilities -> Push Notification 设为 on 状态
### 使用
```dart
import 'package:jpush_flutter/jpush_flutter.dart';
```### APIs
**注意** : 需要先调用 JPush.setup 来初始化插件,才能保证其他功能正常工作。
[参考](./documents/APIs.md)