mirror of
https://github.com/jpush/jpush-phonegap-plugin.git
synced 2025-01-31 14:32:51 +08:00
修复抽离了APP KEY后的文档
This commit is contained in:
parent
f12e7a35d0
commit
b24b7064ba
47
README.md
47
README.md
@ -19,31 +19,44 @@ l## JPush PhoneGap Plugin ##
|
||||
|
||||
###Cordova CLI/Phonegap 安装 Android & iOS
|
||||
|
||||
3. 使用git命令将jpush phonegap插件下载的本地,将这个目录标记为`$JPUSH_PLUGIN_DIR`
|
||||
|
||||
git clone https://github.com/jpush/jpush-phonegap-plugin.git
|
||||
方法1:直接安装JPush PhoneGap Plugin
|
||||
|
||||
1. 安装JPush PhoneGap Plugin
|
||||
|
||||
cordova plugin add https://github.com/jpush/jpush-phonegap-plugin.git --variable API_KEY=your_jpush_appkey
|
||||
cordova plugin add org.apache.cordova.device
|
||||
|
||||
|
||||
4. 将`$JPUSH_PLUGIN_DIR/plugin.xml`文件中的AppKey替换为在Portal上注册该应用的的Key,例如(9fed5bcb7b9b87413678c407)
|
||||
|
||||
<meta-data android:name="JPUSH_APPKEY" android:value="your appkey"/>
|
||||
2. 在js中调用函数,初始化jpush sdk
|
||||
|
||||
4. 打开`$JPUSH_PLUGIN_DIR/src/ios/PushConfig.plist`文件将文件中的`7d431e42dfa6a6d693ac2d04`替换为在Portal上注册该应用的的Key,例如(9fed5bcb7b9b87413678c407)
|
||||
|
||||
|
||||
5. 在`$JPUSH_PLUGIN_DIR/src/android/JPushPlugin.java` 文件`import your.package.name.R`替换为在Portal上注册该应用的包名,例如(com.thi.pushtest)
|
||||
window.plugins.jPushPlugin.init();
|
||||
//由于phonegap插件采用了Lazy load的特性, 所以这里建议在js文件能执行的最开始就加
|
||||
|
||||
|
||||
6. cordova cli 添加jpush phonegap插件和依赖的device插件:
|
||||
|
||||
cordova plugin add $JPUSH_PLUGIN_DIR
|
||||
cordova plugin add org.apache.cordova.device
|
||||
|
||||
7. 在js中调用函数,初始化jpush sdk
|
||||
方法1:下载JPush PhoneGap Plugin到本地的安装方法
|
||||
|
||||
window.plugins.jPushPlugin.init();
|
||||
//由于phonegap插件采用了Lazy load的特性, 所以这里建议在js文件能执行的最开始就加
|
||||
1. 使用git命令将jpush phonegap插件下载的本地,将这个目录标记为`$JPUSH_PLUGIN_DIR`
|
||||
|
||||
git clone https://github.com/jpush/jpush-phonegap-plugin.git
|
||||
|
||||
|
||||
2. 安装JPush PhoneGap Plugin
|
||||
|
||||
cordova plugin add $JPUSH_PLUGIN_DIR --variable API_KEY=your_jpush_appkey
|
||||
cordova plugin add org.apache.cordova.device
|
||||
|
||||
|
||||
3. 在js中调用函数,初始化jpush sdk
|
||||
|
||||
window.plugins.jPushPlugin.init();
|
||||
//由于phonegap插件采用了Lazy load的特性, 所以这里建议在js文件能执行的最开始就加
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
### Android 手工安装
|
||||
|
||||
[Android 手工安装文档地址](document/Android_handle_install.md)
|
||||
|
Loading…
Reference in New Issue
Block a user