mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-05-07 11:02:58 +08:00
Update README & license.
This commit is contained in:
parent
714a811ef2
commit
be7b9aa8ac
78
README.md
78
README.md
@ -13,13 +13,13 @@
|
|||||||
|
|
||||||
> QQ 交流群:413602425。
|
> QQ 交流群:413602425。
|
||||||
|
|
||||||
## 集成步骤
|
## Install
|
||||||
|
|
||||||
- 通过 Cordova Plugins 安装,要求 Cordova CLI 5.0+:
|
- 通过 Cordova Plugins 安装,要求 Cordova CLI 5.0+:
|
||||||
|
|
||||||
cordova plugin add jpush-phonegap-plugin --variable API_KEY=your_jpush_appkey
|
cordova plugin add jpush-phonegap-plugin --variable API_KEY=your_jpush_appkey
|
||||||
|
|
||||||
- 或者直接通过 url 安装:
|
- 或直接通过 url 安装:
|
||||||
|
|
||||||
cordova plugin add https://github.com/jpush/jpush-phonegap-plugin.git --variable API_KEY=your_jpush_appkey
|
cordova plugin add https://github.com/jpush/jpush-phonegap-plugin.git --variable API_KEY=your_jpush_appkey
|
||||||
|
|
||||||
@ -28,61 +28,47 @@
|
|||||||
cordova plugin add Your_Plugin_Path --variable API_KEY=your_jpush_appkey
|
cordova plugin add Your_Plugin_Path --variable API_KEY=your_jpush_appkey
|
||||||
|
|
||||||
|
|
||||||
## Demo
|
## Usage
|
||||||
|
### API
|
||||||
|
- [公共 API](/doc/Common_detail_api.md)
|
||||||
|
- [iOS API](/doc/iOS_API.md)
|
||||||
|
- [Android API](/doc/Android_detail_api.md)
|
||||||
|
|
||||||
|
### Demo
|
||||||
插件项目中包含一个简单的 Demo。若想参考,可以在 */example* 文件夹内找到并拷贝以下文件:
|
插件项目中包含一个简单的 Demo。若想参考,可以在 */example* 文件夹内找到并拷贝以下文件:
|
||||||
|
|
||||||
src/example/index.html -> www/index.html
|
example/index.html -> www/index.html
|
||||||
src/example/css/* -> www/css
|
example/css/* -> www/css
|
||||||
src/example/js/* -> www/js
|
example/js/* -> www/js
|
||||||
|
|
||||||
## 关于 PhoneGap build 云服务
|
|
||||||
|
|
||||||
|
### 关于 PhoneGap build 云服务
|
||||||
该项目基于 Cordova 实现,目前无法使用 PhoneGap build 云服务进行打包,建议使用本地环境进行打包。
|
该项目基于 Cordova 实现,目前无法使用 PhoneGap build 云服务进行打包,建议使用本地环境进行打包。
|
||||||
|
|
||||||
## API 说明
|
## FAQ
|
||||||
|
> 如果遇到了疑问,请优先参考 Demo 和 API 文档。若还无法解决,可访问[极光社区](http://community.jiguang.cn/)或 [Issues](https://github.com/jpush/jpush-phonegap-plugin/issues) 提问。
|
||||||
插件的 API 在 JPushPlugin.js 文件中,该文件的具体位置如下:
|
|
||||||
### Android
|
|
||||||
[Project]/assets/www/plugins/cn.jpush.phonegap.JPushPlugin/www
|
|
||||||
|
|
||||||
### iOS
|
|
||||||
[Project]/www/plugins/cn.jpush.phonegap.JPushPlugin/www
|
|
||||||
|
|
||||||
### 具体的 API 请参考:
|
|
||||||
|
|
||||||
- [公共 API](/doc/Common_detail_api.md)。
|
|
||||||
|
|
||||||
- [iOS API](/doc/iOS_API.md)。
|
|
||||||
|
|
||||||
- [Android API](/doc/Android_detail_api.md)。
|
|
||||||
|
|
||||||
|
|
||||||
## 常见问题
|
|
||||||
|
|
||||||
若要使用 CLI 来编译项目,注意应使用 cordova compile 而不是 cordova build 命令,因为如果修改了插件安装时默认写入到 AndroidManifest.xml
|
|
||||||
中的代码,cordova build 可能会导致对 AndroidManifest.xml 的修改。
|
|
||||||
Cordova CLI 的具体用法可参考 [Cordova CLI 官方文档](https://cordova.apache.org/docs/en/latest/reference/cordova-cli/index.html)。
|
|
||||||
|
|
||||||
### Android
|
### Android
|
||||||
|
#### 在 Eclipse 中 import 工程之后出现:*Type CallbackContext cannot be resolved to a type*。
|
||||||
- Eclipse 中 import PhoneGap 工程之后出现:*Type CallbackContext cannot be resolved to a type*。
|
右键单击工程名 -> Build Path -> Config Build Path -> Projects -> 选中工程名称 -> CordovaLib -> 点击 add。
|
||||||
|
|
||||||
解决方案:Eclipse 中右键单击工程名,Build Path -> Config Build Path -> Projects -> 选中工程名称 -> CordovaLib -> 点击 add。
|
|
||||||
|
|
||||||
### iOS
|
### iOS
|
||||||
|
#### PushConfig.plist 文件中的字段都是什么意思?
|
||||||
|
- APP_KEY:应用标识。
|
||||||
|
- CHANNEL:渠道标识。
|
||||||
|
- IsProduction:是否生产环境。
|
||||||
|
- IsIDFA:是否使用 IDFA 启动 SDK。
|
||||||
|
|
||||||
- 设置 PushConfig.plist:
|
#### 收不到推送了。
|
||||||
- APP_KEY:应用标识。
|
请首先按照正确方式再次配置证书、描述文件,具体可参考 [iOS 证书设置指南](http://docs.jpush.io/client/ios_tutorials/#ios_1)。
|
||||||
- CHANNEL:渠道标识。
|
|
||||||
- IsProduction:是否生产环境。
|
|
||||||
- IsIDFA:是否使用 IDFA 启动 SDK。
|
|
||||||
|
|
||||||
|
|
||||||
- 收不到推送:
|
## Support
|
||||||
请首先按照正确方式再次配置证书、描述文件,具体可参考 [iOS 证书设置指南](http://docs.jpush.io/client/ios_tutorials/#ios_1)。
|
- QQ 群:413602425
|
||||||
|
- [JPush 官网文档](http://docs.jpush.io/)
|
||||||
|
- [极光社区](http://community.jiguang.cn/)
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
Please contribute! [Look at the issues](https://github.com/jpush/jpush-phonegap-plugin/issues).
|
||||||
|
|
||||||
## 更多
|
## License
|
||||||
- QQ 群:413602425;
|
MIT © [JiGuang](/license)
|
||||||
- [JPush 官网文档](http://docs.jpush.io/);
|
|
||||||
- 如有问题可访问[极光社区](http://community.jiguang.cn/)。
|
|
||||||
|
21
license
Normal file
21
license
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) JiGuang <support@jpush.cn> (jiguang.cn)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
@ -30,8 +30,8 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"cordova-plugin-device": ">=1.0.0"
|
"cordova-plugin-device": ">=1.0.0"
|
||||||
},
|
},
|
||||||
"author": "jpush",
|
"author": "JiGuang",
|
||||||
"license": "Apache 2.0 License",
|
"license": "MIT",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/jpush/jpush-phonegap-plugin/issues"
|
"url": "https://github.com/jpush/jpush-phonegap-plugin/issues"
|
||||||
},
|
},
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<description>JPush for cordova plugin</description>
|
<description>JPush for cordova plugin</description>
|
||||||
<author>JPush</author>
|
<author>JPush</author>
|
||||||
<keywords>JPush,push</keywords>
|
<keywords>JPush,push</keywords>
|
||||||
<license>Apache 2.0 License</license>
|
<license>MIT License</license>
|
||||||
|
|
||||||
<preference name="API_KEY" />
|
<preference name="API_KEY" />
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user