Skip to content

Commit

Permalink
Merge pull request #16 from JoshLipan/jg
Browse files Browse the repository at this point in the history
jcore分离Android
  • Loading branch information
jiguang-official authored Jan 27, 2021
2 parents ecf1a4f + ab55faa commit c86dabe
Show file tree
Hide file tree
Showing 28 changed files with 206 additions and 40 deletions.
43 changes: 29 additions & 14 deletions JVerification_Hbuilder_Demo/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "JVerification_Hbuilder_Demo",
"appid" : "__UNI__6F8A505",
"appid" : "__UNI__6D60B07",
"description" : "极光认证 Hbuilder 集成 Demo",
"versionName" : "1.0.0",
"versionCode" : "100",
Expand Down Expand Up @@ -54,14 +54,12 @@
}
},
"nativePlugins" : {
"JG-JVerification" : {
"JPUSH_CHANNEL_IOS" : "",
"JPUSH_APPKEY_ANDROID" : "3bc7fe126f892557a954aa07",
"JPUSH_CHANNEL_ANDROID" : "",
"JPUSH_APPKEY_IOS" : "60e02a2a65ac4cdc6f80b776",
"JG-JCore" : {
"JPUSH_APPKEY_ANDROID" : "7b4b94cca0d185d611e53cca",
"JPUSH_CHANNEL_ANDROID" : "ddd",
"__plugin_info__" : {
"name" : "JG-JVerification",
"description" : "极光认证Hbuilder插件",
"name" : "JG-JCore",
"description" : "极光推送JCore插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
Expand All @@ -70,11 +68,6 @@
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道,不需要可填默认值 developer-default",
"key" : "JVerification:CHANNEL",
"value" : ""
},
"JPUSH_APPKEY_ANDROID" : {
"des" : "[Android]极光 portal 配置应用信息时分配的 AppKey",
"key" : "JPUSH_APPKEY",
Expand All @@ -84,11 +77,33 @@
"des" : "[Android]用于统计分发渠道,不需要可填默认值 developer-default",
"key" : "JPUSH_CHANNEL",
"value" : ""
},
}
}
}
},
"JG-JVerification" : {
"JPUSH_APPKEY_IOS" : "",
"JPUSH_CHANNEL_IOS" : "",
"__plugin_info__" : {
"name" : "JG-JVerification",
"description" : "极光认证Hbuilder插件",
"platforms" : "Android,iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {
"JPUSH_APPKEY_IOS" : {
"des" : "[iOS]极光 portal 配置应用信息时分配的 AppKey",
"key" : "JVerification:APP_KEY",
"value" : ""
},
"JPUSH_CHANNEL_IOS" : {
"des" : "[iOS]用于统计分发渠道,不需要可填默认值 developer-default",
"key" : "JVerification:CHANNEL",
"value" : ""
}
}
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// JCoreModule.h
// UniPluginJCore
//
// Created by huangshuni on 2021/1/21.
//

#import <Foundation/Foundation.h>
#import "DCUniModule.h"

NS_ASSUME_NONNULL_BEGIN

@interface JCoreModule : DCUniModule

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict>
<key>Info.plist</key>
<data>
iiDaCXrgXjUTZL/huUAmNMSpcog=
</data>
</dict>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
47 changes: 47 additions & 0 deletions JVerification_Hbuilder_Demo/nativeplugins/JG-JCore/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "JG-JCore",
"id": "JG-JCore",
"version": "1.0.0",
"description": "极光推送JCore插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
"ios": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "JCoreModule"
}
],
"integrateType": "framework"
},
"android": {
"plugins": [
{
"type": "module",
"name": "JG-JCore",
"class": "cn.jiguang.uniplugin_jcore.JCoreModule"
}
],
"integrateType": "aar",
"minSdkVersion": "16",
"permissions": [
],
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"parameters": {
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光 portal 配置应用信息时分配的 AppKey",
"key": "JPUSH_APPKEY"
},
"JPUSH_CHANNEL_ANDROID":{
"des": "[Android]用于统计分发渠道,不需要可填默认值 developer-default",
"key": "JPUSH_CHANNEL"
}
}
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "JG-JVerification",
"id": "JG-JVerification",
"version": "1.1.4",
"version": "2.0.0",
"description": "极光认证Hbuilder插件",
"_dp_type":"nativeplugin",
"_dp_nativeplugin":{
Expand Down Expand Up @@ -51,7 +51,7 @@
}
],
"integrateType": "aar",
"minSdkVersion": "16",
"minSdkVersion": "19",
"permissions": [
"android.permission.INTERNET",
"android.permission.READ_PHONE_STATE",
Expand All @@ -65,22 +65,7 @@
"android.permission.GET_TASKS",
"android.permission.VIBRATE",
"android.permission.WAKE_LOCK"
],
"abis": [
"armeabi-v7a",
"arm64-v8a",
"x86"
],
"parameters": {
"JPUSH_APPKEY_ANDROID": {
"des": "[Android]极光 portal 配置应用信息时分配的 AppKey",
"key": "JPUSH_APPKEY"
},
"JPUSH_CHANNEL_ANDROID":{
"des": "[Android]用于统计分发渠道,不需要可填默认值 developer-default",
"key": "JPUSH_CHANNEL"
}
}
]
}
}
}
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@

## 接入
- 1.将 nativeplugins/JG-JVerification 导入项目对应位置。
- 2.项目 manifest.json 中接入 JG-JVerification 插件。并配置好 appkey([极光 portal]() 注册分配),channel 信息。

<p align="center">
<a target="_blank">
       <img src="doc/conf.png" alt="config" width=600/>
</a>
</p>

- 2.项目 manifest.json 中接入 JG-JVerification 插件。
- 3.在项目中引用插件
```
const jv = uni.requireNativePlugin('JG-JVerification');
```
- 4.从 v2.0.0 版本开始还需引入[JG-JCore 插件](https://github.com/jpush/jcore-hbuilder-plugin)

### since v2.0.0 注意事项
为了适配更多的极光 Uniapp 插件,我们引入了极光 [Jcore 基础插件库](https://github.com/jpush/jcore-hbuilder-plugin)

从极光认证插件 2.0.0 版本开始,必须同时接入 JCore 插件才能正常使用。

已接入 2.0.0 版本之前的应用升级时请注意 appkey 和 channel 配置信息已转移至 JCore 中。


## DEMO 体验
Expand Down

0 comments on commit c86dabe

Please sign in to comment.