Mike 7 jaren geleden
bovenliggende
commit
e5f7182208
58 gewijzigde bestanden met toevoegingen van 1055 en 4289 verwijderingen
  1. 4 4
      miaomiao/config.xml
  2. BIN
      miaomiao/my-release-key.keystore
  3. 3 2
      miaomiao/package.json
  4. 24 10
      miaomiao/plugins/android.json
  5. 0 0
      miaomiao/plugins/cordova-hot-code-push-plugin/.npmInstalled
  6. 0 22
      miaomiao/plugins/cordova-plugin-weibosdk/LICENSE
  7. 0 119
      miaomiao/plugins/cordova-plugin-weibosdk/README.md
  8. 0 118
      miaomiao/plugins/cordova-plugin-weibosdk/README_ZH.md
  9. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/ScreenShot.png
  10. 0 802
      miaomiao/plugins/cordova-plugin-weibosdk/example_www/css/bootstrap.css
  11. 0 115
      miaomiao/plugins/cordova-plugin-weibosdk/example_www/css/index.css
  12. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/example_www/img/logo.png
  13. 0 31
      miaomiao/plugins/cordova-plugin-weibosdk/example_www/index.html
  14. 0 60
      miaomiao/plugins/cordova-plugin-weibosdk/example_www/js/index.js
  15. 0 104
      miaomiao/plugins/cordova-plugin-weibosdk/package.json
  16. 0 126
      miaomiao/plugins/cordova-plugin-weibosdk/plugin.xml
  17. 0 457
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/WeiboSDKPlugin.java
  18. 0 10
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/WeiboSDKPlugin.gradle
  19. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/openDefault-2.0.6.aar
  20. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/arm64-v8a/libweibosdkcore.so
  21. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/armeabi-v7a/libweibosdkcore.so
  22. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/armeabi/libweibosdkcore.so
  23. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/mips/libweibosdkcore.so
  24. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/mips64/libweibosdkcore.so
  25. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/x86/libweibosdkcore.so
  26. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/x86_64/libweibosdkcore.so
  27. 0 22
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/CDVWeiboSDK.h
  28. 0 314
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/CDVWeiboSDK.m
  29. 0 30
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WBHttpRequest+WeiboToken.h
  30. 0 184
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WBHttpRequest.h
  31. 0 89
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK+Statistics.h
  32. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/common_button_white@2x.png
  33. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png
  34. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/empty_failed@2x.png
  35. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/others/mfp.cer
  36. 0 573
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.h
  37. BIN
      miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/libWeiboSDK.a
  38. 0 30
      miaomiao/plugins/cordova-plugin-weibosdk/www/weibo.js
  39. 12 0
      miaomiao/plugins/cordova-plugin-whitelist/README.md
  40. 19 2
      miaomiao/plugins/cordova-plugin-whitelist/RELEASENOTES.md
  41. 16 85
      miaomiao/plugins/cordova-plugin-whitelist/package.json
  42. 1 3
      miaomiao/plugins/cordova-plugin-whitelist/plugin.xml
  43. 2 2
      miaomiao/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java
  44. 12 21
      miaomiao/plugins/fetch.json
  45. 8 0
      miaomiao/plugins/ios.json
  46. BIN
      miaomiao/plugins/jpush-phonegap-plugin/example/css/.DS_Store
  47. 0 0
      miaomiao/plugins/jpush-phonegap-plugin/example/css/index.css
  48. 0 0
      miaomiao/plugins/jpush-phonegap-plugin/example/css/jquery.mobile-1.1.1.css
  49. 276 276
      miaomiao/plugins/jpush-phonegap-plugin/example/css/mobiscroll.core-2.0.1.css
  50. 47 47
      miaomiao/plugins/jpush-phonegap-plugin/example/css/mobiscroll.jqm-2.0.1.css
  51. BIN
      miaomiao/plugins/jpush-phonegap-plugin/example/js/.DS_Store
  52. 0 0
      miaomiao/plugins/jpush-phonegap-plugin/example/js/jquery.js
  53. 0 0
      miaomiao/plugins/jpush-phonegap-plugin/example/js/jquery.mobile-1.1.1.js
  54. 16 16
      miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/AppDelegate+JPush.h
  55. 156 156
      miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/AppDelegate+JPush.m
  56. 94 94
      miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/JPushPlugin.h
  57. 365 365
      miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/JPushPlugin.m
  58. 0 0
      miaomiao/plugins/jpush-phonegap-plugin/src/ios/lib/jpush-ios-3.0.6.a

+ 4 - 4
miaomiao/config.xml

xqd
@@ -104,10 +104,10 @@
     <variable name="CAMERA_USAGE_DESCRIPTION" value="请摄像头对准条码"/>
   </plugin>
   <plugin name="cordova-plugin-whitelist" spec="^1.2.2"/>
-  <plugin name="cordova-plugin-offbye-alipay" spec="https://github.com/offbye/cordova-plugin-alipay.git">
+<!--   <plugin name="cordova-plugin-offbye-alipay" spec="https://github.com/offbye/cordova-plugin-alipay.git">
     <variable name="PARTNER_ID" value="2088721135315822"/>
-  </plugin>
-  <plugin name="cordova-plugin-weibosdk" spec="^0.6.0">
+  </plugin> -->
+<!--   <plugin name="cordova-plugin-weibosdk" spec="^0.6.0">
     <variable name="WEIBO_APP_ID" value="YOUR_WEIBO_APPID"/>
-  </plugin>
+  </plugin> -->
 </widget>

BIN
miaomiao/my-release-key.keystore


+ 3 - 2
miaomiao/package.json

xqd
@@ -47,11 +47,12 @@
     "cordova-hot-code-push-plugin",
     "jpush-phonegap-plugin@^3.2.1",
     "jpush-phonegap-plugin@^3.0.1",
-    "cordova-plugin-wechat",
     "phonegap-plugin-barcodescanner",
     "jpush-phonegap-plugin@2.2.8",
     "cordova-plugin-whitelist",
-    "cordova-plugin-weibosdk"
+    "cordova-plugin-wechat@^1.4.0",
+    "jpush-phonegap-plugin@^3.2.3",
+    "cordova-plugin-weibosdk@^0.6.0"
   ],
   "cordovaPlatforms": [
     "ios"

+ 24 - 10
miaomiao/plugins/android.json

xqd xqd
@@ -7,6 +7,14 @@
         "files": {}
     },
     "installed_plugins": {
+        "cordova-plugin-wechat": {
+            "WECHATAPPID": "wxc5181c0d406023e6",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "jpush-phonegap-plugin": {
+            "APP_KEY": "041b70b4c7eee686870a32cd",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
         "cordova-hot-code-push-plugin": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
@@ -22,31 +30,37 @@
         "cordova-plugin-console": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-device": {
-            "PACKAGE_NAME": "com.miaomiao.app"
-        },
         "cordova-plugin-file": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
         "cordova-plugin-file-transfer": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-jcore": {
+        "cordova-plugin-media-capture": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-media-capture": {
+        "cordova-plugin-splashscreen": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-offbye-alipay": {
-            "PARTNER_ID": "2088721135315822",
+        "cordova-plugin-statusbar": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-splashscreen": {
+        "cordova-plugin-whitelist": {
             "PACKAGE_NAME": "com.miaomiao.app"
         },
-        "cordova-plugin-statusbar": {
+        "ionic-plugin-keyboard": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "phonegap-plugin-barcodescanner": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-device": {
             "PACKAGE_NAME": "com.miaomiao.app"
         }
     },
-    "dependent_plugins": {}
+    "dependent_plugins": {
+        "cordova-plugin-jcore": {
+            "PACKAGE_NAME": "com.miaomiao.app"
+        }
+    }
 }

+ 0 - 0
miaomiao/plugins/cordova-hot-code-push-plugin/.npmInstalled


+ 0 - 22
miaomiao/plugins/cordova-plugin-weibosdk/LICENSE

xqd
@@ -1,22 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Van
-
-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.
-

+ 0 - 119
miaomiao/plugins/cordova-plugin-weibosdk/README.md

xqd
@@ -1,119 +0,0 @@
-# cordova-plugin-weibosdk
-[![npm](https://img.shields.io/npm/v/cordova-plugin-weibosdk.svg)](https://www.npmjs.com/package/cordova-plugin-weibosdk)
-[![npm](https://img.shields.io/npm/dm/cordova-plugin-weibosdk.svg)](https://www.npmjs.com/package/cordova-plugin-weibosdk)
-[![platform](https://img.shields.io/badge/platform-iOS%2FAndroid-lightgrey.svg?style=flat)](https://github.com/iVanPan/cordova_weibo)
-[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat)](https://github.com/iVanPan/cordova_weibo/blob/master/LICENSE)
-
-A Cordova wrapper around the Sina WeiboSDK for Android and iOS. Provides access to ssoLogin, WeiboSharing etc... [简体中文](https://github.com/iVanPan/cordova_weibo/blob/master/README_ZH.md)  
-
-
-## Feature
-- Weibo SSO Login
-- Weibo Logout
-- Weibo Share (WebPage,Text,Image)
-- Check Weibo Client is Installed
-
-## Requirements
-- Cordova Version 3.5+
-- Cordova-Android >= 4.0
-- Cordova-iOS >= 4.0			
-
-## Installation
-1. ```cordova plugin add cordova-plugin-weibosdk --variable WEIBO_APP_ID=YOUR_WEIBO_APPID```
-2. Add ```<preference name="REDIRECTURI" value="YOUR_WEIBO_REDIRECTURI" />``` in your config.xml If you don't add this preference the defualt redirecturi is https://api.weibo.com/oauth2/default.html               
-3. cordova build
-
-
-## Notes
-1. This plugin is required Cordova-Android version >= 4.0,so using Cordova 5.0 or higher is recommended
-2. This plugin should be used after the deviceready event has been fired!!!				
-3. ~~If Cordova version  <5.1.1,when two Cordova plugins are modifying “*-Info.plist” CFBundleURLTypes, only the first added plugin is getting the changes applied.so after installing plugin,please check the URLTypes in your Xcode project.You can find this issue [here](https://issues.apache.org/jira/browse/CB-8007).~~  Update:This Bug is fixed in last Cordova version(5.1.1)	
-
-
-## Usage
-
-### Weibo SSO Login
-```Javascript
-WeiboSDK.ssoLogin(function (args) {
-   alert('access token is ' + args.access_token);
-   alert('userId is ' + args.userId);
-   alert('expires_time is ' + new Date(parseInt(args.expires_time)) + ' TimeStamp is ' + args.expires_time);
-}, function (failReason) {
-   alert(failReason);
-});
-```
-
-### Weibo Logout
-```Javascript
-WeiboSDK.logout(function () {
-   alert('logout success');
-}, function (failReason) {
-   alert(failReason);
-});
-```
-
-### Weibo WebPage Share
-```Javascript
-var args = {};
-args.url = 'https://cordova.apache.org/';
-args.title = 'Apache Cordova';
-args.description = 'This is a Cordova Plugin';
-args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-WeiboSDK.shareToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-### Weibo Image Share
-```Javascript
-var args = {};
-args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-WeiboSDK.shareImageToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-### Weibo Text Share
-```Javascript
-var args = {};
-args.text = 'This is a Cordova Plugin';
-WeiboSDK.shareTextToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-### CheckClientInstalled
-```Javascript
-WeiboSDK.checkClientInstalled(function () {
-   alert('client is installed');
-}, function () {
-   alert('client is not installed');
-});
-```
-### GetUserInfo
-```Javascript
-var url = 'https://api.weibo.com/2/users/show.json?uid=' + usrid + '&&access_token=' + token;
-http.get(url)
-```
-
-## Example			
-1. install this plugin
-2. backup www folder in your cordova project
-3. replace www by example_www
-4. cordova build & test
-
-<div style="text-align:center"><img src="https://github.com/iVanPan/cordova_weibo/blob/master/ScreenShot.png?raw=true" alt="example" style="width:300px"></div> 
-
-## About WeiboSdk
-you can downlaod last weibosdk [here](https://github.com/sinaweibosdk) .if you find any problem about weibosdk, open an isssus please.
-
-## Contributing
-Feel free to contribute                 
-
-## License
-
-**cordova-plugin-weibosdk** is released under the **MIT** license. See [LICENSE](https://github.com/iVanPan/cordova_weibo/blob/master/LICENSE) file for more information.
-

+ 0 - 118
miaomiao/plugins/cordova-plugin-weibosdk/README_ZH.md

xqd
@@ -1,118 +0,0 @@
-# cordova-plugin-weibosdk
-[![npm](https://img.shields.io/npm/v/cordova-plugin-weibosdk.svg)](https://www.npmjs.com/package/cordova-plugin-weibosdk)
-[![npm](https://img.shields.io/npm/dm/cordova-plugin-weibosdk.svg)](https://www.npmjs.com/package/cordova-plugin-weibosdk)
-[![platform](https://img.shields.io/badge/platform-iOS%2FAndroid-lightgrey.svg?style=flat)](https://github.com/iVanPan/cordova_weibo)
-[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat)](https://github.com/iVanPan/cordova_weibo/blob/master/LICENSE)
-
-
-这是一个微博的 Cordova 插件. [English](https://github.com/iVanPan/cordova_weibo)    
-如果有任何问题或是建议,请开 issuss,也欢迎 star 或是 fork。微博SDK部分如有涉及版权问题,版权归新浪微博所有
-
-## 功能
-- 微博 SSO 登录
-- 微博登出
-- 微博分享(网页、文字、图片)
-- 检查微博官方客户端是否安装
-
-## 安装要求
-- Cordova Version >= 3.5
-- Cordova-Android >= 4.0
-- Cordova-iOS >= 4.0
-
-## 安装
-1. 命令行运行 ```cordova plugin add cordova-plugin-weibosdk --variable WEIBO_APP_ID=YOUR_WEIBO_APPID```			
-2. 在你的config.xml文件中添加 ```<preference name="REDIRECTURI" value="YOUR_WEIBO_REDIRECTURI" />``` 如果你不添加这个选项,那么默认的 redirecturi 是 https://api.weibo.com/oauth2/default.html               
-3. 命令行运行 cordova build   					
-
-# 注意事项
-1. 这个插件要求 Cordova-Android 的版本 >=4.0,推荐使用 Cordova 5.0 或更高的版本,因为从 Cordova 5.0 开始 Cordova-Android 4.0 是默认使用的 Android 版本
-2. 请在 Cordova 的 deviceready 事件触发以后再调用本插件!!!!!  
-3. <del>在低于5.1.1的 Cordova 版本中存在一个 Bug,如果你有多个插件要修改 iOS 工程中的 “*-Info.plist” CFBundleURLTypes, 只有第一个安装的插件才会生效.所以安装完插件请务必在你的 Xcode 工程里面检查一下 URLTypes。 关于这个 bug 的详情你可以在 [这里](https://issues.apache.org/jira/browse/CB-8007)找到</del> 建议安装使用5.1.1及以上的 Cordova 版本 						
-
-## 使用方法
-### 微博SSO登录
-```Javascript
-WeiboSDK.ssoLogin(function (args) {
-   alert('access token is ' + args.access_token);
-   alert('userId is ' + args.userId);
-   alert('expires_time is ' + new Date(parseInt(args.expires_time)) + ' TimeStamp is ' + args.expires_time);
-}, function (failReason) {
-   alert(failReason);
-});
-```
-
-
-### 微博登出
-```Javascript
-WeiboSDK.logout(function () {
-   alert('logout success');
-}, function (failReason) {
-   alert(failReason);
-});
-```
-
-### 微博网页分享
-```Javascript
-var args = {};
-args.url = 'https://cordova.apache.org/';
-args.title = 'Apache Cordova';
-args.description = 'This is a Cordova Plugin';
-args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-WeiboSDK.shareToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-
-### 微博图片分享
-```Javascript
-var args = {};
-args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-WeiboSDK.shareImageToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-
-### 微博文字分享
-```Javascript
-var args = {};
-args.text = 'This is a Cordova Plugin';
-WeiboSDK.shareTextToWeibo(function () {
-   alert('share success');
-}, function (failReason) {
-   alert(failReason);
-}, args);
-```
-
-### 检查微博客户端是否安装
-```Javascript
-WeiboSDK.checkClientInstalled(function () {
-   alert('client is installed');
-}, function () {
-   alert('client is not installed');
-});
-```
-
-### 获取用户信息
-```Javascript
-var url = 'https://api.weibo.com/2/users/show.json?uid=' + usrid + '&&access_token=' + token;
-http.get(url)
-```
-
-# 测试Demo
-在安装完这个插件以后,把 Cordova 工程中的代码替换为 example_www 中的代码,在 build 以后可以进行各个功能测试,以下为运行效果图:
-<div style="text-align:center"><img src="https://github.com/iVanPan/cordova_weibo/blob/master/ScreenShot.png?raw=true" alt="example" style="width:300px"></div>		
-
-## 关于微博SDK
-你可以在[这里](https://github.com/sinaweibosdk),找到最新的微博 SDK,如果发现 bug 请开 issus,同时也欢迎 star 和 fork
-
-## 贡献代码
-欢迎提交 PR,贡献你的代码,如果有新功能,请提供 Demo。
-
-## 开源证书
-
-**cordova-plugin-weibosdk** 遵照了 **MIT** 证书. 详情可以查看 [证书](https://github.com/iVanPan/cordova_weibo/blob/master/LICENSE) 文件
-

BIN
miaomiao/plugins/cordova-plugin-weibosdk/ScreenShot.png


+ 0 - 802
miaomiao/plugins/cordova-plugin-weibosdk/example_www/css/bootstrap.css

xqd
@@ -1,802 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2017 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-
-/*!
- * Generated using the Bootstrap Customizer (<none>)
- * Config saved to config.json and <none>
- */
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
-html {
-  font-family: sans-serif;
-  -ms-text-size-adjust: 100%;
-  -webkit-text-size-adjust: 100%;
-}
-body {
-  margin: 0;
-}
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-menu,
-nav,
-section,
-summary {
-  display: block;
-}
-audio,
-canvas,
-progress,
-video {
-  display: inline-block;
-  vertical-align: baseline;
-}
-audio:not([controls]) {
-  display: none;
-  height: 0;
-}
-[hidden],
-template {
-  display: none;
-}
-a {
-  background-color: transparent;
-}
-a:active,
-a:hover {
-  outline: 0;
-}
-abbr[title] {
-  border-bottom: 1px dotted;
-}
-b,
-strong {
-  font-weight: bold;
-}
-dfn {
-  font-style: italic;
-}
-h1 {
-  font-size: 2em;
-  margin: 0.67em 0;
-}
-mark {
-  background: #ff0;
-  color: #000;
-}
-small {
-  font-size: 80%;
-}
-sub,
-sup {
-  font-size: 75%;
-  line-height: 0;
-  position: relative;
-  vertical-align: baseline;
-}
-sup {
-  top: -0.5em;
-}
-sub {
-  bottom: -0.25em;
-}
-img {
-  border: 0;
-}
-svg:not(:root) {
-  overflow: hidden;
-}
-figure {
-  margin: 1em 40px;
-}
-hr {
-  -webkit-box-sizing: content-box;
-     -moz-box-sizing: content-box;
-          box-sizing: content-box;
-  height: 0;
-}
-pre {
-  overflow: auto;
-}
-code,
-kbd,
-pre,
-samp {
-  font-family: monospace, monospace;
-  font-size: 1em;
-}
-button,
-input,
-optgroup,
-select,
-textarea {
-  color: inherit;
-  font: inherit;
-  margin: 0;
-}
-button {
-  overflow: visible;
-}
-button,
-select {
-  text-transform: none;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
-  -webkit-appearance: button;
-  cursor: pointer;
-}
-button[disabled],
-html input[disabled] {
-  cursor: default;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
-  border: 0;
-  padding: 0;
-}
-input {
-  line-height: normal;
-}
-input[type="checkbox"],
-input[type="radio"] {
-  -webkit-box-sizing: border-box;
-     -moz-box-sizing: border-box;
-          box-sizing: border-box;
-  padding: 0;
-}
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
-  height: auto;
-}
-input[type="search"] {
-  -webkit-appearance: textfield;
-  -webkit-box-sizing: content-box;
-     -moz-box-sizing: content-box;
-          box-sizing: content-box;
-}
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
-  -webkit-appearance: none;
-}
-fieldset {
-  border: 1px solid #c0c0c0;
-  margin: 0 2px;
-  padding: 0.35em 0.625em 0.75em;
-}
-legend {
-  border: 0;
-  padding: 0;
-}
-textarea {
-  overflow: auto;
-}
-optgroup {
-  font-weight: bold;
-}
-table {
-  border-collapse: collapse;
-  border-spacing: 0;
-}
-td,
-th {
-  padding: 0;
-}
-* {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-*:before,
-*:after {
-  -webkit-box-sizing: border-box;
-  -moz-box-sizing: border-box;
-  box-sizing: border-box;
-}
-html {
-  font-size: 10px;
-  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-body {
-  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
-  font-size: 14px;
-  line-height: 1.42857143;
-  color: #333333;
-  background-color: #ffffff;
-}
-input,
-button,
-select,
-textarea {
-  font-family: inherit;
-  font-size: inherit;
-  line-height: inherit;
-}
-a {
-  color: #337ab7;
-  text-decoration: none;
-}
-a:hover,
-a:focus {
-  color: #23527c;
-  text-decoration: underline;
-}
-a:focus {
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-figure {
-  margin: 0;
-}
-img {
-  vertical-align: middle;
-}
-.img-responsive {
-  display: block;
-  max-width: 100%;
-  height: auto;
-}
-.img-rounded {
-  border-radius: 6px;
-}
-.img-thumbnail {
-  padding: 4px;
-  line-height: 1.42857143;
-  background-color: #ffffff;
-  border: 1px solid #dddddd;
-  border-radius: 4px;
-  -webkit-transition: all 0.2s ease-in-out;
-  -o-transition: all 0.2s ease-in-out;
-  transition: all 0.2s ease-in-out;
-  display: inline-block;
-  max-width: 100%;
-  height: auto;
-}
-.img-circle {
-  border-radius: 50%;
-}
-hr {
-  margin-top: 20px;
-  margin-bottom: 20px;
-  border: 0;
-  border-top: 1px solid #eeeeee;
-}
-.sr-only {
-  position: absolute;
-  width: 1px;
-  height: 1px;
-  margin: -1px;
-  padding: 0;
-  overflow: hidden;
-  clip: rect(0, 0, 0, 0);
-  border: 0;
-}
-.sr-only-focusable:active,
-.sr-only-focusable:focus {
-  position: static;
-  width: auto;
-  height: auto;
-  margin: 0;
-  overflow: visible;
-  clip: auto;
-}
-[role="button"] {
-  cursor: pointer;
-}
-.btn {
-  display: inline-block;
-  margin-bottom: 0;
-  font-weight: normal;
-  text-align: center;
-  vertical-align: middle;
-  -ms-touch-action: manipulation;
-      touch-action: manipulation;
-  cursor: pointer;
-  background-image: none;
-  border: 1px solid transparent;
-  white-space: nowrap;
-  padding: 6px 12px;
-  font-size: 14px;
-  line-height: 1.42857143;
-  border-radius: 4px;
-  -webkit-user-select: none;
-  -moz-user-select: none;
-  -ms-user-select: none;
-  user-select: none;
-}
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus,
-.btn.focus,
-.btn:active.focus,
-.btn.active.focus {
-  outline: 5px auto -webkit-focus-ring-color;
-  outline-offset: -2px;
-}
-.btn:hover,
-.btn:focus,
-.btn.focus {
-  color: #333333;
-  text-decoration: none;
-}
-.btn:active,
-.btn.active {
-  outline: 0;
-  background-image: none;
-  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
-  cursor: not-allowed;
-  opacity: 0.65;
-  filter: alpha(opacity=65);
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-a.btn.disabled,
-fieldset[disabled] a.btn {
-  pointer-events: none;
-}
-.btn-default {
-  color: #333333;
-  background-color: #ffffff;
-  border-color: #cccccc;
-}
-.btn-default:focus,
-.btn-default.focus {
-  color: #333333;
-  background-color: #e6e6e6;
-  border-color: #8c8c8c;
-}
-.btn-default:hover {
-  color: #333333;
-  background-color: #e6e6e6;
-  border-color: #adadad;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
-  color: #333333;
-  background-color: #e6e6e6;
-  border-color: #adadad;
-}
-.btn-default:active:hover,
-.btn-default.active:hover,
-.open > .dropdown-toggle.btn-default:hover,
-.btn-default:active:focus,
-.btn-default.active:focus,
-.open > .dropdown-toggle.btn-default:focus,
-.btn-default:active.focus,
-.btn-default.active.focus,
-.open > .dropdown-toggle.btn-default.focus {
-  color: #333333;
-  background-color: #d4d4d4;
-  border-color: #8c8c8c;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
-  background-image: none;
-}
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus {
-  background-color: #ffffff;
-  border-color: #cccccc;
-}
-.btn-default .badge {
-  color: #ffffff;
-  background-color: #333333;
-}
-.btn-primary {
-  color: #ffffff;
-  background-color: #337ab7;
-  border-color: #2e6da4;
-}
-.btn-primary:focus,
-.btn-primary.focus {
-  color: #ffffff;
-  background-color: #286090;
-  border-color: #122b40;
-}
-.btn-primary:hover {
-  color: #ffffff;
-  background-color: #286090;
-  border-color: #204d74;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
-  color: #ffffff;
-  background-color: #286090;
-  border-color: #204d74;
-}
-.btn-primary:active:hover,
-.btn-primary.active:hover,
-.open > .dropdown-toggle.btn-primary:hover,
-.btn-primary:active:focus,
-.btn-primary.active:focus,
-.open > .dropdown-toggle.btn-primary:focus,
-.btn-primary:active.focus,
-.btn-primary.active.focus,
-.open > .dropdown-toggle.btn-primary.focus {
-  color: #ffffff;
-  background-color: #204d74;
-  border-color: #122b40;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
-  background-image: none;
-}
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus {
-  background-color: #337ab7;
-  border-color: #2e6da4;
-}
-.btn-primary .badge {
-  color: #337ab7;
-  background-color: #ffffff;
-}
-.btn-success {
-  color: #ffffff;
-  background-color: #5cb85c;
-  border-color: #4cae4c;
-}
-.btn-success:focus,
-.btn-success.focus {
-  color: #ffffff;
-  background-color: #449d44;
-  border-color: #255625;
-}
-.btn-success:hover {
-  color: #ffffff;
-  background-color: #449d44;
-  border-color: #398439;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
-  color: #ffffff;
-  background-color: #449d44;
-  border-color: #398439;
-}
-.btn-success:active:hover,
-.btn-success.active:hover,
-.open > .dropdown-toggle.btn-success:hover,
-.btn-success:active:focus,
-.btn-success.active:focus,
-.open > .dropdown-toggle.btn-success:focus,
-.btn-success:active.focus,
-.btn-success.active.focus,
-.open > .dropdown-toggle.btn-success.focus {
-  color: #ffffff;
-  background-color: #398439;
-  border-color: #255625;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
-  background-image: none;
-}
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus {
-  background-color: #5cb85c;
-  border-color: #4cae4c;
-}
-.btn-success .badge {
-  color: #5cb85c;
-  background-color: #ffffff;
-}
-.btn-info {
-  color: #ffffff;
-  background-color: #5bc0de;
-  border-color: #46b8da;
-}
-.btn-info:focus,
-.btn-info.focus {
-  color: #ffffff;
-  background-color: #31b0d5;
-  border-color: #1b6d85;
-}
-.btn-info:hover {
-  color: #ffffff;
-  background-color: #31b0d5;
-  border-color: #269abc;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
-  color: #ffffff;
-  background-color: #31b0d5;
-  border-color: #269abc;
-}
-.btn-info:active:hover,
-.btn-info.active:hover,
-.open > .dropdown-toggle.btn-info:hover,
-.btn-info:active:focus,
-.btn-info.active:focus,
-.open > .dropdown-toggle.btn-info:focus,
-.btn-info:active.focus,
-.btn-info.active.focus,
-.open > .dropdown-toggle.btn-info.focus {
-  color: #ffffff;
-  background-color: #269abc;
-  border-color: #1b6d85;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
-  background-image: none;
-}
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus {
-  background-color: #5bc0de;
-  border-color: #46b8da;
-}
-.btn-info .badge {
-  color: #5bc0de;
-  background-color: #ffffff;
-}
-.btn-warning {
-  color: #ffffff;
-  background-color: #f0ad4e;
-  border-color: #eea236;
-}
-.btn-warning:focus,
-.btn-warning.focus {
-  color: #ffffff;
-  background-color: #ec971f;
-  border-color: #985f0d;
-}
-.btn-warning:hover {
-  color: #ffffff;
-  background-color: #ec971f;
-  border-color: #d58512;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
-  color: #ffffff;
-  background-color: #ec971f;
-  border-color: #d58512;
-}
-.btn-warning:active:hover,
-.btn-warning.active:hover,
-.open > .dropdown-toggle.btn-warning:hover,
-.btn-warning:active:focus,
-.btn-warning.active:focus,
-.open > .dropdown-toggle.btn-warning:focus,
-.btn-warning:active.focus,
-.btn-warning.active.focus,
-.open > .dropdown-toggle.btn-warning.focus {
-  color: #ffffff;
-  background-color: #d58512;
-  border-color: #985f0d;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
-  background-image: none;
-}
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus {
-  background-color: #f0ad4e;
-  border-color: #eea236;
-}
-.btn-warning .badge {
-  color: #f0ad4e;
-  background-color: #ffffff;
-}
-.btn-danger {
-  color: #ffffff;
-  background-color: #d9534f;
-  border-color: #d43f3a;
-}
-.btn-danger:focus,
-.btn-danger.focus {
-  color: #ffffff;
-  background-color: #c9302c;
-  border-color: #761c19;
-}
-.btn-danger:hover {
-  color: #ffffff;
-  background-color: #c9302c;
-  border-color: #ac2925;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
-  color: #ffffff;
-  background-color: #c9302c;
-  border-color: #ac2925;
-}
-.btn-danger:active:hover,
-.btn-danger.active:hover,
-.open > .dropdown-toggle.btn-danger:hover,
-.btn-danger:active:focus,
-.btn-danger.active:focus,
-.open > .dropdown-toggle.btn-danger:focus,
-.btn-danger:active.focus,
-.btn-danger.active.focus,
-.open > .dropdown-toggle.btn-danger.focus {
-  color: #ffffff;
-  background-color: #ac2925;
-  border-color: #761c19;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
-  background-image: none;
-}
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus {
-  background-color: #d9534f;
-  border-color: #d43f3a;
-}
-.btn-danger .badge {
-  color: #d9534f;
-  background-color: #ffffff;
-}
-.btn-link {
-  color: #337ab7;
-  font-weight: normal;
-  border-radius: 0;
-}
-.btn-link,
-.btn-link:active,
-.btn-link.active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
-  background-color: transparent;
-  -webkit-box-shadow: none;
-  box-shadow: none;
-}
-.btn-link,
-.btn-link:hover,
-.btn-link:focus,
-.btn-link:active {
-  border-color: transparent;
-}
-.btn-link:hover,
-.btn-link:focus {
-  color: #23527c;
-  text-decoration: underline;
-  background-color: transparent;
-}
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover,
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
-  color: #777777;
-  text-decoration: none;
-}
-.btn-lg {
-  padding: 10px 16px;
-  font-size: 18px;
-  line-height: 1.3333333;
-  border-radius: 6px;
-}
-.btn-sm {
-  padding: 5px 10px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-.btn-xs {
-  padding: 1px 5px;
-  font-size: 12px;
-  line-height: 1.5;
-  border-radius: 3px;
-}
-.btn-block {
-  display: block;
-  width: 100%;
-}
-.btn-block + .btn-block {
-  margin-top: 5px;
-}
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
-  width: 100%;
-}
-.clearfix:before,
-.clearfix:after {
-  content: " ";
-  display: table;
-}
-.clearfix:after {
-  clear: both;
-}
-.center-block {
-  display: block;
-  margin-left: auto;
-  margin-right: auto;
-}
-.pull-right {
-  float: right !important;
-}
-.pull-left {
-  float: left !important;
-}
-.hide {
-  display: none !important;
-}
-.show {
-  display: block !important;
-}
-.invisible {
-  visibility: hidden;
-}
-.text-hide {
-  font: 0/0 a;
-  color: transparent;
-  text-shadow: none;
-  background-color: transparent;
-  border: 0;
-}
-.hidden {
-  display: none !important;
-}
-.affix {
-  position: fixed;
-}

+ 0 - 115
miaomiao/plugins/cordova-plugin-weibosdk/example_www/css/index.css

xqd
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-* {
-    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
-}
-
-body {
-    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
-    background-color:#E4E4E4;
-    background-image:linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-ms-linear-gradient(top, #A7A7A7 0%, #E4E4E4 51%);
-    background-image:-webkit-gradient(
-        linear,
-        left top,
-        left bottom,
-        color-stop(0, #A7A7A7),
-        color-stop(0.51, #E4E4E4)
-    );
-    background-attachment:fixed;
-    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
-    font-size:12px;
-    height:100%;
-    margin:0px;
-    padding:0px;
-    text-transform:uppercase;
-    width:100%;
-}
-
-/* Portrait layout (default) */
-.app {
-    background:url(../img/logo.png) no-repeat center top; /* 170px x 200px */
-    position:absolute;             /* position in the center of the screen */
-    left:50%;
-    top:25%;
-    height:50px;                   /* text area height */
-    width:225px;                   /* text area width */
-    text-align:center;
-    padding:180px 0px 0px 0px;     /* image height is 200px (bottom 20px are overlapped with text) */
-    margin:-115px 0px 0px -112px;  /* offset vertical: half of image height and text area height */
-                                   /* offset horizontal: half of text area width */
-}
-
-/* Landscape layout (with min-width) */
-@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
-    .app {
-        background-position:left center;
-        padding:75px 0px 75px 170px;  /* padding-top + padding-bottom + text area = image height */
-        margin:-90px 0px 0px -198px;  /* offset vertical: half of image height */
-                                      /* offset horizontal: half of image width and text area width */
-    }
-}
-
-h1 {
-    font-size:24px;
-    font-weight:normal;
-    margin:0px;
-    overflow:visible;
-    padding:0px;
-    text-align:center;
-}
-
-.event {
-    border-radius:4px;
-    -webkit-border-radius:4px;
-    color:#FFFFFF;
-    font-size:12px;
-    margin:0px 30px;
-    padding:2px 0px;
-}
-
-.event.listening {
-    background-color:#333333;
-    display:block;
-}
-
-.event.received {
-    background-color:#4B946A;
-    display:none;
-}
-
-@keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-@-webkit-keyframes fade {
-    from { opacity: 1.0; }
-    50% { opacity: 0.4; }
-    to { opacity: 1.0; }
-}
- 
-.blink {
-    animation:fade 3000ms infinite;
-    -webkit-animation:fade 3000ms infinite;
-}

BIN
miaomiao/plugins/cordova-plugin-weibosdk/example_www/img/logo.png


+ 0 - 31
miaomiao/plugins/cordova-plugin-weibosdk/example_www/index.html

xqd
@@ -1,31 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8"/>
-    <meta name="format-detection" content="telephone=no"/>
-    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=3, minimum-scale=1, width=device-width"/>
-    <link rel="stylesheet" type="text/css" href="css/index.css"/>
-    <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
-    <script type="text/javascript" src="cordova.js"></script>
-    <script type="text/javascript" src="js/index.js"></script>
-    <script type="text/javascript">
-     document.addEventListener("deviceready", function(){
-      alert('device ready now');
-      appintance = new app();
-     }, true); 
-</script>
-<title>Corodva Weibo Plugin Exmaple</title>
-</head>
-<body>
-    <div class="app">
-        <div id="deviceready">
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.checkClientInstalled()">检查客户端是否安装</button>
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.ssoLogin()">微博登录</button>
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.logout()">微博登出</button>
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.shareToWeibo()">网页分享</button>
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.shareImageToWeibo()">图片分享</button>
-          <button type="button" class="btn btn-primary btn-block" onclick="appintance.shareTextToWeibo()">文字分享</button>
-        </div>
-      </div>
-    </body>
-    </html>

+ 0 - 60
miaomiao/plugins/cordova-plugin-weibosdk/example_www/js/index.js

xqd
@@ -1,60 +0,0 @@
-var app = function () {
-  this.checkClientInstalled = function () {
-    WeiboSDK.checkClientInstalled(function () {
-      alert('client is installed');
-    }, function () {
-      alert('client is not installed');
-    });
-  };
-
-  this.ssoLogin = function () {
-    WeiboSDK.ssoLogin(function (args) {
-      alert('access token is ' + args.access_token);
-      alert('userId is ' + args.userId);
-      alert('expires_time is ' + new Date(parseInt(args.expires_time)) + ' TimeStamp is ' + args.expires_time);
-    }, function (failReason) {
-      alert(failReason);
-    });
-  };
-
-  this.shareToWeibo = function () {
-    var args = {};
-    args.url = 'https://cordova.apache.org/';
-    args.title = 'Apache Cordova';
-    args.description = 'This is a Cordova Plugin';
-    args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-    WeiboSDK.shareToWeibo(function () {
-      alert('share success');
-    }, function (failReason) {
-      alert(failReason);
-    }, args);
-  };
-
-  this.shareImageToWeibo = function () {
-    var args = {};
-    args.image = 'https://cordova.apache.org/static/img/pluggy.png';
-    WeiboSDK.shareImageToWeibo(function () {
-      alert('share success');
-    }, function (failReason) {
-      alert(failReason);
-    }, args);
-  };
-
-  this.shareTextToWeibo = function () {
-    var args = {};
-    args.text = 'This is a Cordova Plugin';
-    WeiboSDK.shareTextToWeibo(function () {
-      alert('share success');
-    }, function (failReason) {
-      alert(failReason);
-    }, args);
-  };
-
-  this.logout = function () {
-    WeiboSDK.logout(function () {
-      alert('logout success');
-    }, function (failReason) {
-      alert(failReason);
-    });
-  }
-}

+ 0 - 104
miaomiao/plugins/cordova-plugin-weibosdk/package.json

xqd
@@ -1,104 +0,0 @@
-{
-  "_args": [
-    [
-      {
-        "raw": "cordova-plugin-weibosdk",
-        "scope": null,
-        "escapedName": "cordova-plugin-weibosdk",
-        "name": "cordova-plugin-weibosdk",
-        "rawSpec": "",
-        "spec": "latest",
-        "type": "tag"
-      },
-      "D:\\my\\miao\\miaomiao\\node_modules"
-    ]
-  ],
-  "_from": "cordova-plugin-weibosdk@latest",
-  "_id": "cordova-plugin-weibosdk@0.6.0",
-  "_inCache": true,
-  "_location": "/cordova-plugin-weibosdk",
-  "_nodeVersion": "6.11.0",
-  "_npmOperationalInternal": {
-    "host": "s3://npm-registry-packages",
-    "tmp": "tmp/cordova-plugin-weibosdk-0.6.0.tgz_1501734562893_0.7814945403952152"
-  },
-  "_npmUser": {
-    "name": "vanpan",
-    "email": "fan543119@gmail.com"
-  },
-  "_npmVersion": "3.10.10",
-  "_phantomChildren": {},
-  "_requested": {
-    "raw": "cordova-plugin-weibosdk",
-    "scope": null,
-    "escapedName": "cordova-plugin-weibosdk",
-    "name": "cordova-plugin-weibosdk",
-    "rawSpec": "",
-    "spec": "latest",
-    "type": "tag"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmjs.org/cordova-plugin-weibosdk/-/cordova-plugin-weibosdk-0.6.0.tgz",
-  "_shasum": "fd5f85fea174a23ae931017c2dc9725343b027e8",
-  "_shrinkwrap": null,
-  "_spec": "cordova-plugin-weibosdk",
-  "_where": "D:\\my\\miao\\miaomiao\\node_modules",
-  "author": {
-    "name": "https://github.com/iVanPan"
-  },
-  "bugs": {
-    "url": "https://github.com/iVanPan/cordova_weibo/issues"
-  },
-  "cordova": {
-    "id": "cordova-plugin-weibosdk",
-    "platforms": [
-      "android",
-      "ios"
-    ]
-  },
-  "dependencies": {},
-  "description": "codrova/phonegap wrapper for weibo sdk",
-  "devDependencies": {},
-  "directories": {},
-  "dist": {
-    "shasum": "fd5f85fea174a23ae931017c2dc9725343b027e8",
-    "tarball": "https://registry.npmjs.org/cordova-plugin-weibosdk/-/cordova-plugin-weibosdk-0.6.0.tgz"
-  },
-  "gitHead": "94f39de4bccf2e305e515cbd544b7a7621276362",
-  "homepage": "https://github.com/iVanPan/cordova_weibo",
-  "keywords": [
-    "ecosystem:cordova",
-    "cordova-android",
-    "cordova-ios",
-    "cordova",
-    "phonegap",
-    "plugin",
-    "weibosdk",
-    "weibo",
-    "sina",
-    "login",
-    "share"
-  ],
-  "license": "MIT",
-  "main": "index.js",
-  "maintainers": [
-    {
-      "name": "vanpan",
-      "email": "fan543119@gmail.com"
-    }
-  ],
-  "name": "cordova-plugin-weibosdk",
-  "optionalDependencies": {},
-  "readme": "ERROR: No README data found!",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/iVanPan/cordova_weibo.git"
-  },
-  "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
-  },
-  "version": "0.6.0"
-}

+ 0 - 126
miaomiao/plugins/cordova-plugin-weibosdk/plugin.xml

xqd
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
-  xmlns:android="http://schemas.android.com/apk/res/android"
-  id="cordova-plugin-weibosdk"
-  version="0.6.0">
-
-  <name>WeiboSDK</name>
-  <description>A Cordova wrapper around the Sina WeiboSDK for Android and iOS. Provides access to ssoLogin, WeiboShating etc</description>
-  <license>MIT</license>
-  <keywords>Cordova,Weibo</keywords>
-  <repo>https://github.com/iVanPan/cordova_weibo.git</repo>
-  <issue>https://github.com/iVanPan/cordova_weibo/issues</issue>
-
-  <preference name="WEIBO_APP_ID" />
-  <!--require cordova version -->
-  <engines>
-    <engine name="cordova" version=">=3.5.0" />
-    <engine name="cordova-android" version=">=4.0.0" />
-    <engine name="cordova-ios" version=">=4.0.0" />
-  </engines>
-
-  <!-- js module-->
-  <js-module src="www/weibo.js" name="WeiboSDK">
-    <clobbers target="WeiboSDK" />
-  </js-module>
-
-  <!-- ios -->
-  <platform name="ios">
-    <config-file target="config.xml" parent="/*">
-      <feature name="WeiboSDK">
-        <param name="ios-package" value="CDVWeiboSDK"/>
-      </feature>
-     <access origin="http://*.weibo.cn" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <access origin="http://*.sina.cn" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <access origin="http://*.sinaimg.cn" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <access origin="http://*.weibo.com" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <access origin="http://*.sinajs.cn" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <access origin="http://*.sina.com.cn" minimum-tls-version='TLSv1.0' requires-forward-secrecy='false'/>
-     <preference name="WEIBO_APP_ID" value="$WEIBO_APP_ID"/>
-   </config-file>
-   <!--set ios URLTypes for Weibo -->
-   <config-file platform="ios" target="*-Info.plist" parent="CFBundleURLTypes">
-    <array>
-      <dict>
-        <key>CFBundleTypeRole</key>
-        <string>Editor</string>
-        <key>CFBundleURLName</key>
-        <string>$PACKAGE_NAME</string>
-        <key>CFBundleURLSchemes</key>
-        <array>
-          <string>wb$WEIBO_APP_ID</string>
-        </array>
-      </dict>
-    </array>
-  </config-file>
-  <!--scheme query whitlist-->
-  <config-file platform="ios" target="*-Info.plist" parent="LSApplicationQueriesSchemes">
-      <array>
-		    <string>sinaweibohd</string>
-		    <string>sinaweibo</string>
-		    <string>weibosdk</string>
-		    <string>weibosdk2.5</string>
-      </array>
-  </config-file>
-  <header-file src="src/ios/CDVWeiboSDK.h"/>
-  <source-file src="src/ios/CDVWeiboSDK.m"/>
-  <!-- Weibo sdk version 3.2.0 https://github.com/sinaweibosdk/weibo_ios_sdk -->
-  <header-file src="src/ios/libWeiboSDK/WBHttpRequest.h" />
-  <header-file src="src/ios/libWeiboSDK/WBHttpRequest+WeiboToken.h" />
-  <header-file src="src/ios/libWeiboSDK/WeiboSDK.h" />
-  <header-file src="src/ios/libWeiboSDK/WeiboSDK+Statistics.h" />
-  <source-file src="src/ios/libWeiboSDK/libWeiboSDK.a" framework="true"  compiler-flags="-objc"/>
-  <resource-file src="src/ios/libWeiboSDK/WeiboSDK.bundle" />
-
-  <!--required frameworks for weibo sdk-->
-  <framework src="QuartzCore.framework" />
-  <framework src="ImageIO.framework" />
-  <framework src="SystemConfiguration.framework" />
-  <framework src="Security.framework" />
-  <framework src="CoreTelephony.framework" />
-  <framework src="CoreText.framework" />
-  <framework src="Foundation.framework" />
-  <framework src="CoreGraphics.framework" />
-  <framework src="libz.tbd" />
-  <framework src="libsqlite3.tbd" />
-  <info>
-    1.安装完这个插件,请用 Xcode 打开工程,查看 URL Types 里面 Weibo 的 URL Type 有没有,如果没有请手动添加。
-    
-    1.after installing this plugin,check the URL Types in your Xcode project.If you don't find URL Types for weibosdk,manually add it.
-  </info>
-</platform>
-<!-- android -->
-<platform name="android">
-  <config-file target="res/xml/config.xml" parent="/*">
-    <feature name="WeiboSDK" >
-      <param name="android-package" value="me.vanpan.weibosdk.WeiboSDKPlugin"/>
-    </feature>
-    <access origin="https://open.weibo.cn/*" />
-    <access origin="https://login.sina.com.cn/*" />
-    <access origin="https://passport.weibo.cn/*"/>
-    <access origin="http://*.sinaimg.cn/*"/>
-    <access origin="https://api.weibo.com/*"/>
-    <preference name="WEIBO_APP_ID" value="$WEIBO_APP_ID"/>
-  </config-file>
-  <!-- android  uses-permission for weibo sdk-->
-  <config-file target="AndroidManifest.xml" parent="/manifest">
-    <uses-permission android:name="android.permission.INTERNET" />
-    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
-    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
-  </config-file>
-
-  <source-file src="src/android/WeiboSDKPlugin.java" target-dir="src/me/vanpan/weibosdk" />
-  <!-- android weibo sdk version 4.0.0(2.0.6)  https://github.com/sinaweibosdk/weibo_android_sdk-->
-  <source-file src="src/android/libs/so/arm64-v8a/libweibosdkcore.so" target-dir="libs/arm64-v8a/"/>
-  <source-file src="src/android/libs/so/armeabi/libweibosdkcore.so" target-dir="libs/armeabi/"/>
-  <source-file src="src/android/libs/so/armeabi-v7a/libweibosdkcore.so" target-dir="libs/armeabi-v7a/"/>
-  <source-file src="src/android/libs/so/mips/libweibosdkcore.so" target-dir="libs/mips/"/>
-  <source-file src="src/android/libs/so/mips64/libweibosdkcore.so" target-dir="libs/mips64/"/>
-  <source-file src="src/android/libs/so/x86/libweibosdkcore.so" target-dir="libs/x86/"/>
-  <source-file src="src/android/libs/so/x86_64/libweibosdkcore.so" target-dir="libs/x86_64/"/>
-  <source-file src="src/android/libs/openDefault-2.0.6.aar" target-dir="libs/" />
-  <framework src="src/android/libs/WeiboSDKPlugin.gradle" custom="true" type="gradleReference" />
-</platform>
-</plugin>

+ 0 - 457
miaomiao/plugins/cordova-plugin-weibosdk/src/android/WeiboSDKPlugin.java

xqd
@@ -1,457 +0,0 @@
-package me.vanpan.weibosdk;
-
-import android.content.Intent;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.util.Base64;
-import android.webkit.URLUtil;
-
-import com.sina.weibo.sdk.WbSdk;
-import com.sina.weibo.sdk.WeiboAppManager;
-import com.sina.weibo.sdk.api.ImageObject;
-import com.sina.weibo.sdk.api.TextObject;
-import com.sina.weibo.sdk.api.WeiboMultiMessage;
-import com.sina.weibo.sdk.auth.AccessTokenKeeper;
-import com.sina.weibo.sdk.auth.AuthInfo;
-import com.sina.weibo.sdk.auth.Oauth2AccessToken;
-import com.sina.weibo.sdk.auth.WbAppInfo;
-import com.sina.weibo.sdk.auth.WbConnectErrorMessage;
-import com.sina.weibo.sdk.auth.sso.SsoHandler;
-import com.sina.weibo.sdk.share.WbShareCallback;
-import com.sina.weibo.sdk.share.WbShareHandler;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import org.apache.cordova.CallbackContext;
-import org.apache.cordova.CordovaArgs;
-import org.apache.cordova.CordovaPlugin;
-import org.apache.cordova.PluginResult;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-public class WeiboSDKPlugin extends CordovaPlugin implements WbShareCallback {
-
-    private static final String SCOPE = "email,direct_messages_read,direct_messages_write,"
-            + "friendships_groups_read,friendships_groups_write,statuses_to_me_read,"
-            + "follow_app_official_microblog," + "invitation_write";
-    private static final String WEBIO_APP_ID = "weibo_app_id";
-    private static final String WEBIO_REDIRECT_URL = "redirecturi";
-    private static final String DEFAULT_URL = "https://api.weibo.com/oauth2/default.html";
-    private static final String CANCEL_BY_USER = "cancel by user";
-    private static final String WEIBO_EXCEPTION = "weibo exception";
-    private static final String PARAM_ERROR = "param error";
-    private static final String ONLY_GET_CODE = "only get code";
-    private static final String SHARE_FAIL ="sharefail";
-    private static final String WEIBO_CLIENT_NOT_INSTALLED = "weibo client is not installed";
-    public static CallbackContext currentCallbackContext;
-    public static String APP_KEY;
-    public static WbShareHandler shareHandler = null;
-    private Oauth2AccessToken mAccessToken;
-    private String REDIRECT_URL;
-    private SsoHandler mSsoHandler;
-
-    @Override
-    protected void pluginInitialize() {
-        super.pluginInitialize();
-        APP_KEY = webView.getPreferences().getString(WEBIO_APP_ID, "");
-        REDIRECT_URL = webView.getPreferences().getString(WEBIO_REDIRECT_URL, DEFAULT_URL);
-        WbSdk.install(WeiboSDKPlugin.this.cordova.getActivity(),new AuthInfo(WeiboSDKPlugin.this.cordova.getActivity(), APP_KEY, REDIRECT_URL, SCOPE));
-    }
-
-    @Override
-    public boolean execute(String action, final CordovaArgs args,
-                           final CallbackContext callbackContext) throws JSONException {
-        if (action.equalsIgnoreCase("ssoLogin")) {
-            return ssoLogin(callbackContext);
-        } else if (action.equalsIgnoreCase("logout")) {
-            return logout(callbackContext);
-        } else if (action.equalsIgnoreCase("shareToWeibo")) {
-            return shareToWeibo(callbackContext, args);
-        } else if (action.equalsIgnoreCase("checkClientInstalled")) {
-            return checkClientInstalled(callbackContext);
-        } else if (action.equalsIgnoreCase("shareImageToWeibo")) {
-            return shareImageToWeibo(callbackContext,args);
-        } else if (action.equalsIgnoreCase("shareTextToWeibo")) {
-            return shareTextToWeibo(callbackContext,args);
-        }
-        return super.execute(action, args, callbackContext);
-    }
-
-    /**
-     * weibo sso 登录
-     *
-     * @param callbackContext
-     * @return
-     */
-    private boolean ssoLogin(CallbackContext callbackContext) {
-        currentCallbackContext = callbackContext;
-        mSsoHandler = new SsoHandler(WeiboSDKPlugin.this.cordova.getActivity());
-        Runnable runnable = new Runnable() {
-            public void run() {
-                if (mSsoHandler != null) {
-                    mSsoHandler.authorize(new SelfWbAuthListener());
-                }
-            }
-        };
-        this.cordova.setActivityResultCallback(this);
-        this.cordova.getActivity().runOnUiThread(runnable);
-        return true;
-    }
-
-    /**
-     * 检查微博客户端是否安装
-     *
-     * @param callbackContext
-     * @return
-     */
-    private boolean checkClientInstalled(CallbackContext callbackContext) {
-        WbAppInfo wbAppInfo = WeiboAppManager.getInstance(WeiboSDKPlugin.this.cordova.getActivity()).getWbAppInfo();
-        Boolean installed = (wbAppInfo != null && wbAppInfo.isLegal());
-        if (installed) {
-            callbackContext.success();
-        } else {
-            callbackContext.error(WEIBO_CLIENT_NOT_INSTALLED);
-        }
-        return true;
-    }
-
-    /**
-     * 微博登出
-     *
-     * @param callbackContext
-     * @return
-     */
-    private boolean logout(CallbackContext callbackContext) {
-        AccessTokenKeeper.clear(this.cordova.getActivity());
-        mAccessToken = new Oauth2AccessToken();
-        callbackContext.success();
-        return true;
-    }
-
-    /**
-     * 微博分享网页
-     *
-     * @param callbackContext
-     * @param args
-     * @return
-     */
-    private boolean shareToWeibo(final CallbackContext callbackContext,
-                                 final CordovaArgs args) {
-        currentCallbackContext = callbackContext;
-        if (shareHandler == null) {
-            shareHandler = new WbShareHandler(WeiboSDKPlugin.this.cordova.getActivity());
-        }
-        shareHandler.registerApp();
-        cordova.getThreadPool().execute(new Runnable() {
-
-            @Override
-            public void run() {
-                sendMultiMessage(callbackContext,args);
-            }
-        });
-        return true;
-    }
-
-    /**
-     * 微博图片分享
-     * @param callbackContext
-     * @param args
-     * @return
-     */
-    private boolean shareImageToWeibo(final CallbackContext callbackContext,
-        final CordovaArgs args) {
-        currentCallbackContext = callbackContext;
-        if (shareHandler == null) {
-            shareHandler = new WbShareHandler(WeiboSDKPlugin.this.cordova.getActivity());
-        }
-        shareHandler.registerApp();
-        cordova.getThreadPool().execute(new Runnable() {
-
-            @Override
-            public void run() {
-                sendImageMessage(callbackContext,args);
-            }
-        });
-        return true;
-    }
-
-    /**
-     * 分享文字到微博
-     * @param callbackContext
-     * @param args
-     * @return
-     */
-    private boolean shareTextToWeibo(final CallbackContext callbackContext,
-        final CordovaArgs args) {
-        currentCallbackContext = callbackContext;
-        if (shareHandler == null) {
-            shareHandler = new WbShareHandler(WeiboSDKPlugin.this.cordova.getActivity());
-        }
-        shareHandler.registerApp();
-        cordova.getThreadPool().execute(new Runnable() {
-
-            @Override
-            public void run() {
-                sendTextMessage(callbackContext,args);
-            }
-        });
-        return true;
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
-        super.onActivityResult(requestCode, resultCode, intent);
-        if (mSsoHandler != null) {
-            mSsoHandler.authorizeCallBack(requestCode, resultCode, intent);
-        }
-    }
-
-    /**
-     * 第三方应用发送请求消息到微博,唤起微博分享界面。
-     */
-    private void sendMultiMessage(final CallbackContext callbackContext, CordovaArgs args) {
-        // 1. 初始化微博的分享消息
-        WeiboMultiMessage weiboMessage = new WeiboMultiMessage();
-        final JSONObject data;
-        try {
-            data = args.getJSONObject(0);
-            String title = data.has("title")?  data.getString("title"): "";
-            String url = data.has("url")?  data.getString("url"): "";
-            String description = data.has("description")?  data.getString("description"): "";
-            String image = data.has("image")?  data.getString("image"): "";
-            Bitmap imageData = processImage(image);
-            //WebpageObject mediaObject = new WebpageObject();
-            //mediaObject.identify = Utility.generateGUID();
-            //mediaObject.title = title;
-            //mediaObject.description = description;
-            //mediaObject.actionUrl = url;
-            if (imageData != null) {
-                //注意:最终压缩过的缩略图大小不得超过 32kb。
-                ImageObject imageObject = new ImageObject();
-                imageObject.setImageObject(imageData);
-                weiboMessage.imageObject = imageObject;
-               // mediaObject.setThumbImage(imageData);
-            }
-           // weiboMessage.mediaObject = mediaObject;
-            TextObject textObject = new TextObject();
-            textObject.text = description + " " + url;
-            textObject.title = title;
-            weiboMessage.textObject = textObject;
-            shareHandler.shareMessage(weiboMessage, false);
-        } catch (JSONException e) {
-            WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.ERROR, PARAM_ERROR),
-                callbackContext.getCallbackId());
-        }
-    }
-
-    /**
-     * 组装图片分享消息
-     * @param callbackContext
-     * @param args
-     */
-    private void sendImageMessage(final CallbackContext callbackContext, CordovaArgs args) {
-        WeiboMultiMessage weiboMessage = new WeiboMultiMessage();
-        final JSONObject data;
-        try {
-            data = args.getJSONObject(0);
-            String image = data.has("image")?  data.getString("image"): "";
-            Bitmap imageData = processImage(image);
-            if (imageData != null) {
-                //注意:最终压缩过的缩略图大小不得超过 32kb。
-                ImageObject imageObject = new ImageObject();
-                imageObject.setImageObject(imageData);
-                weiboMessage.imageObject = imageObject;
-            }
-            shareHandler.shareMessage(weiboMessage, false);
-        } catch (JSONException e) {
-            WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.ERROR, PARAM_ERROR),
-                callbackContext.getCallbackId());
-        }
-    }
-
-    /**
-     * 组装微博文字分享消息
-     * @param callbackContext
-     * @param args
-     */
-    private void sendTextMessage(final CallbackContext callbackContext, CordovaArgs args) {
-        // 1. 初始化微博的分享消息
-        WeiboMultiMessage weiboMessage = new WeiboMultiMessage();
-        final JSONObject data;
-        try {
-            data = args.getJSONObject(0);
-            String text = data.has("text")?  data.getString("text"): "";
-            TextObject textObject = new TextObject();
-            textObject.text = text;
-            weiboMessage.textObject = textObject;
-            shareHandler.shareMessage(weiboMessage, false);
-        } catch (JSONException e) {
-            WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.ERROR, PARAM_ERROR),
-                callbackContext.getCallbackId());
-        }
-    }
-    /**
-     * 组装JSON
-     *
-     * @param access_token
-     * @param userId
-     * @param expires_time
-     * @return
-     */
-    private JSONObject makeJson(String access_token, String userId, long expires_time) {
-        String json = "{\"access_token\": \"" + access_token + "\", " +
-            " \"userId\": \"" + userId
-            + "\", " +
-            " \"expires_time\": \"" + String.valueOf(expires_time) + "\"" +
-            "}";
-        JSONObject jo = null;
-        try {
-            jo = new JSONObject(json);
-        } catch (JSONException e) {
-            e.printStackTrace();
-        }
-        return jo;
-    }
-    /**
-     * 处理图片
-     * @param image
-     * @return
-     */
-    private Bitmap processImage(String image) {
-        if(URLUtil.isHttpUrl(image) || URLUtil.isHttpsUrl(image)) {
-            return getBitmapFromURL(image);
-        } else if (isBase64(image)) {
-            return decodeBase64ToBitmap(image);
-        } else {
-            return getBitmapByPath(image);
-        }
-    }
-
-    /**
-     * 检查图片字符串是不是Base64
-     * @param image
-     * @return
-     */
-    private boolean isBase64(String image) {
-        try {
-            byte[] decodedString = Base64.decode(image, Base64.DEFAULT);
-            Bitmap bitmap = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);
-            if (bitmap == null) {
-                return false;
-            }
-            return true;
-        } catch (Exception e) {
-            return false;
-        }
-    }
-
-    /**
-     * 将图片的 URL 转化为 Bitmap
-     * @param src
-     * @return
-     */
-    public static Bitmap getBitmapFromURL(String src) {
-        try {
-            URL url = new URL(src);
-            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
-            connection.setDoInput(true);
-            connection.connect();
-            InputStream input = connection.getInputStream();
-            Bitmap bitmap = BitmapFactory.decodeStream(input);
-            return bitmap;
-        } catch (IOException e) {
-            return null;
-        }
-    }
-
-    /**
-     * 根据文件路径生成 Bitmap
-     * @param path
-     * @return
-     */
-    public static Bitmap getBitmapByPath(String path) {
-        if (path == null)
-            return null;
-        try {
-            Bitmap bitmap = BitmapFactory.decodeFile(path);
-            return bitmap;
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        } catch (Error e) {
-            e.printStackTrace();
-            return null;
-        }
-    }
-
-    /**
-     * 将Base64解码成Bitmap
-     */
-
-    private Bitmap decodeBase64ToBitmap(String Base64String) {
-        byte[] decode = Base64.decode(Base64String, Base64.DEFAULT);
-        Bitmap bitmap = BitmapFactory.decodeByteArray(decode, 0, decode.length);
-        return bitmap;
-    }
-
-    @Override public void onWbShareSuccess() {
-        WeiboSDKPlugin.currentCallbackContext.success();
-    }
-
-    @Override public void onWbShareCancel() {
-        WeiboSDKPlugin.currentCallbackContext.error(CANCEL_BY_USER);
-    }
-
-    @Override public void onWbShareFail() {
-        WeiboSDKPlugin.currentCallbackContext.error(SHARE_FAIL);
-    }
-
-    @Override
-    public void onNewIntent(Intent intent) {
-        super.onNewIntent(intent);
-        WeiboSDKPlugin.shareHandler.doResultIntent(intent,this);
-    }
-
-    private class SelfWbAuthListener implements com.sina.weibo.sdk.auth.WbAuthListener{
-        @Override
-        public void onSuccess(final Oauth2AccessToken token) {
-            mAccessToken = token;
-            if (mAccessToken.isSessionValid()) {
-                AccessTokenKeeper.writeAccessToken(
-                    WeiboSDKPlugin.this.cordova.getActivity(), mAccessToken);
-                JSONObject jo = makeJson(mAccessToken.getToken(),
-                    mAccessToken.getUid(),mAccessToken.getExpiresTime());
-                WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.OK, jo), currentCallbackContext.getCallbackId());
-            } else {
-                // 以下几种情况,您会收到 Code:
-                // 1. 当您未在平台上注册的应用程序的包名与签名时;
-                // 2. 当您注册的应用程序包名与签名不正确时;
-                // 3. 当您在平台上注册的包名和签名与您当前测试的应用的包名和签名不匹配时。
-                // String code = values.getString("code");
-                WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                        PluginResult.Status.ERROR, ONLY_GET_CODE),
-                    currentCallbackContext.getCallbackId());
-            }
-        }
-
-        @Override
-        public void cancel() {
-            WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.ERROR, CANCEL_BY_USER),
-                currentCallbackContext.getCallbackId());
-        }
-
-        @Override
-        public void onFailure(WbConnectErrorMessage errorMessage) {
-            WeiboSDKPlugin.this.webView.sendPluginResult(new PluginResult(
-                    PluginResult.Status.ERROR, WEIBO_EXCEPTION),
-                currentCallbackContext.getCallbackId());
-        }
-    }
-}

+ 0 - 10
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/WeiboSDKPlugin.gradle

xqd
@@ -1,10 +0,0 @@
-
-repositories{
-    flatDir {
-        dirs 'libs'
-    }
-}
-
-dependencies {
-    compile(name: 'openDefault-2.0.6', ext: 'aar')
-}

BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/openDefault-2.0.6.aar


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/arm64-v8a/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/armeabi-v7a/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/armeabi/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/mips/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/mips64/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/x86/libweibosdkcore.so


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/android/libs/so/x86_64/libweibosdkcore.so


+ 0 - 22
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/CDVWeiboSDK.h

xqd
@@ -1,22 +0,0 @@
-#import <Cordova/CDVPlugin.h>
-#import "WeiboSDK.h"
-
-@interface CDVWeiboSDK : CDVPlugin <WeiboSDKDelegate, WBHttpRequestDelegate>
-
-@property (nonatomic, copy) NSString *callbackId;
-@property (nonatomic, copy) NSString *redirectURI;
-@property (nonatomic, copy) NSString *weiboAppId;
-
-- (void)ssoLogin:(CDVInvokedUrlCommand *)command;
-
-- (void)logout:(CDVInvokedUrlCommand *)command;
-
-- (void)shareToWeibo:(CDVInvokedUrlCommand *)command;
-
-- (void)checkClientInstalled:(CDVInvokedUrlCommand *)command;
-
-- (void)shareImageToWeibo:(CDVInvokedUrlCommand *)command;
-
-- (void)shareTextToWeibo:(CDVInvokedUrlCommand *)command;
-
-@end

+ 0 - 314
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/CDVWeiboSDK.m

xqd
@@ -1,314 +0,0 @@
-#import "CDVWeiboSDK.h"
-
-NSString *WEBIO_APP_ID = @"weibo_app_id";
-NSString *WEBIO_REDIRECT_URI = @"redirecturi";
-NSString *WEBIO_DEFUALT_REDIRECT_URI = @"https://api.weibo.com/oauth2/default.html";
-NSString *WEIBO_CANCEL_BY_USER = @"cancel by user";
-NSString *WEIBO_SHARE_INSDK_FAIL = @"share in sdk failed";
-NSString *WEIBO_SEND_FAIL = @"send failed";
-NSString *WEIBO_UNSPPORTTED = @"Weibo unspport";
-NSString *WEIBO_AUTH_ERROR = @"Weibo auth error";
-NSString *WEIBO_UNKNOW_ERROR = @"Weibo unknow error";
-NSString *WEIBO_TOKEN_EMPTY = @"Weibo token is empty";
-NSString *WEIBO_USER_CANCEL_INSTALL = @"user cancel install weibo";
-
-@implementation CDVWeiboSDK
-/**
- *  插件初始化主要用于appkey的注册
- */
-- (void)pluginInitialize {
-    NSString *weiboAppId = [[self.commandDelegate settings] objectForKey:WEBIO_APP_ID];
-    self.weiboAppId = weiboAppId;
-    [WeiboSDK registerApp:weiboAppId];
-    NSString *redirectURI = [[self.commandDelegate settings] objectForKey:WEBIO_REDIRECT_URI];
-    if (nil == redirectURI) {
-        self.redirectURI = WEBIO_DEFUALT_REDIRECT_URI;
-    } else {
-        self.redirectURI = redirectURI;
-    }
-}
-/**
- *  检查微博官方客户端是否安装
- *
- *  @param command CDVInvokedUrlCommand
- */
-- (void)checkClientInstalled:(CDVInvokedUrlCommand *)command {
-    if ([WeiboSDK isWeiboAppInstalled]) {
-        CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
-        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-    } else {
-        CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
-        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-    }
-}
-
-/**
- *  微博单点登录
- *
- *  @param command CDVInvokedUrlCommand
- */
-- (void)ssoLogin:(CDVInvokedUrlCommand *)command {
-    self.callbackId = command.callbackId;
-    WBAuthorizeRequest *request = [WBAuthorizeRequest request];
-    request.redirectURI = self.redirectURI;
-    request.scope = @"all";
-    request.userInfo = @{ @"SSO_From" : @"CDVWeiboSDK",
-                          @"Other_Info_1" : [NSNumber numberWithInt:123],
-                          @"Other_Info_2" : @[ @"obj1", @"obj2" ],
-                          @"Other_Info_3" : @{@"key1" : @"obj1", @"key2" : @"obj2"} };
-    [WeiboSDK sendRequest:request];
-}
-
-/**
- *  微博登出
- *
- *  @param command CDVInvokedUrlCommand
- */
-- (void)logout:(CDVInvokedUrlCommand *)command {
-    NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-    NSString *token = [saveDefaults objectForKey:@"access_token"];
-    [saveDefaults removeObjectForKey:@"userId"];
-    [saveDefaults removeObjectForKey:@"access_token"];
-    [saveDefaults removeObjectForKey:@"expires_time"];
-    [saveDefaults synchronize];
-    if (token) {
-        [WeiboSDK logOutWithToken:token delegate:self withTag:nil];
-        self.callbackId = command.callbackId;
-    } else {
-        CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_TOKEN_EMPTY];
-        [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-    }
-}
-
-/**
- *  分享网页到微博
- *
- *  @param command CDVInvokedUrlCommand
- */
- - (void)shareToWeibo:(CDVInvokedUrlCommand *)command {
-     self.callbackId = command.callbackId;
-     WBAuthorizeRequest *authRequest = [WBAuthorizeRequest request];
-     authRequest.redirectURI = self.redirectURI;
-     authRequest.scope = @"all";
-     NSDictionary *params = [command.arguments objectAtIndex:0];
-     WBMessageObject *message = [WBMessageObject message];
-     WBWebpageObject *webpage = [WBWebpageObject object];
-     webpage.objectID = [NSString stringWithFormat:@"%f", [[NSDate date] timeIntervalSince1970]];
-     webpage.title = [self check:@"title" in:params];
-     webpage.description = [NSString stringWithFormat:[self check:@"description" in:params], [[NSDate date] timeIntervalSince1970]];
-     webpage.webpageUrl = [self check:@"url" in:params];
-     NSString *image = [self check:@"image" in:params];
-     NSData *imageData = [self processImage:image];
-     webpage.thumbnailData = imageData;
-     message.mediaObject = webpage;
-     NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-     NSString *token = [saveDefaults objectForKey:@"access_token"];
-     WBSendMessageToWeiboRequest *request = [WBSendMessageToWeiboRequest requestWithMessage:message authInfo:authRequest access_token:token];
-     request.userInfo = @{ @"ShareMessageFrom" : @"CDVWeiboSDK",
-                           @"Other_Info_1" : [NSNumber numberWithInt:123],
-                           @"Other_Info_2" : @[ @"obj1", @"obj2" ],
-                           @"Other_Info_3" : @{@"key1" : @"obj1", @"key2" : @"obj2"} };
-     [WeiboSDK sendRequest:request];
- }
-/**
- *  分享图片到微博
- *
- *  @param command CDVInvokedUrlCommand
- */
-- (void)shareImageToWeibo:(CDVInvokedUrlCommand *)command {
-    self.callbackId = command.callbackId;
-    WBAuthorizeRequest *authRequest = [WBAuthorizeRequest request];
-    authRequest.redirectURI = self.redirectURI;
-    authRequest.scope = @"all";
-    NSDictionary *params = [command.arguments objectAtIndex:0];
-    WBMessageObject *message = [WBMessageObject message];
-    WBImageObject *imageObject = [WBImageObject object];
-    NSString *image = [self check:@"image" in:params];
-    NSData *imageData = [self processImage:image];
-    imageObject.imageData = imageData;
-    message.imageObject = imageObject;
-    NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-    NSString *token = [saveDefaults objectForKey:@"access_token"];
-    WBSendMessageToWeiboRequest *request = [WBSendMessageToWeiboRequest requestWithMessage:message authInfo:authRequest access_token:token];
-    request.userInfo = @{ @"ShareMessageFrom" : @"CDVWeiboSDK",
-                          @"Other_Info_1" : [NSNumber numberWithInt:123],
-                          @"Other_Info_2" : @[ @"obj1", @"obj2" ],
-                          @"Other_Info_3" : @{@"key1" : @"obj1", @"key2" : @"obj2"} };
-    [WeiboSDK sendRequest:request];
-}
-/**
- *  分享文字到微博
- *
- *  @param command CDVInvokedUrlCommand
- */
-- (void)shareTextToWeibo:(CDVInvokedUrlCommand *)command {
-    self.callbackId = command.callbackId;
-    WBAuthorizeRequest *authRequest = [WBAuthorizeRequest request];
-    authRequest.redirectURI = self.redirectURI;
-    authRequest.scope = @"all";
-    NSDictionary *params = [command.arguments objectAtIndex:0];
-    WBMessageObject *message = [WBMessageObject message];
-    NSString *text = [self check:@"text" in:params];
-    message.text = text;
-    NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-    NSString *token = [saveDefaults objectForKey:@"access_token"];
-    WBSendMessageToWeiboRequest *request = [WBSendMessageToWeiboRequest requestWithMessage:message authInfo:authRequest access_token:token];
-    request.userInfo = @{ @"ShareMessageFrom" : @"CDVWeiboSDK",
-                          @"Other_Info_1" : [NSNumber numberWithInt:123],
-                          @"Other_Info_2" : @[ @"obj1", @"obj2" ],
-                          @"Other_Info_3" : @{@"key1" : @"obj1", @"key2" : @"obj2"} };
-    [WeiboSDK sendRequest:request];
-}
-
-/**
- *  处理URL
- *
- *  @param notification cordova传递的消息对象
- */
-- (void)handleOpenURL:(NSNotification *)notification {
-    NSURL *url = [notification object];
-    if ([url isKindOfClass:[NSURL class]] && [url.absoluteString hasPrefix:[@"wb" stringByAppendingString:self.weiboAppId]]) {
-        [WeiboSDK handleOpenURL:url delegate:self];
-    }
-}
-
-#pragma mark - WeiboSDKDelegate
-- (void)didReceiveWeiboResponse:(WBBaseResponse *)response {
-    if ([response isKindOfClass:WBSendMessageToWeiboResponse.class]) {
-        if (response.statusCode == WeiboSDKResponseStatusCodeSuccess) {
-            WBSendMessageToWeiboResponse *sendMessageToWeiboResponse = (WBSendMessageToWeiboResponse *)response;
-            NSString *accessToken = [sendMessageToWeiboResponse.authResponse accessToken];
-            NSString *userId = [sendMessageToWeiboResponse.authResponse userID];
-            NSString *expirationTime = [NSString stringWithFormat:@"%f", [sendMessageToWeiboResponse.authResponse.expirationDate timeIntervalSince1970] * 1000];
-            if (accessToken && userId && expirationTime) {
-                NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-                [saveDefaults setValue:accessToken forKey:@"access_token"];
-                [saveDefaults setValue:userId forKey:@"userId"];
-                [saveDefaults setValue:expirationTime forKey:@"expires_time"];
-                [saveDefaults synchronize];
-            }
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUserCancel) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_CANCEL_BY_USER];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeSentFail) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_SEND_FAIL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeShareInSDKFailed) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_SHARE_INSDK_FAIL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUnsupport) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_UNSPPORTTED];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUnknown) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_UNKNOW_ERROR];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeAuthDeny) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_AUTH_ERROR];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUserCancelInstall) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_USER_CANCEL_INSTALL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        }
-    } else if ([response isKindOfClass:WBAuthorizeResponse.class]) {
-        if (response.statusCode == WeiboSDKResponseStatusCodeSuccess) {
-            NSMutableDictionary *Dic = [NSMutableDictionary dictionaryWithCapacity:2];
-            [Dic setObject:[(WBAuthorizeResponse *)response userID] forKey:@"userId"];
-            [Dic setObject:[(WBAuthorizeResponse *)response accessToken] forKey:@"access_token"];
-            [Dic setObject:[NSString stringWithFormat:@"%f", [(WBAuthorizeResponse *)response expirationDate].timeIntervalSince1970 * 1000] forKey:@"expires_time"];
-            NSUserDefaults *saveDefaults = [NSUserDefaults standardUserDefaults];
-            [saveDefaults setValue:[(WBAuthorizeResponse *)response userID] forKey:@"userId"];
-            [saveDefaults setValue:[(WBAuthorizeResponse *)response accessToken] forKey:@"access_token"];
-            [saveDefaults setValue:[NSString stringWithFormat:@"%f", [(WBAuthorizeResponse *)response expirationDate].timeIntervalSince1970 * 1000] forKey:@"expires_time"];
-            [saveDefaults synchronize];
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:Dic];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUserCancel) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_CANCEL_BY_USER];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeSentFail) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_SEND_FAIL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeShareInSDKFailed) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_SHARE_INSDK_FAIL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUnsupport) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_UNSPPORTTED];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUnknown) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_UNKNOW_ERROR];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeAuthDeny) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_AUTH_ERROR];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        } else if (response.statusCode == WeiboSDKResponseStatusCodeUserCancelInstall) {
-            CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:WEIBO_USER_CANCEL_INSTALL];
-            [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-        }
-    }
-}
-
-- (void)didReceiveWeiboRequest:(WBBaseRequest *)request {
-}
-
-#pragma mark - WBHttpRequestDelegate
-
-- (void)request:(WBHttpRequest *)request didFinishLoadingWithResult:(NSString *)result {
-    CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-}
-
-- (void)request:(WBHttpRequest *)request didFailWithError:(NSError *)error {
-    CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
-    [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId];
-}
-/**
- 图片处理
-
- @param image 图片数据
- @return 图片NSdata数据
- */
-- (NSData *)processImage:(NSString *)image {
-    if ([self isBase64Data:image]) {
-        return [[NSData alloc] initWithBase64EncodedString:image options:0];
-    } else if ([image hasPrefix:@"http://"] || [image hasPrefix:@"https://"]) {
-        NSURL *url = [NSURL URLWithString:image];
-        return [NSData dataWithContentsOfURL:url];
-    } else {
-        return [NSData dataWithContentsOfFile:image];
-    }
-}
-
-/**
- 检查图片是不是Base64
-
- @param data 图片数据
- @return 结果true or false
- */
-- (BOOL)isBase64Data:(NSString *)data {
-    data = [[data componentsSeparatedByCharactersInSet:
-             [NSCharacterSet whitespaceAndNewlineCharacterSet]]
-            componentsJoinedByString:@""];
-    if ([data length] % 4 == 0) {
-        static NSCharacterSet *invertedBase64CharacterSet = nil;
-        if (invertedBase64CharacterSet == nil) {
-            invertedBase64CharacterSet = [[NSCharacterSet characterSetWithCharactersInString:@"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="] invertedSet];
-        }
-        return [data rangeOfCharacterFromSet:invertedBase64CharacterSet options:NSLiteralSearch].location == NSNotFound;
-    }
-    return NO;
-}
-
-/**
- 检查参数是否存在
-
- @param param 要检查的参数
- @param args 参数字典
- @return 参数
- */
-- (NSString *)check:(NSString *)param in:(NSDictionary *)args {
-    NSString *data = [args objectForKey:param];
-    return data?data:@"";
-}
-@end

+ 0 - 30
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WBHttpRequest+WeiboToken.h

xqd
@@ -1,30 +0,0 @@
-//
-//  WBHttpRequest+WeiboToken.h
-//  WeiboSDK
-//
-//  Created by DannionQiu on 14/11/6.
-//  Copyright (c) 2014年 SINA iOS Team. All rights reserved.
-//
-
-#import "WBHttpRequest.h"
-
-@interface WBHttpRequest (WeiboToken)
-/*!
- @method
- 
- @abstract
- 使用RefreshToken去换取新的身份凭证AccessToken.
- 
- @discussion
- 在SSO授权登录后,服务器会下发有效期为7天的refreshToken以及有效期为1天的AccessToken。
- 当有效期为1天的AccessToken过期时,可以调用该接口带着refreshToken信息区换取新的AccessToken。
- @param refreshToken        refreshToken
- 
- @param queue               指定发送请求的NSOperationQueue,如果这个参数为nil,则请求会发送在MainQueue( [NSOperationQueue mainQueue] )中。
- 
- @param handler             完成请求后会回调handler,处理完成请求后的逻辑。
- */
-+ (WBHttpRequest *)requestForRenewAccessTokenWithRefreshToken:(NSString*)refreshToken
-                                                        queue:(NSOperationQueue*)queue
-                                        withCompletionHandler:(WBRequestHandler)handler;
-@end

+ 0 - 184
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WBHttpRequest.h

xqd
@@ -1,184 +0,0 @@
-//
-//  WBHttpRequest.h
-//  WeiboSDK
-//
-//  Created by DannionQiu on 14-9-18.
-//  Copyright (c) 2014年 SINA iOS Team. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-#pragma mark - WBHttpRequest and WBHttpRequestDelegate
-@class WBHttpRequest;
-
-/**
- 接收并处理来自微博sdk对于网络请求接口的调用响应 以及logOutWithToken的请求
- */
-@protocol WBHttpRequestDelegate <NSObject>
-
-/**
- 收到一个来自微博Http请求的响应
- 
- @param response 具体的响应对象
- */
-@optional
-- (void)request:(WBHttpRequest *)request didReceiveResponse:(NSURLResponse *)response;
-
-/**
- 收到一个来自微博Http请求失败的响应
- 
- @param error 错误信息
- */
-@optional
-- (void)request:(WBHttpRequest *)request didFailWithError:(NSError *)error;
-
-/**
- 收到一个来自微博Http请求的网络返回
- 
- @param result 请求返回结果
- */
-@optional
-- (void)request:(WBHttpRequest *)request didFinishLoadingWithResult:(NSString *)result;
-
-/**
- 收到一个来自微博Http请求的网络返回
- 
- @param data 请求返回结果
- */
-@optional
-- (void)request:(WBHttpRequest *)request didFinishLoadingWithDataResult:(NSData *)data;
-
-/**
- 收到快速SSO授权的重定向
- 
- @param URI
- */
-@optional
-- (void)request:(WBHttpRequest *)request didReciveRedirectResponseWithURI:(NSURL *)redirectUrl;
-
-@end
-
-
-/**
- 微博封装Http请求的消息结构
- 
- */
-@interface WBHttpRequest : NSObject
-{
-    NSURLConnection                 *connection;
-    NSMutableData                   *responseData;
-}
-
-/**
- 用户自定义请求地址URL
- */
-@property (nonatomic, strong) NSString *url;
-
-/**
- 用户自定义请求方式
- 
- 支持"GET" "POST"
- */
-@property (nonatomic, strong) NSString *httpMethod;
-
-/**
- 用户自定义请求参数字典
- */
-@property (nonatomic, strong) NSDictionary *params;
-
-/**
- WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应
- */
-@property (nonatomic, weak) id<WBHttpRequestDelegate> delegate;
-
-/**
- 用户自定义TAG
- 
- 用于区分回调Request
- */
-@property (nonatomic, strong) NSString* tag;
-
-/**
- 统一HTTP请求接口
- 调用此接口后,将发送一个HTTP网络请求
- @param url 请求url地址
- @param httpMethod  支持"GET" "POST"
- @param params 向接口传递的参数结构
- @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应
- @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回
- */
-+ (WBHttpRequest *)requestWithURL:(NSString *)url
-                       httpMethod:(NSString *)httpMethod
-                           params:(NSDictionary *)params
-                         delegate:(id<WBHttpRequestDelegate>)delegate
-                          withTag:(NSString *)tag;
-
-/**
- 统一微博Open API HTTP请求接口
- 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api)
- @param accessToken 应用获取到的accessToken,用于身份验证
- @param url 请求url地址
- @param httpMethod  支持"GET" "POST"
- @param params 向接口传递的参数结构
- @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应
- @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回
- */
-
-+ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken
-                                      url:(NSString *)url
-                               httpMethod:(NSString *)httpMethod
-                                   params:(NSDictionary *)params
-                                 delegate:(id<WBHttpRequestDelegate>)delegate
-                                  withTag:(NSString *)tag;
-
-
-
-/**
- 取消网络请求接口
- 调用此接口后,将取消当前网络请求,建议同时[WBHttpRequest setDelegate:nil];
- 注意:该方法只对使用delegate的request方法有效。无法取消任何使用block的request的网络请求接口。
- */
-- (void)disconnect;
-
-#pragma mark - block extension
-
-typedef void (^WBRequestHandler)(WBHttpRequest *httpRequest,
-                                 id result,
-                                 NSError *error);
-
-/**
- 统一微博Open API HTTP请求接口
- 调用此接口后,将发送一个HTTP网络请求(用于访问微博open api)
- @param url 请求url地址
- @param httpMethod  支持"GET" "POST"
- @param params 向接口传递的参数结构
- @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。
- @param handler 接口请求返回调用的block方法
- */
-+ (WBHttpRequest *)requestWithURL:(NSString *)url
-                       httpMethod:(NSString *)httpMethod
-                           params:(NSDictionary *)params
-                            queue:(NSOperationQueue*)queue
-            withCompletionHandler:(WBRequestHandler)handler;
-
-
-/**
- 统一HTTP请求接口
- 调用此接口后,将发送一个HTTP网络请求
- @param url 请求url地址
- @param httpMethod  支持"GET" "POST"
- @param params 向接口传递的参数结构
- @param queue 发起请求的NSOperationQueue对象,如queue为nil,则在主线程([NSOperationQueue mainQueue])发起请求。
- @param handler 接口请求返回调用的block方法
- */
-
-+ (WBHttpRequest *)requestWithAccessToken:(NSString *)accessToken
-                                      url:(NSString *)url
-                               httpMethod:(NSString *)httpMethod
-                                   params:(NSDictionary *)params
-                                    queue:(NSOperationQueue*)queue
-                    withCompletionHandler:(WBRequestHandler)handler;
-
-
-@end

+ 0 - 89
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK+Statistics.h

xqd
@@ -1,89 +0,0 @@
-//
-//  WeiboSDK+Statistics.h
-//  WeiboSDK
-//
-//  Created by DannionQiu on 15/4/13.
-//  Copyright (c) 2015年 SINA iOS Team. All rights reserved.
-//
-
-#import "WeiboSDK.h"
-
-@interface WeiboSDK(Statistics)
-
-/** 设置是否开启统计模式, 默认为NO.
- @param value 为YES, SDK会开启统计功能,记录日志,并在合适的实际传上服务器。
- @return void.
- */
-+ (void)setStatisticsEnabled:(BOOL)value;
-
-#pragma mark - Optional Configs Setting
-/** 设置是否打印SDK的log信息, 默认NO(不打印log).
- @param value 设置为YES, WeiboSDK 会输出log信息可供调试参考. 除非特殊需要,否则发布产品时需改回NO.
- @return void.
- */
-+ (void)setStatisticsLogEnabled:(BOOL)value;
-
-/** 设置版本信息.
- @param version 版本号,为nil或@""时, 默认为Build号(CFBundleVersion)
- @return void.
- */
-+ (void)setVersion:(NSString*)version;
-
-/** 设置渠道信息.
- @param channelID 渠道名称, 为nil或@""时, 默认为@"AppStore"渠道
- @return void.
- */
-+ (void)setChannelID:(NSString*)channelID;
-
-/** 设定日志上传的发送间隔
- @param frequecy 单位为秒,最小30秒,最大8*60*60秒(8小时)。默认为180秒(3分钟)
- @return void.
- */
-+ (void)setUploadFrequecy:(NSTimeInterval)frequecy;
-
-#pragma mark - Statistics Api
-/** 自动页面时长统计, 开始记录某个页面展示时长.
- 使用方法:必须配对调用beginLogPageView:和endLogPageView:两个函数来完成自动统计,若只调用某一个函数不会生成有效数据。
- 在该页面展示时调用beginLogPageView:,当退出该页面时调用endLogPageView:
- @param pageName 统计的页面名称.
- @return void.
- */
-+ (void)beginLogPageView:(NSString *)pageName;
-
-/** 自动页面时长统计, 结束记录某个页面展示时长.
- 使用方法:必须配对调用beginLogPageView:和endLogPageView:两个函数来完成自动统计,若只调用某一个函数不会生成有效数据。
- 在该页面展示时调用beginLogPageView:,当退出该页面时调用endLogPageView:
- @param pageName 统计的页面名称.
- @return void.
- */
-+ (void)endLogPageView:(NSString *)pageName;
-
-
-/** 自动事件时长统计, 开始记录某个事示时长.
- 使用方法:调用event:函数来完成自动统计。
- @param eventID 统计的事件标识符.
- @warning eventID不能使用空格和特殊字符,且长度不能超过255个字符(否则将截取前255个字符)
- */
-+ (void)event:(NSString *)eventID;
-
-/** 自动事件时长统计, 开始记录某个事示时长.
- 使用方法:调用event:函数来完成自动统计。
- @param eventID 统计的事件标识符.
- @param pageName 事件发生时所在页面.
- @param userInfo 事件相关信息.
- @return void.
- 
- @warning 每个event的userInfo不能超过10个
- eventID、pageName、userInfo中key和value都不能使用空格和特殊字符,且长度不能超过255个字符(否则将截取前255个字符)
- */
-+ (void)event:(NSString *)eventID onPageView:(NSString*)pageName withUserInfo:(NSDictionary*)userInfo;
-
-/** 强制日志上传
- 调用后,若距离上次成功上传日志时间不小于30秒,立刻上传日志。
- */
-+ (void)forceUploadRecords;
-
-
-
-
-@end

BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/common_button_white@2x.png


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/common_button_white_highlighted@2x.png


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/images/empty_failed@2x.png


BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.bundle/others/mfp.cer


+ 0 - 573
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/WeiboSDK.h

xqd
@@ -1,573 +0,0 @@
-//
-//  WeiboSDKHeaders.h
-//  WeiboSDKDemo
-//
-//  Created by Wade Cheng on 4/3/13.
-//  Copyright (c) 2013 SINA iOS Team. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <UIKit/UIKit.h>
-
-#import "WBHttpRequest.h"
-#import "WBHttpRequest+WeiboToken.h"
-
-typedef NS_ENUM(NSInteger, WeiboSDKResponseStatusCode)
-{
-    WeiboSDKResponseStatusCodeSuccess               = 0,//成功
-    WeiboSDKResponseStatusCodeUserCancel            = -1,//用户取消发送
-    WeiboSDKResponseStatusCodeSentFail              = -2,//发送失败
-    WeiboSDKResponseStatusCodeAuthDeny              = -3,//授权失败
-    WeiboSDKResponseStatusCodeUserCancelInstall     = -4,//用户取消安装微博客户端
-    WeiboSDKResponseStatusCodePayFail               = -5,//支付失败
-    WeiboSDKResponseStatusCodeShareInSDKFailed      = -8,//分享失败 详情见response UserInfo
-    WeiboSDKResponseStatusCodeUnsupport             = -99,//不支持的请求
-    WeiboSDKResponseStatusCodeUnknown               = -100,
-};
-
-@protocol WeiboSDKDelegate;
-@protocol WBHttpRequestDelegate;
-@class WBBaseRequest;
-@class WBBaseResponse;
-@class WBMessageObject;
-@class WBImageObject;
-@class WBBaseMediaObject;
-@class WBHttpRequest;
-
-/**
- 微博SDK接口类
- */
-@interface WeiboSDK : NSObject
-
-/**
- 检查用户是否安装了微博客户端程序
- @return 已安装返回YES,未安装返回NO
- */
-+ (BOOL)isWeiboAppInstalled;
-
-/**
- 检查用户是否可以通过微博客户端进行分享
- @return 可以使用返回YES,不可以使用返回NO
- */
-+ (BOOL)isCanShareInWeiboAPP;
-
-/**
- 检查用户是否可以使用微博客户端进行SSO授权
- @return 可以使用返回YES,不可以使用返回NO
- */
-+ (BOOL)isCanSSOInWeiboApp;
-
-/**
- 打开微博客户端程序
- @return 成功打开返回YES,失败返回NO
- */
-+ (BOOL)openWeiboApp;
-
-
-/**
- 获取微博客户端程序的itunes安装地址
- @return 微博客户端程序的itunes安装地址
- */
-+ (NSString *)getWeiboAppInstallUrl;
-
-/**
- 获取当前微博SDK的版本号
- @return 当前微博SDK的版本号
- */
-+ (NSString *)getSDKVersion;
-
-
-extern NSString * const WeiboSDKGetAidSucessNotification;
-extern NSString * const WeiboSDKGetAidFailNotification;
-/**
- 获取当前微博SDK的aid
- 返回的aid值可能为 nil ,当值为 nil 时会尝试获取 aid 值。
- 当获取成功( aid 值变为有效值)时,SDK会发出名为 WeiboSDKGetAidSucessNotification 的通知,通知中带有 aid 值。
- 当获取失败时,SDK会发出名为 WeiboSDKGetAidFailNotification 的通知,通知中带有 NSError 对象。
- @return aid 用于广告的与设备信息相关的标识符
- */
-+ (NSString *)getWeiboAid;
-
-
-/**
- 向微博客户端程序注册第三方应用
- @param appKey 微博开放平台第三方应用appKey
- @return 注册成功返回YES,失败返回NO
- */
-+ (BOOL)registerApp:(NSString *)appKey;
-
-/**
- 处理微博客户端程序通过URL启动第三方应用时传递的数据
- 
- 需要在 application:openURL:sourceApplication:annotation:或者application:handleOpenURL中调用
- @param url 启动第三方应用的URL
- @param delegate WeiboSDKDelegate对象,用于接收微博触发的消息
- @see WeiboSDKDelegate
- */
-+ (BOOL)handleOpenURL:(NSURL *)url delegate:(id<WeiboSDKDelegate>)delegate;
-
-/**
- 发送请求给微博客户端程序,并切换到微博
- 
- 请求发送给微博客户端程序之后,微博客户端程序会进行相关的处理,处理完成之后一定会调用 [WeiboSDKDelegate didReceiveWeiboResponse:] 方法将处理结果返回给第三方应用
- 
- @param request 具体的发送请求
- 
- @see [WeiboSDKDelegate didReceiveWeiboResponse:]
- @see WBBaseResponse
- */
-+ (BOOL)sendRequest:(WBBaseRequest *)request;
-
-/**
- 收到微博客户端程序的请求后,发送对应的应答给微博客户端端程序,并切换到微博
- 
- 第三方应用收到微博的请求后,异步处理该请求,完成后必须调用该函数将应答返回给微博
- 
- @param response 具体的应答内容
- @see WBBaseRequest
- */
-+ (BOOL)sendResponse:(WBBaseResponse *)response;
-
-/**
- 设置WeiboSDK的调试模式
- 
- 当开启调试模式时,WeiboSDK会在控制台输出详细的日志信息,开发者可以据此调试自己的程序。默认为 NO
- @param enabled 开启或关闭WeiboSDK的调试模式
- */
-+ (void)enableDebugMode:(BOOL)enabled;
-
-/**
- 取消授权,登出接口
- 调用此接口后,token将失效
- @param token 第三方应用之前申请的Token
- @param delegate WBHttpRequestDelegate对象,用于接收微博SDK对于发起的接口请求的请求的响应
- @param tag 用户自定义TAG,将通过回调WBHttpRequest实例的tag属性返回
- 
- */
-+ (void)logOutWithToken:(NSString *)token delegate:(id<WBHttpRequestDelegate>)delegate withTag:(NSString*)tag;
-
-/**
- 呼起微博客户端或打开微博H5页面,SDK自动检测是否安装微博客户端,当调用SDK相关方法时:
- 
- 有的话呼起微博客户端定位到对应界面;
- 没有的话打开 webView 加载相应的微博H5页面;
- @param uid 用户id
- @param mid 微博id
- @param aid 文章id
-*/
-
-//连接到指定用户的微博个人主页,连接后可进行加关注等互动
-+ (void)linkToUser:(NSString *)uid;
-
-//连接到指定的单条微博详情页,连接后可对这条微博进行转、评、赞等互动
-+ (void)linkToSingleBlog:(NSString *)uid blogID:(NSString *)mid;
-
-//连接到指定的微博头条文章页
-+ (void)linkToArticle:(NSString *)aid;
-
-//分享到微博
-+ (void)shareToWeibo:(NSString *)content;
-
-//评论指定的微博
-+ (void)commentToWeibo:(NSString *)mid;
-
-//连接到微博搜索内容流
-+ (void)linkToSearch:(NSString *)keyword;
-
-//连接到我的微博消息流
-+ (void)linkToTimeLine;
-
-//连接到我的微博个人主页
-+ (void)linkToProfile;
-
-@end
-
-/**
- 接收并处理来至微博客户端程序的事件消息
- */
-@protocol WeiboSDKDelegate <NSObject>
-
-/**
- 收到一个来自微博客户端程序的请求
- 
- 收到微博的请求后,第三方应用应该按照请求类型进行处理,处理完后必须通过 [WeiboSDK sendResponse:] 将结果回传给微博
- @param request 具体的请求对象
- */
-- (void)didReceiveWeiboRequest:(WBBaseRequest *)request;
-
-/**
- 收到一个来自微博客户端程序的响应
- 
- 收到微博的响应后,第三方应用可以通过响应类型、响应的数据和 WBBaseResponse.userInfo 中的数据完成自己的功能
- @param response 具体的响应对象
- */
-- (void)didReceiveWeiboResponse:(WBBaseResponse *)response;
-
-@end
-
-
-#pragma mark - DataTransferObject and Base Request/Response
-
-/**
- 微博客户端程序和第三方应用之间传输数据信息的基类
- */
-@interface WBDataTransferObject : NSObject
-
-/**
- 自定义信息字典,用于数据传输过程中存储相关的上下文环境数据
- 
- 第三方应用给微博客户端程序发送 request 时,可以在 userInfo 中存储请求相关的信息。
- 
- @warning userInfo中的数据必须是实现了 `NSCoding` 协议的对象,必须保证能序列化和反序列化
- @warning 序列化后的数据不能大于10M
- */
-@property (nonatomic, strong) NSDictionary *userInfo;
-
-
-/**
- 发送该数据对象的SDK版本号
- 
- 如果数据对象是自己生成的,则sdkVersion为当前SDK的版本号;如果是接收到的数据对象,则sdkVersion为数据发送方SDK版本号
- */
-@property (strong, nonatomic, readonly) NSString *sdkVersion;
-
-
-/**
- 当用户没有安装微博客户端程序时是否提示用户打开微博安装页面
- 
- 如果设置为YES,当用户未安装微博时会弹出Alert询问用户是否要打开微博App的安装页面。默认为YES
- */
-@property (nonatomic, assign) BOOL shouldOpenWeiboAppInstallPageIfNotInstalled;
-
-
-@end
-
-
-/**
- 微博SDK所有请求类的基类
- */
-@interface WBBaseRequest : WBDataTransferObject
-
-/**
- 返回一个 WBBaseRequest 对象
- 
- @return 返回一个*自动释放的*WBBaseRequest对象
- */
-+ (id)request;
-
-@end
-
-
-/**
- 微博SDK所有响应类的基类
- */
-@interface WBBaseResponse : WBDataTransferObject
-
-/**
- 对应的 request 中的自定义信息字典
- 
- 如果当前 response 是由微博客户端响应给第三方应用的,则 requestUserInfo 中会包含原 request.userInfo 中的所有数据
- 
- @see WBBaseRequest.userInfo
- */
-@property (strong, nonatomic, readonly) NSDictionary *requestUserInfo;
-
-/**
- 响应状态码
- 
- 第三方应用可以通过statusCode判断请求的处理结果
- */
-@property (nonatomic, assign) WeiboSDKResponseStatusCode statusCode;
-
-/**
- 返回一个 WBBaseResponse 对象
- 
- @return 返回一个*自动释放的*WBBaseResponse对象
- */
-+ (id)response;
-
-@end
-
-#pragma mark - Authorize Request/Response
-
-/**
- 第三方应用向微博客户端请求认证的消息结构
- 
- 第三方应用向微博客户端申请认证时,需要调用 [WeiboSDK sendRequest:] 函数, 向微博客户端发送一个 WBAuthorizeRequest 的消息结构。
- 微博客户端处理完后会向第三方应用发送一个结构为 WBAuthorizeResponse 的处理结果。
- */
-@interface WBAuthorizeRequest : WBBaseRequest
-
-/**
- 微博开放平台第三方应用授权回调页地址,默认为`http://`
- 
- 参考 http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#.E5.AE.A2.E6.88.B7.E7.AB.AF.E9.BB.98.E8.AE.A4.E5.9B.9E.E8.B0.83.E9.A1.B5
- 
- @warning 必须保证和在微博开放平台应用管理界面配置的“授权回调页”地址一致,如未进行配置则默认为`http://`
- @warning 不能为空,长度小于1K
- */
-@property (nonatomic, strong) NSString *redirectURI;
-
-/**
- 微博开放平台第三方应用scope,多个scrope用逗号分隔
- 
- 参考 http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#scope
- 
- @warning 长度小于1K
- */
-@property (nonatomic, strong) NSString *scope;
-
-/**
- 当用户没有安装微博客户端或微博客户端过低无法支持SSO的时候是否弹出SDK自带的Webview进行授权
- 
- 如果设置为YES,当用户没有安装微博客户端或微博客户端过低无法支持SSO的时候会自动弹出SDK自带的Webview进行授权。
-
- 如果设置为NO,会根据 shouldOpenWeiboAppInstallPageIfNotInstalled 属性判断是否弹出安装/更新微博的对话框
- 
- 默认为YES
- */
-@property (nonatomic, assign) BOOL shouldShowWebViewForAuthIfCannotSSO;
-
-@end
-
-
-/**
- 微博客户端处理完第三方应用的认证申请后向第三方应用回送的处理结果
- 
- WBAuthorizeResponse 结构中仅包含常用的 userID 、accessToken 和 expirationDate 信息,其他的认证信息(比如部分应用可以获取的 refresh_token 信息)会统一存放到 userInfo 中
- */
-@interface WBAuthorizeResponse : WBBaseResponse
-
-/**
- 用户ID
- */
-@property (nonatomic, strong) NSString *userID;
-
-/**
- 认证口令
- */
-@property (nonatomic, strong) NSString *accessToken;
-
-/**
- 认证过期时间
- */
-@property (nonatomic, strong) NSDate *expirationDate;
-
-/**
- 当认证口令过期时用于换取认证口令的更新口令
- */
-@property (nonatomic, strong) NSString *refreshToken;
-
-@end
-
-#pragma mark - ProvideMessageForWeibo Request/Response
-
-/**
- 微博客户端向第三方程序请求提供内容的消息结构
- */
-@interface WBProvideMessageForWeiboRequest : WBBaseRequest
-
-@end
-
-/**
- 微博客户端向第三方应用请求提供内容,第三方应用向微博客户端返回的消息结构
- */
-@interface WBProvideMessageForWeiboResponse : WBBaseResponse
-
-/**
- 提供给微博客户端的消息
- */
-@property (nonatomic, strong) WBMessageObject *message;
-
-/**
- 返回一个 WBProvideMessageForWeiboResponse 对象
- @param message 需要回送给微博客户端程序的消息对象
- @return 返回一个*自动释放的*WBProvideMessageForWeiboResponse对象
- */
-+ (id)responseWithMessage:(WBMessageObject *)message;
-
-@end
-
-#pragma mark - SendMessageToWeibo Request/Response
-
-/**
- 第三方应用发送消息至微博客户端程序的消息结构体
- */
-@interface WBSendMessageToWeiboRequest : WBBaseRequest
-
-/**
- 发送给微博客户端的消息
- */
-@property (nonatomic, strong) WBMessageObject *message;
-
-/**
- 返回一个 WBSendMessageToWeiboRequest 对象
- 此方法生成对象被[WeiboSDK sendRequest:]会唤起微博客户端的发布器进行分享,如果未安装微博客户端或客户端版本太低
- 会根据 shouldOpenWeiboAppInstallPageIfNotInstalled 属性判断是否弹出安装/更新微博的对话框
- @param message 需要发送给微博客户端的消息对象
- @return 返回一个*自动释放的*WBSendMessageToWeiboRequest对象
- */
-+ (id)requestWithMessage:(WBMessageObject *)message;
-
-/**
- 返回一个 WBSendMessageToWeiboRequest 对象
- 
- 当用户安装了可以支持微博客户端內分享的微博客户端时,会自动唤起微博并分享
- 当用户没有安装微博客户端或微博客户端过低无法支持通过客户端內分享的时候会自动唤起SDK內微博发布器
- 
- @param message 需要发送给微博的消息对象
- @param authRequest 授权相关信息,与access_token二者至少有一个不为空,当access_token为空并且需要弹出SDK內发布器时会通过此信息先进行授权后再分享
- @param access_token 第三方应用之前申请的Token,当此值不为空并且无法通过客户端分享的时候,会使用此token进行分享。
- @return 返回一个*自动释放的*WBSendMessageToWeiboRequest对象
- */
-+ (id)requestWithMessage:(WBMessageObject *)message
-                authInfo:(WBAuthorizeRequest *)authRequest
-            access_token:(NSString *)access_token;
-
-@end
-
-/**
- WBSendMessageToWeiboResponse
- */
-@interface WBSendMessageToWeiboResponse : WBBaseResponse
-
-/**
- 可能在分享过程中用户进行了授权操作,当此值不为空时,为用户相应授权信息
- */
-@property (nonatomic,strong) WBAuthorizeResponse *authResponse;
-@end
-
-
-
-#pragma mark - MessageObject / ImageObject
-
-/**
- 微博客户端程序和第三方应用之间传递的消息结构
- 
- 一个消息结构由三部分组成:文字、图片和多媒体数据。三部分内容中至少有一项不为空,图片和多媒体数据不能共存。
- */
-@interface WBMessageObject : NSObject
-
-/**
- 消息的文本内容
- 
- @warning 长度小于2000个汉字
- */
-@property (nonatomic, strong) NSString *text;
-
-/**
- 消息的图片内容
- 
- @see WBImageObject
- */
-@property (nonatomic, strong) WBImageObject *imageObject;
-
-/**
- 消息的多媒体内容
- 
- @see WBBaseMediaObject
- */
-@property (nonatomic, strong) WBBaseMediaObject *mediaObject;
-
-/**
- 返回一个 WBMessageObject 对象
- 
- @return 返回一个*自动释放的*WBMessageObject对象
- */
-+ (id)message;
-
-@end
-
-/**
- 消息中包含的图片数据对象
- */
-@interface WBImageObject : NSObject
-
-/**
- 图片真实数据内容
- 
- @warning 大小不能超过10M
- */
-@property (nonatomic, strong) NSData *imageData;
-
-/**
- 返回一个 WBImageObject 对象
- 
- @return 返回一个*自动释放的*WBImageObject对象
- */
-+ (id)object;
-
-/**
- 返回一个 UIImage 对象
- 
- @return 返回一个*自动释放的*UIImage对象
- */
-- (UIImage *)image;
-
-@end
-
-#pragma mark - Message Media Objects
-
-/**
- 消息中包含的多媒体数据对象基类,该类后期会被废弃,在发布器不再显示为linkcard样式,只显示为普通网络连接
- */
-@interface WBBaseMediaObject : NSObject
-
-/**
- 对象唯一ID,用于唯一标识一个多媒体内容
- 
- 当第三方应用分享多媒体内容到微博时,应该将此参数设置为被分享的内容在自己的系统中的唯一标识
- @warning 不能为空,长度小于255
- */
-@property (nonatomic, strong) NSString *objectID;
-
-/**
- 多媒体内容标题
- @warning 不能为空且长度小于1k
- */
-@property (nonatomic, strong) NSString *title;
-
-/**
- 多媒体内容描述
- @warning 长度小于1k
- */
-@property (nonatomic, strong) NSString *description;
-
-/**
- 多媒体内容缩略图
- @warning 大小小于32k
- */
-@property (nonatomic, strong) NSData *thumbnailData;
-
-/**
- 点击多媒体内容之后呼起第三方应用特定页面的scheme
- @warning 长度小于255
- */
-@property (nonatomic, strong) NSString *scheme;
-
-/**
- 返回一个 WBBaseMediaObject 对象
- 
- @return 返回一个*自动释放的*WBBaseMediaObject对象
- */
-+ (id)object;
-
-@end
-
-#pragma mark - Message WebPage Objects
-
-/**
- 消息中包含的网页数据对象
- */
-@interface WBWebpageObject : WBBaseMediaObject
-
-/**
- 网页的url地址
- 
- @warning 不能为空且长度不能超过255
- */
-@property (nonatomic, strong) NSString *webpageUrl;
-
-@end
-
-

BIN
miaomiao/plugins/cordova-plugin-weibosdk/src/ios/libWeiboSDK/libWeiboSDK.a


+ 0 - 30
miaomiao/plugins/cordova-plugin-weibosdk/www/weibo.js

xqd
@@ -1,30 +0,0 @@
-var cordova = require('cordova');
-module.exports = {
-	checkClientInstalled:function(successCallback, errorCallback){
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "checkClientInstalled", []);
-	},
-	ssoLogin:function(successCallback, errorCallback){
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "ssoLogin", []);
-	},
-	logout:function(successCallback, errorCallback){
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "logout", []);
-	},
-	shareToWeibo:function(successCallback, errorCallback, args){
-		if(args == undefined){
-			args = {};
-		}
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "shareToWeibo", [args]);
-	},
-	shareImageToWeibo:function(successCallback, errorCallback, args){
-		if(args == undefined){
-			args = {};
-		}
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "shareImageToWeibo", [args]);
-	},
-	shareTextToWeibo:function(successCallback, errorCallback, args){
-		if(args == undefined){
-			args = {};
-		}
-		cordova.exec(successCallback, errorCallback, "WeiboSDK", "shareTextToWeibo", [args]);
-	}
-};

+ 12 - 0
miaomiao/plugins/cordova-plugin-whitelist/README.md

xqd xqd
@@ -1,3 +1,7 @@
+---
+title: Whitelist
+description: Whitelist external content accessible by your app.
+---
 <!--
 # license: Licensed to the Apache Software Foundation (ASF) under one
 #         or more contributor license agreements.  See the NOTICE file
@@ -23,6 +27,14 @@ This plugin implements a whitelist policy for navigating the application webview
 
 :warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Whitelist%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
 
+## Installation
+
+You can install whitelist plugin with Cordova CLI, from npm:
+
+```
+$ cordova plugin add cordova-plugin-whitelist
+$ cordova prepare
+```
 
 ## Supported Cordova Platforms
 

+ 19 - 2
miaomiao/plugins/cordova-plugin-whitelist/RELEASENOTES.md

xqd
@@ -20,12 +20,29 @@
 -->
 # Release Notes
 
+### 1.3.2 (Feb 28, 2017)
+* [CB-12236](https://issues.apache.org/jira/browse/CB-12236) Fixed `RELEASENOTES` for `cordova-plugin-whitelist`
+
+### 1.3.1 (Dec 07, 2016)
+* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 1.3.1
+* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…"
+* Edit package.json license to match SPDX id
+* [CB-11832](https://issues.apache.org/jira/browse/CB-11832) Incremented plugin version.
+
+### 1.3.0 (Sep 08, 2016)
+* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies
+* Updated installation section
+* Plugin uses `Android Log class` and not `Cordova LOG class`
+* Add pull request template.
+* [CB-10866](https://issues.apache.org/jira/browse/CB-10866) Adding engine info to `package.json`
+* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md
+
 ### 1.2.2 (Apr 15, 2016)
 * add note about redirects
-* CB-10624 remove error message from `whitelist.js`, which leaves it empty
+* [CB-10624](https://issues.apache.org/jira/browse/CB-10624) remove error message from `whitelist.js`, which leaves it empty
 
 ### 1.2.1 (Jan 15, 2016)
-* CB-10194 info tag prints for ios when not applicable
+* [CB-10194](https://issues.apache.org/jira/browse/CB-10194) info tag prints for ios when not applicable
 
 ### 1.2.0 (Nov 18, 2015)
 * removed **iOS** engine check from `plugin.xml`

+ 16 - 85
miaomiao/plugins/cordova-plugin-whitelist/package.json

xqd
@@ -1,101 +1,32 @@
 {
-  "_args": [
-    [
-      {
-        "raw": "cordova-plugin-whitelist@~1.2.1",
-        "scope": null,
-        "escapedName": "cordova-plugin-whitelist",
-        "name": "cordova-plugin-whitelist",
-        "rawSpec": "~1.2.1",
-        "spec": ">=1.2.1 <1.3.0",
-        "type": "range"
-      },
-      "D:\\my\\miao\\miaomiao\\node_modules"
-    ]
-  ],
-  "_from": "cordova-plugin-whitelist@>=1.2.1 <1.3.0",
-  "_id": "cordova-plugin-whitelist@1.2.2",
-  "_inCache": true,
-  "_location": "/cordova-plugin-whitelist",
-  "_nodeVersion": "5.4.1",
-  "_npmOperationalInternal": {
-    "host": "packages-16-east.internal.npmjs.com",
-    "tmp": "tmp/cordova-plugin-whitelist-1.2.2.tgz_1461189898558_0.8843274090904742"
-  },
-  "_npmUser": {
-    "name": "stevegill",
-    "email": "stevengill97@gmail.com"
-  },
-  "_npmVersion": "3.5.3",
-  "_phantomChildren": {},
-  "_requested": {
-    "raw": "cordova-plugin-whitelist@~1.2.1",
-    "scope": null,
-    "escapedName": "cordova-plugin-whitelist",
-    "name": "cordova-plugin-whitelist",
-    "rawSpec": "~1.2.1",
-    "spec": ">=1.2.1 <1.3.0",
-    "type": "range"
-  },
-  "_requiredBy": [
-    "#USER",
-    "/"
-  ],
-  "_resolved": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.2.2.tgz",
-  "_shasum": "08593fc9578856209d437b76c8b047529f19f623",
-  "_shrinkwrap": null,
-  "_spec": "cordova-plugin-whitelist@~1.2.1",
-  "_where": "D:\\my\\miao\\miaomiao\\node_modules",
-  "author": {
-    "name": "Apache Software Foundation"
-  },
-  "bugs": {
-    "url": "https://github.com/apache/cordova-plugin-whitelist/issues"
-  },
+  "name": "cordova-plugin-whitelist",
+  "version": "1.3.2",
+  "description": "Cordova Whitelist Plugin",
   "cordova": {
     "platforms": [
       "android"
     ]
   },
-  "dependencies": {},
-  "description": "Cordova Whitelist Plugin",
-  "devDependencies": {},
-  "directories": {},
-  "dist": {
-    "shasum": "08593fc9578856209d437b76c8b047529f19f623",
-    "tarball": "https://registry.npmjs.org/cordova-plugin-whitelist/-/cordova-plugin-whitelist-1.2.2.tgz"
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/apache/cordova-plugin-whitelist"
   },
-  "engines": [
-    {
-      "name": "cordova-android",
-      "version": ">=4.0.0"
-    }
-  ],
-  "homepage": "https://github.com/apache/cordova-plugin-whitelist#readme",
   "keywords": [
     "cordova",
     "whitelist",
     "ecosystem:cordova",
     "cordova-android"
   ],
-  "license": "Apache 2.0",
-  "maintainers": [
-    {
-      "name": "csantanapr",
-      "email": "csantana23@gmail.com"
-    },
-    {
-      "name": "stevegill",
-      "email": "stevengill97@gmail.com"
+  "engines": {
+    "cordovaDependencies": {
+      "0.0.0": {
+        "cordova-android": ">=4.0.0"
+      },
+      "2.0.0": {
+        "cordova": ">100"
+      }
     }
-  ],
-  "name": "cordova-plugin-whitelist",
-  "optionalDependencies": {},
-  "readme": "ERROR: No README data found!",
-  "repository": {
-    "type": "git",
-    "url": "git+https://github.com/apache/cordova-plugin-whitelist.git"
   },
-  "scripts": {},
-  "version": "1.2.2"
+  "author": "Apache Software Foundation",
+  "license": "Apache-2.0"
 }

+ 1 - 3
miaomiao/plugins/cordova-plugin-whitelist/plugin.xml

xqd xqd
@@ -20,7 +20,7 @@
 
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
            id="cordova-plugin-whitelist"
-      version="1.2.2">
+      version="1.3.2">
     <name>Whitelist</name>
     <description>Cordova Network Whitelist Plugin</description>
     <license>Apache 2.0</license>
@@ -44,7 +44,5 @@
                This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
           </info>
     </platform>
-	
-
 
 </plugin>

+ 2 - 2
miaomiao/plugins/cordova-plugin-whitelist/src/android/WhitelistPlugin.java

xqd xqd
@@ -21,11 +21,11 @@ package org.apache.cordova.whitelist;
 
 import org.apache.cordova.CordovaPlugin;
 import org.apache.cordova.ConfigXmlParser;
+import org.apache.cordova.LOG;
 import org.apache.cordova.Whitelist;
 import org.xmlpull.v1.XmlPullParser;
 
 import android.content.Context;
-import android.util.Log;
 
 public class WhitelistPlugin extends CordovaPlugin {
     private static final String LOG_TAG = "WhitelistPlugin";
@@ -90,7 +90,7 @@ public class WhitelistPlugin extends CordovaPlugin {
                 boolean external = (xml.getAttributeValue(null, "launch-external") != null);
                 if (origin != null) {
                     if (external) {
-                        Log.w(LOG_TAG, "Found <access launch-external> within config.xml. Please use <allow-intent> instead.");
+                        LOG.w(LOG_TAG, "Found <access launch-external> within config.xml. Please use <allow-intent> instead.");
                         allowedIntents.addWhiteListEntry(origin, (subdomains != null) && (subdomains.compareToIgnoreCase("true") == 0));
                     } else {
                         if ("*".equals(origin)) {

+ 12 - 21
miaomiao/plugins/fetch.json

xqd
@@ -112,51 +112,42 @@
         "is_top_level": true,
         "variables": {}
     },
-    "cordova-plugin-wechat": {
+    "cordova-plugin-whitelist": {
         "source": {
             "type": "registry",
-            "id": "cordova-plugin-wechat@^1.4.0"
+            "id": "cordova-plugin-whitelist@^1.2.2"
         },
         "is_top_level": true,
         "variables": {}
     },
-    "jpush-phonegap-plugin": {
+    "cordova-plugin-offbye-alipay": {
         "source": {
-            "type": "git",
-            "url": "https://github.com/jpush/jpush-phonegap-plugin.git",
-            "subdir": "."
+            "type": "registry",
+            "id": "https://github.com/offbye/cordova-plugin-alipay.git"
         },
         "is_top_level": true,
         "variables": {
-            "API_KEY": "041b70b4c7eee686870a32cd"
+            "PARTNER_ID": "2088721135315822"
         }
     },
-    "cordova-plugin-whitelist": {
-        "source": {
-            "type": "registry",
-            "id": "cordova-plugin-whitelist@~1.2.1"
-        },
-        "is_top_level": true,
-        "variables": {}
-    },
-    "cordova-plugin-offbye-alipay": {
+    "cordova-plugin-wechat": {
         "source": {
             "type": "registry",
-            "id": "https://github.com/offbye/cordova-plugin-alipay.git"
+            "id": "cordova-plugin-wechat@^1.4.0"
         },
         "is_top_level": true,
         "variables": {
-            "PARTNER_ID": "2088721135315822"
+            "WECHATAPPID": "wxc5181c0d406023e6"
         }
     },
-    "cordova-plugin-weibosdk": {
+    "jpush-phonegap-plugin": {
         "source": {
             "type": "registry",
-            "id": "cordova-plugin-weibosdk"
+            "id": "jpush-phonegap-plugin@^3.2.3"
         },
         "is_top_level": true,
         "variables": {
-            "WEIBO_APP_ID": "YOUR_WEIBO_APPID"
+            "APP_KEY": "041b70b4c7eee686870a32cd"
         }
     }
 }

+ 8 - 0
miaomiao/plugins/ios.json

xqd
@@ -57,6 +57,14 @@
         "phonegap-plugin-barcodescanner": {
             "CAMERA_USAGE_DESCRIPTION": " ",
             "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "cordova-plugin-wechat": {
+            "WECHATAPPID": "wxc5181c0d406023e6",
+            "PACKAGE_NAME": "com.miaomiao.app"
+        },
+        "jpush-phonegap-plugin": {
+            "APP_KEY": "041b70b4c7eee686870a32cd",
+            "PACKAGE_NAME": "com.miaomiao.app"
         }
     },
     "dependent_plugins": {}

BIN
miaomiao/plugins/jpush-phonegap-plugin/example/css/.DS_Store


+ 0 - 0
miaomiao/plugins/jpush-phonegap-plugin/example/css/index.css


+ 0 - 0
miaomiao/plugins/jpush-phonegap-plugin/example/css/jquery.mobile-1.1.1.css


+ 276 - 276
miaomiao/plugins/jpush-phonegap-plugin/example/css/mobiscroll.core-2.0.1.css

xqd
@@ -1,276 +1,276 @@
-/* Datewheel overlay */
-.dw {
-    min-width:170px;
-    padding: 0 10px;
-    position: absolute;
-    top: 5%;
-    left: 0;
-    z-index: 1001;
-    color: #000;
-    font-family: arial, verdana, sans-serif;
-    font-size: 12px;
-    text-shadow: none;
-}
-.dwi {
-    position: static;
-    margin: 5px;
-    display: inline-block;
-}
-.dwwr {
-    zoom: 1;
-}
-/* Datewheel overlay background */
-.dwo {
-    width: 100%;
-    background: #000;
-    position: absolute;
-    top: 0;
-    left: 0;
-    z-index: 1000;
-    opacity: .7;
-    filter:Alpha(Opacity=70);
-}
-/* Datewheel wheel container wrapper */
-.dwc {
-    float: left;
-    margin: 0 2px 5px 2px;
-    padding-top: 30px;
-}
-.dwcc {
-    clear: both;
-}
-/* Datewheel label */
-.dwl {
-    /*margin: 0 2px;*/
-    text-align: center;
-    line-height: 30px;
-    height: 30px;
-    white-space: nowrap;
-    position: absolute;
-    top: -30px;
-    width: 100%;
-}
-/* Datewheel value */
-.dwv {
-    padding: 10px 0;
-    border-bottom: 1px solid #000;
-}
-/* Datewheel wheel container */
-.dwrc {
-    -webkit-border-radius: 3px;
-    -moz-border-radius: 3px;
-    border-radius: 3px;
-}
-.dwwc {
-    margin: 0;
-    padding: 0 2px;
-    position: relative;
-    background: #000;
-    zoom:1;
-}
-/* Datewheel wheels */
-.dwwl {
-    margin: 4px 2px;
-    position: relative;
-    background: #888;
-    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.35, #333),color-stop(0.50, #888),color-stop(0.65, #333),color-stop(1, #000));
-    background: -moz-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
-    background: -ms-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
-    background: -o-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
-}
-.dww {
-    margin: 0 2px;
-    overflow: hidden;
-    position: relative;
-    /*top: -30px;*/
-}
-.dwsc .dww {
-    color: #fff;
-    background: #444;
-    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.45, #444),color-stop(0.55, #444),color-stop(1, #000));
-    background: -moz-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
-    background: -ms-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
-    background: -o-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
-}
-.dww ul {
-    list-style: none;
-    margin: 0;
-    padding: 0;
-    /*display: block;
-    width: 100%;*/
-    position: relative;
-    z-index: 2;
-}
-.dww li {
-    list-style: none;
-    margin: 0;
-    padding: 0 5px;
-    display: block;
-    text-align: center;
-    line-height: 40px;
-    font-size: 26px;
-    white-space: nowrap;
-    text-shadow: 0 1px 1px #000;
-    opacity: .3;
-    filter: Alpha(Opacity=30);
-}
-/* Valid entry */
-.dww li.dw-v {
-    opacity: 1;
-    filter: Alpha(Opacity=100);
-}
-/* Hidden entry */
-.dww li.dw-h {
-    visibility: hidden;
-}
-/* Wheel +/- buttons */
-.dwwb {
-    position: absolute;
-    z-index: 4;
-    left: 0;
-    cursor: pointer;
-    width: 100%;
-    height: 40px;
-    text-align: center;
-}
-.dwwbp {
-    top: 0;
-    -webkit-border-radius: 3px 3px 0 0;
-    -moz-border-radius: 3px 3px 0 0;
-    border-radius: 3px 3px 0 0;
-    font-size: 40px;
-}
-.dwwbm {
-    bottom: 0;
-    -webkit-border-radius: 0 0 3px 3px;
-    -moz-border-radius: 0 0 3px 3px;
-    border-radius: 0 0 3px 3px;
-    font-size: 32px;
-    font-weight: bold;
-}
-.dwpm .dwwc {
-    background: transparent;
-}
-.dwpm .dww {
-    margin: -1px;
-}
-.dwpm .dww li {
-    text-shadow: none;
-}
-.dwpm .dwwol {
-    display: none;
-}
-/* Datewheel wheel overlay */
-.dwwo {
-    position: absolute;
-    z-index: 3;
-    top: 0;
-    left: 0;
-    width: 100%;
-    height: 100%;
-    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.52, rgba(44,44,44,0)),color-stop(0.48, rgba(44,44,44,0)),color-stop(1, #000));
-    background: -moz-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
-    background: -ms-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
-    background: -o-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
-}
-/* Background line */
-.dwwol {
-    position: absolute;
-    z-index: 1;
-    top: 50%;
-    left: 0;
-    width: 100%;
-    height: 0;
-    margin-top: -1px;
-    border-top: 1px solid #333;
-    border-bottom: 1px solid #555;
-}
-/* Datewheel button */
-.dwbg .dwb {
-    display: block;
-    height: 40px;
-    line-height: 40px;
-    padding: 0 15px;
-    margin: 0 2px;
-    font-size: 14px;
-    font-weight: bold;
-    text-decoration: none;
-    text-shadow:0 -1px 1px #000;
-    border-radius: 5px;
-    -moz-border-radius: 5px;
-    -webkit-border-radius:5px;
-    box-shadow:0 1px 3px rgba(0,0,0,0.5);
-    -moz-box-shadow:0 1px 3px rgba(0,0,0,0.5);
-    -webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5);
-    color: #fff;
-    background:#000;
-    background:-webkit-gradient(linear,left bottom,left top,color-stop(0.5, #000),color-stop(0.5, #6e6e6e));
-    background:-moz-linear-gradient(#6e6e6e 50%,#000 50%);
-    background:-ms-linear-gradient(#6e6e6e 50%,#000 50%);
-    background:-o-linear-gradient(#6e6e6e 50%,#000 50%);
-}
-/* Datewheel button container */
-.dwbc {
-    /*margin-top: 5px;*/
-    padding: 5px 0;
-    text-align: center;
-    clear: both;
-}
-/* Datewheel button wrapper */
-.dwbw {
-    display: inline-block;
-    width: 50%;
-}
-/* Hidden label */
-.dwhl {
-    padding-top: 10px;
-}
-.dwhl .dwl {
-    display: none;
-}
-/* Backgrounds */
-.dwbg {
-    background: #fff;
-    border-radius: 3px;
-    -webkit-border-radius: 3px;
-    -moz-border-radius: 3px;
-}
-.dwbg .dwpm .dww {
-    color: #000;
-    background: #fff;
-    border: 1px solid #AAA;
-}
-.dwbg .dwwb {
-    background: #ccc;
-    color: #888;
-    text-shadow: 0 -1px 1px #333;
-    box-shadow: 0 0 5px #333;
-    -webkit-box-shadow: 0 0 5px #333;
-    -moz-box-shadow: 0 0 5px #333;
-}
-.dwbg .dwwbp {
-    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #bdbdbd),color-stop(1, #f7f7f7));
-    background: -moz-linear-gradient(#f7f7f7,#bdbdbd);
-    background: -ms-linear-gradient(#f7f7f7,#bdbdbd);
-    background: -o-linear-gradient(#f7f7f7,#bdbdbd);
-}
-.dwbg .dwwbm {
-    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #f7f7f7),color-stop(1, #bdbdbd));
-    background: -moz-linear-gradient(#bdbdbd,#f7f7f7);
-    background: -ms-linear-gradient(#bdbdbd,#f7f7f7);
-    background: -o-linear-gradient(#bdbdbd,#f7f7f7);
-}
-.dwbg .dwb-a {
-    background:#3c7500;
-    background:-webkit-gradient(linear,left bottom,left top,color-stop(0.5, #3c7500),color-stop(0.5, #94c840));
-    background:-moz-linear-gradient(#94c840 50%,#3c7500 50%);
-    background:-ms-linear-gradient(#94c840 50%,#3c7500 50%);
-    background:-o-linear-gradient(#94c840 50%,#3c7500 50%);
-}
-.dwbg .dwwl .dwb-a {
-    background:#3c7500;
-    background:-webkit-gradient(linear,left bottom,left top,color-stop(0, #3c7500),color-stop(1, #94c840));
-    background:-moz-linear-gradient(#94c840,#3c7500);
-    background:-ms-linear-gradient(#94c840,#3c7500);
-    background:-o-linear-gradient(#94c840,#3c7500);
-}
+/* Datewheel overlay */
+.dw {
+    min-width:170px;
+    padding: 0 10px;
+    position: absolute;
+    top: 5%;
+    left: 0;
+    z-index: 1001;
+    color: #000;
+    font-family: arial, verdana, sans-serif;
+    font-size: 12px;
+    text-shadow: none;
+}
+.dwi {
+    position: static;
+    margin: 5px;
+    display: inline-block;
+}
+.dwwr {
+    zoom: 1;
+}
+/* Datewheel overlay background */
+.dwo {
+    width: 100%;
+    background: #000;
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 1000;
+    opacity: .7;
+    filter:Alpha(Opacity=70);
+}
+/* Datewheel wheel container wrapper */
+.dwc {
+    float: left;
+    margin: 0 2px 5px 2px;
+    padding-top: 30px;
+}
+.dwcc {
+    clear: both;
+}
+/* Datewheel label */
+.dwl {
+    /*margin: 0 2px;*/
+    text-align: center;
+    line-height: 30px;
+    height: 30px;
+    white-space: nowrap;
+    position: absolute;
+    top: -30px;
+    width: 100%;
+}
+/* Datewheel value */
+.dwv {
+    padding: 10px 0;
+    border-bottom: 1px solid #000;
+}
+/* Datewheel wheel container */
+.dwrc {
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+    border-radius: 3px;
+}
+.dwwc {
+    margin: 0;
+    padding: 0 2px;
+    position: relative;
+    background: #000;
+    zoom:1;
+}
+/* Datewheel wheels */
+.dwwl {
+    margin: 4px 2px;
+    position: relative;
+    background: #888;
+    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.35, #333),color-stop(0.50, #888),color-stop(0.65, #333),color-stop(1, #000));
+    background: -moz-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
+    background: -ms-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
+    background: -o-linear-gradient(#000 0%,#333 35%, #888 50%,#333 65%,#000 100%);
+}
+.dww {
+    margin: 0 2px;
+    overflow: hidden;
+    position: relative;
+    /*top: -30px;*/
+}
+.dwsc .dww {
+    color: #fff;
+    background: #444;
+    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.45, #444),color-stop(0.55, #444),color-stop(1, #000));
+    background: -moz-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
+    background: -ms-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
+    background: -o-linear-gradient(#000 0%,#444 45%, #444 55%, #000 100%);
+}
+.dww ul {
+    list-style: none;
+    margin: 0;
+    padding: 0;
+    /*display: block;
+    width: 100%;*/
+    position: relative;
+    z-index: 2;
+}
+.dww li {
+    list-style: none;
+    margin: 0;
+    padding: 0 5px;
+    display: block;
+    text-align: center;
+    line-height: 40px;
+    font-size: 26px;
+    white-space: nowrap;
+    text-shadow: 0 1px 1px #000;
+    opacity: .3;
+    filter: Alpha(Opacity=30);
+}
+/* Valid entry */
+.dww li.dw-v {
+    opacity: 1;
+    filter: Alpha(Opacity=100);
+}
+/* Hidden entry */
+.dww li.dw-h {
+    visibility: hidden;
+}
+/* Wheel +/- buttons */
+.dwwb {
+    position: absolute;
+    z-index: 4;
+    left: 0;
+    cursor: pointer;
+    width: 100%;
+    height: 40px;
+    text-align: center;
+}
+.dwwbp {
+    top: 0;
+    -webkit-border-radius: 3px 3px 0 0;
+    -moz-border-radius: 3px 3px 0 0;
+    border-radius: 3px 3px 0 0;
+    font-size: 40px;
+}
+.dwwbm {
+    bottom: 0;
+    -webkit-border-radius: 0 0 3px 3px;
+    -moz-border-radius: 0 0 3px 3px;
+    border-radius: 0 0 3px 3px;
+    font-size: 32px;
+    font-weight: bold;
+}
+.dwpm .dwwc {
+    background: transparent;
+}
+.dwpm .dww {
+    margin: -1px;
+}
+.dwpm .dww li {
+    text-shadow: none;
+}
+.dwpm .dwwol {
+    display: none;
+}
+/* Datewheel wheel overlay */
+.dwwo {
+    position: absolute;
+    z-index: 3;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000),color-stop(0.52, rgba(44,44,44,0)),color-stop(0.48, rgba(44,44,44,0)),color-stop(1, #000));
+    background: -moz-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
+    background: -ms-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
+    background: -o-linear-gradient(#000 0%,rgba(44,44,44,0) 52%, rgba(44,44,44,0) 48%, #000 100%);
+}
+/* Background line */
+.dwwol {
+    position: absolute;
+    z-index: 1;
+    top: 50%;
+    left: 0;
+    width: 100%;
+    height: 0;
+    margin-top: -1px;
+    border-top: 1px solid #333;
+    border-bottom: 1px solid #555;
+}
+/* Datewheel button */
+.dwbg .dwb {
+    display: block;
+    height: 40px;
+    line-height: 40px;
+    padding: 0 15px;
+    margin: 0 2px;
+    font-size: 14px;
+    font-weight: bold;
+    text-decoration: none;
+    text-shadow:0 -1px 1px #000;
+    border-radius: 5px;
+    -moz-border-radius: 5px;
+    -webkit-border-radius:5px;
+    box-shadow:0 1px 3px rgba(0,0,0,0.5);
+    -moz-box-shadow:0 1px 3px rgba(0,0,0,0.5);
+    -webkit-box-shadow:0 1px 3px rgba(0,0,0,0.5);
+    color: #fff;
+    background:#000;
+    background:-webkit-gradient(linear,left bottom,left top,color-stop(0.5, #000),color-stop(0.5, #6e6e6e));
+    background:-moz-linear-gradient(#6e6e6e 50%,#000 50%);
+    background:-ms-linear-gradient(#6e6e6e 50%,#000 50%);
+    background:-o-linear-gradient(#6e6e6e 50%,#000 50%);
+}
+/* Datewheel button container */
+.dwbc {
+    /*margin-top: 5px;*/
+    padding: 5px 0;
+    text-align: center;
+    clear: both;
+}
+/* Datewheel button wrapper */
+.dwbw {
+    display: inline-block;
+    width: 50%;
+}
+/* Hidden label */
+.dwhl {
+    padding-top: 10px;
+}
+.dwhl .dwl {
+    display: none;
+}
+/* Backgrounds */
+.dwbg {
+    background: #fff;
+    border-radius: 3px;
+    -webkit-border-radius: 3px;
+    -moz-border-radius: 3px;
+}
+.dwbg .dwpm .dww {
+    color: #000;
+    background: #fff;
+    border: 1px solid #AAA;
+}
+.dwbg .dwwb {
+    background: #ccc;
+    color: #888;
+    text-shadow: 0 -1px 1px #333;
+    box-shadow: 0 0 5px #333;
+    -webkit-box-shadow: 0 0 5px #333;
+    -moz-box-shadow: 0 0 5px #333;
+}
+.dwbg .dwwbp {
+    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #bdbdbd),color-stop(1, #f7f7f7));
+    background: -moz-linear-gradient(#f7f7f7,#bdbdbd);
+    background: -ms-linear-gradient(#f7f7f7,#bdbdbd);
+    background: -o-linear-gradient(#f7f7f7,#bdbdbd);
+}
+.dwbg .dwwbm {
+    background: -webkit-gradient(linear,left bottom,left top,color-stop(0, #f7f7f7),color-stop(1, #bdbdbd));
+    background: -moz-linear-gradient(#bdbdbd,#f7f7f7);
+    background: -ms-linear-gradient(#bdbdbd,#f7f7f7);
+    background: -o-linear-gradient(#bdbdbd,#f7f7f7);
+}
+.dwbg .dwb-a {
+    background:#3c7500;
+    background:-webkit-gradient(linear,left bottom,left top,color-stop(0.5, #3c7500),color-stop(0.5, #94c840));
+    background:-moz-linear-gradient(#94c840 50%,#3c7500 50%);
+    background:-ms-linear-gradient(#94c840 50%,#3c7500 50%);
+    background:-o-linear-gradient(#94c840 50%,#3c7500 50%);
+}
+.dwbg .dwwl .dwb-a {
+    background:#3c7500;
+    background:-webkit-gradient(linear,left bottom,left top,color-stop(0, #3c7500),color-stop(1, #94c840));
+    background:-moz-linear-gradient(#94c840,#3c7500);
+    background:-ms-linear-gradient(#94c840,#3c7500);
+    background:-o-linear-gradient(#94c840,#3c7500);
+}

+ 47 - 47
miaomiao/plugins/jpush-phonegap-plugin/example/css/mobiscroll.jqm-2.0.1.css

xqd
@@ -1,47 +1,47 @@
-/* jQuery Mobile Theme */
-.jqm .dwo {
-    background: none;
-}
-.jqm .dw {
-    padding: 6px;
-    z-index: 1003;
-}
-.jqm .dwv {
-    position: static;
-    width: auto;
-    padding: .7em 15px .7em 15px;
-    border: 0;
-}
-.jqm .dwwr {
-    border: 0;
-}
-.jqm .dwpm .dwwo {
-    background: none;
-}
-.jqm .dwc {
-    margin: 0;
-    padding: 30px 5px 5px 5px;
- }
-.jqm .dwhl {
-    padding: 5px;
-}
-.jqm .dwwb {
-    margin: 0;
-    border: 0;
-}
-.jqm .dwwb span {
-    padding: 0;
-}
-.jqm .dwwbp .ui-btn-inner {
-    -webkit-border-radius: 3px 3px 0 0;
-    -moz-border-radius: 3px 3px 0 0;
-    border-radius: 3px 3px 0 0;
-}
-.jqm .dwwbm .ui-btn-inner {
-    -webkit-border-radius: 0 0 3px 3px;
-    -moz-border-radius: 0 0 3px 3px;
-    border-radius: 0 0 3px 3px;
-}
-.jqm .dwwbp span {
-    font-weight: normal;
-}
+/* jQuery Mobile Theme */
+.jqm .dwo {
+    background: none;
+}
+.jqm .dw {
+    padding: 6px;
+    z-index: 1003;
+}
+.jqm .dwv {
+    position: static;
+    width: auto;
+    padding: .7em 15px .7em 15px;
+    border: 0;
+}
+.jqm .dwwr {
+    border: 0;
+}
+.jqm .dwpm .dwwo {
+    background: none;
+}
+.jqm .dwc {
+    margin: 0;
+    padding: 30px 5px 5px 5px;
+ }
+.jqm .dwhl {
+    padding: 5px;
+}
+.jqm .dwwb {
+    margin: 0;
+    border: 0;
+}
+.jqm .dwwb span {
+    padding: 0;
+}
+.jqm .dwwbp .ui-btn-inner {
+    -webkit-border-radius: 3px 3px 0 0;
+    -moz-border-radius: 3px 3px 0 0;
+    border-radius: 3px 3px 0 0;
+}
+.jqm .dwwbm .ui-btn-inner {
+    -webkit-border-radius: 0 0 3px 3px;
+    -moz-border-radius: 0 0 3px 3px;
+    border-radius: 0 0 3px 3px;
+}
+.jqm .dwwbp span {
+    font-weight: normal;
+}

BIN
miaomiao/plugins/jpush-phonegap-plugin/example/js/.DS_Store


+ 0 - 0
miaomiao/plugins/jpush-phonegap-plugin/example/js/jquery.js


+ 0 - 0
miaomiao/plugins/jpush-phonegap-plugin/example/js/jquery.mobile-1.1.1.js


+ 16 - 16
miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/AppDelegate+JPush.h

xqd
@@ -1,16 +1,16 @@
-//
-//  AppDelegate+JPush.h
-//  delegateExtention
-//
-//  Created by 张庆贺 on 15/8/3.
-//  Copyright (c) 2015年 JPush. All rights reserved.
-//
-
-#import "AppDelegate.h"
-#import <UserNotifications/UserNotifications.h>
-#import "JPUSHService.h"
-
-@interface AppDelegate (JPush) <JPUSHRegisterDelegate>
--(void)registerForRemoteNotification;
--(void)startJPushSDK;
-@end
+//
+//  AppDelegate+JPush.h
+//  delegateExtention
+//
+//  Created by 张庆贺 on 15/8/3.
+//  Copyright (c) 2015年 JPush. All rights reserved.
+//
+
+#import "AppDelegate.h"
+#import <UserNotifications/UserNotifications.h>
+#import "JPUSHService.h"
+
+@interface AppDelegate (JPush) <JPUSHRegisterDelegate>
+-(void)registerForRemoteNotification;
+-(void)startJPushSDK;
+@end

+ 156 - 156
miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/AppDelegate+JPush.m

xqd
@@ -1,156 +1,156 @@
-//
-//  AppDelegate+JPush.m
-//  delegateExtention
-//
-//  Created by 张庆贺 on 15/8/3.
-//  Copyright (c) 2015年 JPush. All rights reserved.
-//
-
-#import "AppDelegate+JPush.h"
-#import "JPushPlugin.h"
-#import <objc/runtime.h>
-#import <AdSupport/AdSupport.h>
-#import <UserNotifications/UserNotifications.h>
-#import "JPushDefine.h"
-
-@implementation AppDelegate (JPush)
-
-+(void)load{
-    Method origin1;
-    Method swizzle1;
-    origin1  = class_getInstanceMethod([self class],@selector(init));
-    swizzle1 = class_getInstanceMethod([self class], @selector(init_plus));
-    method_exchangeImplementations(origin1, swizzle1);
-}
-
--(instancetype)init_plus{
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
-    return [self init_plus];
-}
-
--(void)fireOpenNotification:(NSTimer*)timer{
-    if (SharedJPushPlugin) {
-        [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[timer.userInfo toJsonString]];
-        [timer invalidate];
-    }
-}
-
-NSDictionary *_launchOptions;
--(void)applicationDidLaunch:(NSNotification *)notification{
-
-
-    if (notification) {
-        if (notification.userInfo) {
-            NSDictionary *userInfo1 = [notification.userInfo valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
-            if (userInfo1.count > 0) {
-                [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:) userInfo:userInfo1 repeats:YES];
-            }
-
-            NSDictionary *userInfo2 = [notification.userInfo valueForKey:UIApplicationLaunchOptionsLocalNotificationKey];
-            if (userInfo2.count > 0) {
-                [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:) userInfo:userInfo2 repeats:YES];
-            }
-        }
-        [JPUSHService setDebugMode];
-
-        NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
-        NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
-        NSNumber *delay       = [plistData valueForKey:JPushConfig_Delay];
-
-        _launchOptions = notification.userInfo;
-
-        if (![delay boolValue]) {
-            [self startJPushSDK];
-        }
-    }
-}
-
--(void)startJPushSDK{
-    [self registerForRemoteNotification];
-    [JPushPlugin setupJPushSDK:_launchOptions];
-}
-
--(void)registerForRemoteNotification{
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) {
-#ifdef NSFoundationVersionNumber_iOS_9_x_Max
-        JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
-        entity.types = UNAuthorizationOptionAlert|UNAuthorizationOptionBadge|UNAuthorizationOptionSound;
-        [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
-#endif
-    }else if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
-        //可以添加自定义categories
-        [JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
-                                                          UIUserNotificationTypeSound |
-                                                          UIUserNotificationTypeAlert)
-                                              categories:nil];
-    } else if([[UIDevice currentDevice].systemVersion floatValue] < 8.0){
-        //categories 必须为nil
-        [JPUSHService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
-                                                          UIRemoteNotificationTypeSound |
-                                                          UIRemoteNotificationTypeAlert)
-                                              categories:nil];
-    }
-}
-
-- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
-    [JPUSHService registerDeviceToken:deviceToken];
-}
-
--(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
-    [JPUSHService handleRemoteNotification:userInfo];
-
-    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
-}
-
--(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
-    [JPUSHService handleRemoteNotification:userInfo];
-    NSString *eventName;
-    switch ([UIApplication sharedApplication].applicationState) {
-        case UIApplicationStateInactive:
-            eventName = JPushDocumentEvent_OpenNotification;
-            break;
-        case UIApplicationStateActive:
-            eventName = JPushDocumentEvent_ReceiveNotification;
-            break;
-        case UIApplicationStateBackground:
-            eventName = JPushDocumentEvent_BackgroundNotification;
-            break;
-        default:
-            break;
-    }
-    [JPushPlugin fireDocumentEvent:eventName jsString:[userInfo toJsonString]];
-    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-      completionHandler(UIBackgroundFetchResultNewData);
-    });
-}
-
--(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{
-    NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo];
-    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
-    completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
-}
-
--(void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{
-    NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:response.notification.request.content.userInfo];
-    @try {
-        [userInfo setValue:[response valueForKey:@"userText"] forKey:@"userText"];
-    } @catch (NSException *exception) { }
-    [userInfo setValue:response.actionIdentifier forKey:@"actionIdentifier"];
-    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]];
-    completionHandler();
-}
-
-- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
-    [[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:notification.userInfo];
-}
-
-- (void)applicationWillEnterForeground:(UIApplication *)application {
-    //  [application setApplicationIconBadgeNumber:0];
-    //  [application cancelAllLocalNotifications];
-}
-
-- (void)applicationDidEnterBackground:(UIApplication *)application {
-    //  [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
-}
-
-@end
+//
+//  AppDelegate+JPush.m
+//  delegateExtention
+//
+//  Created by 张庆贺 on 15/8/3.
+//  Copyright (c) 2015年 JPush. All rights reserved.
+//
+
+#import "AppDelegate+JPush.h"
+#import "JPushPlugin.h"
+#import <objc/runtime.h>
+#import <AdSupport/AdSupport.h>
+#import <UserNotifications/UserNotifications.h>
+#import "JPushDefine.h"
+
+@implementation AppDelegate (JPush)
+
++(void)load{
+    Method origin1;
+    Method swizzle1;
+    origin1  = class_getInstanceMethod([self class],@selector(init));
+    swizzle1 = class_getInstanceMethod([self class], @selector(init_plus));
+    method_exchangeImplementations(origin1, swizzle1);
+}
+
+-(instancetype)init_plus{
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
+    return [self init_plus];
+}
+
+-(void)fireOpenNotification:(NSTimer*)timer{
+    if (SharedJPushPlugin) {
+        [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[timer.userInfo toJsonString]];
+        [timer invalidate];
+    }
+}
+
+NSDictionary *_launchOptions;
+-(void)applicationDidLaunch:(NSNotification *)notification{
+
+
+    if (notification) {
+        if (notification.userInfo) {
+            NSDictionary *userInfo1 = [notification.userInfo valueForKey:UIApplicationLaunchOptionsRemoteNotificationKey];
+            if (userInfo1.count > 0) {
+                [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:) userInfo:userInfo1 repeats:YES];
+            }
+
+            NSDictionary *userInfo2 = [notification.userInfo valueForKey:UIApplicationLaunchOptionsLocalNotificationKey];
+            if (userInfo2.count > 0) {
+                [NSTimer scheduledTimerWithTimeInterval:0.01 target:self selector:@selector(fireOpenNotification:) userInfo:userInfo2 repeats:YES];
+            }
+        }
+        [JPUSHService setDebugMode];
+
+        NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
+        NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
+        NSNumber *delay       = [plistData valueForKey:JPushConfig_Delay];
+
+        _launchOptions = notification.userInfo;
+
+        if (![delay boolValue]) {
+            [self startJPushSDK];
+        }
+    }
+}
+
+-(void)startJPushSDK{
+    [self registerForRemoteNotification];
+    [JPushPlugin setupJPushSDK:_launchOptions];
+}
+
+-(void)registerForRemoteNotification{
+    if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) {
+#ifdef NSFoundationVersionNumber_iOS_9_x_Max
+        JPUSHRegisterEntity * entity = [[JPUSHRegisterEntity alloc] init];
+        entity.types = UNAuthorizationOptionAlert|UNAuthorizationOptionBadge|UNAuthorizationOptionSound;
+        [JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
+#endif
+    }else if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
+        //可以添加自定义categories
+        [JPUSHService registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
+                                                          UIUserNotificationTypeSound |
+                                                          UIUserNotificationTypeAlert)
+                                              categories:nil];
+    } else if([[UIDevice currentDevice].systemVersion floatValue] < 8.0){
+        //categories 必须为nil
+        [JPUSHService registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
+                                                          UIRemoteNotificationTypeSound |
+                                                          UIRemoteNotificationTypeAlert)
+                                              categories:nil];
+    }
+}
+
+- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
+    [JPUSHService registerDeviceToken:deviceToken];
+}
+
+-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo{
+    [JPUSHService handleRemoteNotification:userInfo];
+
+    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
+}
+
+-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{
+    [JPUSHService handleRemoteNotification:userInfo];
+    NSString *eventName;
+    switch ([UIApplication sharedApplication].applicationState) {
+        case UIApplicationStateInactive:
+            eventName = JPushDocumentEvent_OpenNotification;
+            break;
+        case UIApplicationStateActive:
+            eventName = JPushDocumentEvent_ReceiveNotification;
+            break;
+        case UIApplicationStateBackground:
+            eventName = JPushDocumentEvent_BackgroundNotification;
+            break;
+        default:
+            break;
+    }
+    [JPushPlugin fireDocumentEvent:eventName jsString:[userInfo toJsonString]];
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+      completionHandler(UIBackgroundFetchResultNewData);
+    });
+}
+
+-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(NSInteger))completionHandler{
+    NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:notification.request.content.userInfo];
+    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveNotification jsString:[userInfo toJsonString]];
+    completionHandler(UNNotificationPresentationOptionBadge|UNNotificationPresentationOptionSound|UNNotificationPresentationOptionAlert);
+}
+
+-(void)jpushNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{
+    NSMutableDictionary *userInfo = [NSMutableDictionary dictionaryWithDictionary:response.notification.request.content.userInfo];
+    @try {
+        [userInfo setValue:[response valueForKey:@"userText"] forKey:@"userText"];
+    } @catch (NSException *exception) { }
+    [userInfo setValue:response.actionIdentifier forKey:@"actionIdentifier"];
+    [JPushPlugin fireDocumentEvent:JPushDocumentEvent_OpenNotification jsString:[userInfo toJsonString]];
+    completionHandler();
+}
+
+- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
+    [[NSNotificationCenter defaultCenter] postNotificationName:JPushDocumentEvent_ReceiveLocalNotification object:notification.userInfo];
+}
+
+- (void)applicationWillEnterForeground:(UIApplication *)application {
+    //  [application setApplicationIconBadgeNumber:0];
+    //  [application cancelAllLocalNotifications];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application {
+    //  [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
+}
+
+@end

+ 94 - 94
miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/JPushPlugin.h

xqd
@@ -1,94 +1,94 @@
-//
-//  PushTalkPlugin.h
-//  PushTalk
-//
-//  Created by zhangqinghe on 13-12-13.
-//
-//
-
-#import <Cordova/CDV.h>
-
-@interface JPushPlugin : CDVPlugin{
-
-}
-
-//注册通知服务并启动 SDK
--(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
-
-//以下为js中可调用接口
-//设置标签、别名
--(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command;
--(void)setTags:(CDVInvokedUrlCommand*)command;
--(void)setAlias:(CDVInvokedUrlCommand*)command;
-
-//获取 RegistrationID
--(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
-
-//页面统计
--(void)startLogPageView:(CDVInvokedUrlCommand*)command;
--(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
--(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
-
-//设置角标到服务器,服务器下一次发消息时,会设置成这个值
-//本接口不会改变应用本地的角标值.
--(void)setBadge:(CDVInvokedUrlCommand*)command;
-//相当于 [setBadge:0]
--(void)resetBadge:(CDVInvokedUrlCommand*)command;
-
-//应用本地的角标值设置/获取
--(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
--(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
-
-//停止与恢复推送
--(void)stopPush:(CDVInvokedUrlCommand*)command;
--(void)resumePush:(CDVInvokedUrlCommand*)command;
--(void)isPushStopped:(CDVInvokedUrlCommand*)command;
-
-//开关日志
--(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
--(void)setLogOFF:(CDVInvokedUrlCommand*)command;
--(void)crashLogON:(CDVInvokedUrlCommand*)command;
-
-//本地推送
--(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
--(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
--(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
-
-//地理位置上报 [latitude,longitude]
--(void)setLocation:(CDVInvokedUrlCommand*)command;
-
-//检查用户的推送设置情况
--(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
-
-//ios 10 APIs
--(void)addDismissActions:(CDVInvokedUrlCommand*)command;
--(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
-
-/*
- *  以下为js中可监听到的事件
- *  jpush.openNotification      点击推送消息启动或唤醒app
- *  jpush.setTagsWithAlias      设置标签、别名完成
- *  jpush.receiveMessage        收到自定义消息
- *  jpush.receiveNotification   前台收到推送
- *  jpush.backgroundNotification 后台收到推送
- */
-
-# pragma mark - private
-
-+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
-
-+(void)setupJPushSDK:(NSDictionary*)userInfo;
-
-@end
-
-JPushPlugin *SharedJPushPlugin;
-
-@interface NSDictionary (JPush)
--(NSString*)toJsonString;
-@end
-
-@interface NSString (JPush)
--(NSDictionary*)toDictionary;
-@end
-
-
+//
+//  PushTalkPlugin.h
+//  PushTalk
+//
+//  Created by zhangqinghe on 13-12-13.
+//
+//
+
+#import <Cordova/CDV.h>
+
+@interface JPushPlugin : CDVPlugin{
+
+}
+
+//注册通知服务并启动 SDK
+-(void)startJPushSDK:(CDVInvokedUrlCommand*)command;
+
+//以下为js中可调用接口
+//设置标签、别名
+-(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command;
+-(void)setTags:(CDVInvokedUrlCommand*)command;
+-(void)setAlias:(CDVInvokedUrlCommand*)command;
+
+//获取 RegistrationID
+-(void)getRegistrationID:(CDVInvokedUrlCommand*)command;
+
+//页面统计
+-(void)startLogPageView:(CDVInvokedUrlCommand*)command;
+-(void)stopLogPageView:(CDVInvokedUrlCommand*)command;
+-(void)beginLogPageView:(CDVInvokedUrlCommand*)command;
+
+//设置角标到服务器,服务器下一次发消息时,会设置成这个值
+//本接口不会改变应用本地的角标值.
+-(void)setBadge:(CDVInvokedUrlCommand*)command;
+//相当于 [setBadge:0]
+-(void)resetBadge:(CDVInvokedUrlCommand*)command;
+
+//应用本地的角标值设置/获取
+-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
+-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command;
+
+//停止与恢复推送
+-(void)stopPush:(CDVInvokedUrlCommand*)command;
+-(void)resumePush:(CDVInvokedUrlCommand*)command;
+-(void)isPushStopped:(CDVInvokedUrlCommand*)command;
+
+//开关日志
+-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command;
+-(void)setLogOFF:(CDVInvokedUrlCommand*)command;
+-(void)crashLogON:(CDVInvokedUrlCommand*)command;
+
+//本地推送
+-(void)setLocalNotification:(CDVInvokedUrlCommand*)command;
+-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command;
+-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command;
+
+//地理位置上报 [latitude,longitude]
+-(void)setLocation:(CDVInvokedUrlCommand*)command;
+
+//检查用户的推送设置情况
+-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command;
+
+//ios 10 APIs
+-(void)addDismissActions:(CDVInvokedUrlCommand*)command;
+-(void)addNotificationActions:(CDVInvokedUrlCommand*)command;
+
+/*
+ *  以下为js中可监听到的事件
+ *  jpush.openNotification      点击推送消息启动或唤醒app
+ *  jpush.setTagsWithAlias      设置标签、别名完成
+ *  jpush.receiveMessage        收到自定义消息
+ *  jpush.receiveNotification   前台收到推送
+ *  jpush.backgroundNotification 后台收到推送
+ */
+
+# pragma mark - private
+
++(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString;
+
++(void)setupJPushSDK:(NSDictionary*)userInfo;
+
+@end
+
+JPushPlugin *SharedJPushPlugin;
+
+@interface NSDictionary (JPush)
+-(NSString*)toJsonString;
+@end
+
+@interface NSString (JPush)
+-(NSDictionary*)toDictionary;
+@end
+
+

+ 365 - 365
miaomiao/plugins/jpush-phonegap-plugin/src/ios/Plugins/JPushPlugin.m

xqd
@@ -1,365 +1,365 @@
-
-//
-//  PushTalkPlugin.m
-//  PushTalk
-//
-//  Created by zhangqinghe on 13-12-13.
-//
-//
-
-#import "JPushPlugin.h"
-#import "JPUSHService.h"
-#import <UIKit/UIKit.h>
-#import <AdSupport/AdSupport.h>
-#import <UserNotifications/UserNotifications.h>
-#import "AppDelegate+JPush.h"
-#import "JPushDefine.h"
-
-@implementation NSDictionary (JPush)
--(NSString*)toJsonString{
-    NSError  *error;
-    NSData   *data       = [NSJSONSerialization dataWithJSONObject:self options:0 error:&error];
-    NSString *jsonString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
-    return jsonString;
-}
-@end
-
-@implementation NSString (JPush)
--(NSDictionary*)toDictionary{
-    NSError      *error;
-    NSData       *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding];
-    NSDictionary *dict     = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error];
-    return dict;
-}
-@end
-
-@interface JPushPlugin()
-
-@end
-
-@implementation JPushPlugin
-
--(void)startJPushSDK:(CDVInvokedUrlCommand*)command{
-    [(AppDelegate*)[UIApplication sharedApplication].delegate startJPushSDK];
-}
-
-#pragma mark- 外部接口
--(void)stopPush:(CDVInvokedUrlCommand*)command{
-    [[UIApplication sharedApplication]unregisterForRemoteNotifications];
-}
-
--(void)resumePush:(CDVInvokedUrlCommand*)command{
-    [(AppDelegate*)[UIApplication sharedApplication].delegate registerForRemoteNotification];
-}
-
--(void)isPushStopped:(CDVInvokedUrlCommand*)command{
-    NSNumber *result = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications] ? @(0) : @(1);
-    [self handleResultWithValue:result command:command];
-}
-
--(void)initial:(CDVInvokedUrlCommand*)command{
-    //do nithng,because Cordova plugin use lazy load mode.
-}
-
-#ifdef __CORDOVA_4_0_0
-
-- (void)pluginInitialize {
-    NSLog(@"### pluginInitialize ");
-    [self initPlugin];
-}
-
-#else
-
-- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView{
-    NSLog(@"### initWithWebView ");
-    if (self=[super initWithWebView:theWebView]) {
-    }
-    [self initPlugin];
-    return self;
-}
-
-#endif
-
--(void)initPlugin{
-    if (!SharedJPushPlugin) {
-        SharedJPushPlugin = self;
-    }
-    [[NSNotificationCenter defaultCenter] addObserver:self
-                                             selector:@selector(networkDidReceiveMessage:)
-                                                 name:kJPFNetworkDidReceiveMessageNotification
-                                               object:nil];
-}
-
-+(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString{
-    dispatch_async(dispatch_get_main_queue(), ^{
-        [SharedJPushPlugin.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireDocumentEvent('jpush.%@',%@)", eventName, jsString]];
-    });
-}
-
--(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command{
-    NSString *alias = [command argumentAtIndex:0];
-    NSArray  *tags  = [command argumentAtIndex:1];
-
-    [JPUSHService setTags:[NSSet setWithArray:tags]
-                    alias:alias
-    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
-        CDVPluginResult *result;
-        if (iResCode == 0) {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
-        } else {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
-        }
-        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-    }];
-}
-
--(void)setTags:(CDVInvokedUrlCommand*)command{
-    NSArray *tags = command.arguments;
-    [JPUSHService setTags:[NSSet setWithArray:tags]
-                    alias:nil
-    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
-        CDVPluginResult *result;
-        if (iResCode == 0) {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
-        } else {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
-        }
-        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-    }];
-}
-
--(void)setAlias:(CDVInvokedUrlCommand*)command{
-    NSString *alias = [command argumentAtIndex:0];
-    [JPUSHService setTags:nil
-                    alias:alias
-    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
-        CDVPluginResult *result;
-        if (iResCode == 0) {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
-        } else {
-            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
-        }
-        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-    }];
-}
-
--(void)getRegistrationID:(CDVInvokedUrlCommand*)command{
-    NSString* registrationID = [JPUSHService registrationID];
-    [self handleResultWithValue:registrationID command:command];
-}
-
--(void)startLogPageView:(CDVInvokedUrlCommand*)command{
-    NSString * pageName = [command argumentAtIndex:0];
-    [JPUSHService startLogPageView:pageName];
-}
-
--(void)stopLogPageView:(CDVInvokedUrlCommand*)command{
-    NSString * pageName = [command argumentAtIndex:0];
-    [JPUSHService stopLogPageView:pageName];
-}
-
--(void)beginLogPageView:(CDVInvokedUrlCommand*)command{
-    NSString *pageName = [command argumentAtIndex:0];
-    NSNumber *duration = [command argumentAtIndex:1];
-    [JPUSHService beginLogPageView:pageName duration:duration.intValue];
-}
-
--(void)setBadge:(CDVInvokedUrlCommand*)command{
-    NSNumber *badge = [command argumentAtIndex:0];
-    [JPUSHService setBadge:badge.intValue];
-}
-
--(void)resetBadge:(CDVInvokedUrlCommand*)command{
-    [JPUSHService resetBadge];
-}
-
--(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command{
-    NSNumber *badge = [command argumentAtIndex:0];
-    [UIApplication sharedApplication].applicationIconBadgeNumber = badge.intValue;
-}
-
--(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command {
-    NSInteger num = [UIApplication sharedApplication].applicationIconBadgeNumber;
-    NSNumber *number = [NSNumber numberWithInteger:num];
-    [self handleResultWithValue:number command:command];
-}
-
--(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command{
-    [JPUSHService setDebugMode];
-}
-
--(void)setLogOFF:(CDVInvokedUrlCommand*)command{
-    [JPUSHService setLogOFF];
-}
-
--(void)crashLogON:(CDVInvokedUrlCommand*)command{
-    [JPUSHService crashLogON];
-}
-
--(void)setLocalNotification:(CDVInvokedUrlCommand*)command{
-    NSLog(@"ios 10 after please use UNNotificationRequest to set local notification, see apple doc to learn more");
-
-    NSDate       *date  = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] intValue]];
-    NSString     *alert = [command argumentAtIndex:1];
-    NSNumber     *badge = [command argumentAtIndex:2];
-    NSString     *idKey = [command argumentAtIndex:3];
-    NSDictionary *dict  = [command argumentAtIndex:4];
-    [JPUSHService setLocalNotification:date alertBody:alert badge:badge.intValue alertAction:nil identifierKey:idKey userInfo:dict soundName:nil];
-}
-
--(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command{
-    NSString *identifier = [command argumentAtIndex:0];
-    JPushNotificationIdentifier *jpid = [JPushNotificationIdentifier new];
-    jpid.identifiers = @[identifier];
-    [JPUSHService removeNotification:jpid];
-}
-
--(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command{
-    [JPUSHService removeNotification:nil];
-}
-
--(void)setLocation:(CDVInvokedUrlCommand*)command{
-    NSNumber *latitude  = [command argumentAtIndex:0];
-    NSNumber *longitude = [command argumentAtIndex:1];
-    [JPUSHService setLatitude:latitude.doubleValue longitude:longitude.doubleValue];
-}
-
--(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command{
-    if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) {
-        UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
-        WEAK_SELF(weakSelf);
-        [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
-            NSMutableDictionary *dict = [NSMutableDictionary dictionary];
-            dict[@"authorizationStatus"]       = @(settings.authorizationStatus);
-            dict[@"soundSetting"]              = @(settings.soundSetting);
-            dict[@"badgeSetting"]              = @(settings.badgeSetting);
-            dict[@"alertSetting"]              = @(settings.alertSetting);
-            dict[@"notificationCenterSetting"] = @(settings.notificationCenterSetting);
-            dict[@"lockScreenSetting"]         = @(settings.lockScreenSetting);
-            dict[@"carPlaySetting"]            = @(settings.carPlaySetting);
-            dict[@"alertStyle"]                = @(settings.alertStyle);
-            [weakSelf handleResultWithValue:dict command:command];
-        }];
-    }else if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
-        UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];
-        UIUserNotificationType type = settings.types;
-        NSNumber *number = [NSNumber numberWithInteger:type];
-        [self handleResultWithValue:number command:command];
-    }else{
-        UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
-        NSNumber *number = [NSNumber numberWithInteger:type];
-        [self handleResultWithValue:number command:command];
-    }
-}
-
-#pragma mark - ios 10 APIs
-
--(void)addDismissActions:(CDVInvokedUrlCommand*)command{
-    [self addActions:command dismiss:YES];
-}
-
--(void)addNotificationActions:(CDVInvokedUrlCommand*)command{
-    [self addActions:command dismiss:NO];
-}
-
--(void)addActions:(CDVInvokedUrlCommand*)command dismiss:(BOOL)dimiss{
-    NSArray *actionsData     = [command argumentAtIndex:0];
-    NSString *categoryId     = [command argumentAtIndex:1];
-    NSMutableArray *actions  = [NSMutableArray array];
-    for (NSDictionary *dict in actionsData) {
-        NSString *title      = dict[@"title"];
-        NSString *identifier = dict[@"identifier"];
-        NSString *option     = dict[@"option"];
-        NSString *type       = dict[@"type"];
-        if ([type isEqualToString:@"textInput"]) {
-            NSString *textInputButtonTitle = dict[@"textInputButtonTitle"];
-            NSString *textInputPlaceholder = dict[@"textInputPlaceholder"];
-            UNTextInputNotificationAction *inputAction = [UNTextInputNotificationAction actionWithIdentifier:identifier title:title options:option.integerValue textInputButtonTitle:textInputButtonTitle textInputPlaceholder:textInputPlaceholder];
-            [actions addObject:inputAction];
-        } else {
-            UNNotificationAction *action = [UNNotificationAction actionWithIdentifier:title title:title options:option.integerValue];
-            [actions addObject:action];
-        }
-    }
-    UNNotificationCategory *category;
-    if (dimiss) {
-        category = [UNNotificationCategory categoryWithIdentifier:categoryId
-                                                          actions:actions
-                                                intentIdentifiers:@[]
-                                                          options:UNNotificationCategoryOptionCustomDismissAction];
-    } else {
-        category = [UNNotificationCategory categoryWithIdentifier:categoryId
-                                                          actions:actions
-                                                intentIdentifiers:@[]
-                                                          options:UNNotificationCategoryOptionNone];
-    }
-    [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[NSSet setWithObject:category]];
-}
-
-#pragma mark - 内部方法
-
-+(void)setupJPushSDK:(NSDictionary*)userInfo{
-    NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
-    if (plistPath == nil) {
-        NSLog(@"error: PushConfig.plist not found");
-        assert(0);
-    }
-
-    NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
-    NSString *appkey       = [plistData valueForKey:JPushConfig_Appkey];
-    NSString *channel      = [plistData valueForKey:JPushConfig_Channel];
-    NSNumber *isProduction = [plistData valueForKey:JPushConfig_IsProduction];
-    NSNumber *isIDFA       = [plistData valueForKey:JPushConfig_IsIDFA];
-
-    NSString *advertisingId = nil;
-    if(isIDFA.boolValue) {
-        advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
-    }
-    [JPUSHService setupWithOption:userInfo
-                           appKey:appkey
-                          channel:channel
-                 apsForProduction:[isProduction boolValue]
-            advertisingIdentifier:advertisingId];
-}
-
-#pragma mark 将参数返回给js
--(void)handleResultWithValue:(id)value command:(CDVInvokedUrlCommand*)command {
-    CDVPluginResult *result = nil;
-    CDVCommandStatus status = CDVCommandStatus_OK;
-
-    if ([value isKindOfClass:[NSString class]]) {
-        value = [value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-    } else if ([value isKindOfClass:[NSNull class]]) {
-        value = nil;
-    }
-
-    if ([value isKindOfClass:[NSObject class]]) {
-        result = [CDVPluginResult resultWithStatus:status messageAsString:value];//NSObject 类型都可以
-    } else {
-        NSLog(@"Cordova callback block returned unrecognized type: %@", NSStringFromClass([value class]));
-        result = nil;
-    }
-
-    if (!result) {
-        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
-    }
-    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
-}
-
-#pragma mark 设置标签及别名回调
--(void)tagsWithAliasCallback:(int)resultCode tags:(NSSet *)tags alias:(NSString *)alias {
-    if (resultCode == 0) {  // Success
-
-    } else {
-
-    }
-}
-
-- (void)networkDidReceiveMessage:(NSNotification *)notification {
-    if (notification && notification.userInfo) {
-        [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveMessage
-                              jsString:[notification.userInfo toJsonString]];
-    }
-}
-
-@end
+
+//
+//  PushTalkPlugin.m
+//  PushTalk
+//
+//  Created by zhangqinghe on 13-12-13.
+//
+//
+
+#import "JPushPlugin.h"
+#import "JPUSHService.h"
+#import <UIKit/UIKit.h>
+#import <AdSupport/AdSupport.h>
+#import <UserNotifications/UserNotifications.h>
+#import "AppDelegate+JPush.h"
+#import "JPushDefine.h"
+
+@implementation NSDictionary (JPush)
+-(NSString*)toJsonString{
+    NSError  *error;
+    NSData   *data       = [NSJSONSerialization dataWithJSONObject:self options:0 error:&error];
+    NSString *jsonString = [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
+    return jsonString;
+}
+@end
+
+@implementation NSString (JPush)
+-(NSDictionary*)toDictionary{
+    NSError      *error;
+    NSData       *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding];
+    NSDictionary *dict     = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:&error];
+    return dict;
+}
+@end
+
+@interface JPushPlugin()
+
+@end
+
+@implementation JPushPlugin
+
+-(void)startJPushSDK:(CDVInvokedUrlCommand*)command{
+    [(AppDelegate*)[UIApplication sharedApplication].delegate startJPushSDK];
+}
+
+#pragma mark- 外部接口
+-(void)stopPush:(CDVInvokedUrlCommand*)command{
+    [[UIApplication sharedApplication]unregisterForRemoteNotifications];
+}
+
+-(void)resumePush:(CDVInvokedUrlCommand*)command{
+    [(AppDelegate*)[UIApplication sharedApplication].delegate registerForRemoteNotification];
+}
+
+-(void)isPushStopped:(CDVInvokedUrlCommand*)command{
+    NSNumber *result = [[UIApplication sharedApplication] isRegisteredForRemoteNotifications] ? @(0) : @(1);
+    [self handleResultWithValue:result command:command];
+}
+
+-(void)initial:(CDVInvokedUrlCommand*)command{
+    //do nithng,because Cordova plugin use lazy load mode.
+}
+
+#ifdef __CORDOVA_4_0_0
+
+- (void)pluginInitialize {
+    NSLog(@"### pluginInitialize ");
+    [self initPlugin];
+}
+
+#else
+
+- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView{
+    NSLog(@"### initWithWebView ");
+    if (self=[super initWithWebView:theWebView]) {
+    }
+    [self initPlugin];
+    return self;
+}
+
+#endif
+
+-(void)initPlugin{
+    if (!SharedJPushPlugin) {
+        SharedJPushPlugin = self;
+    }
+    [[NSNotificationCenter defaultCenter] addObserver:self
+                                             selector:@selector(networkDidReceiveMessage:)
+                                                 name:kJPFNetworkDidReceiveMessageNotification
+                                               object:nil];
+}
+
++(void)fireDocumentEvent:(NSString*)eventName jsString:(NSString*)jsString{
+    dispatch_async(dispatch_get_main_queue(), ^{
+        [SharedJPushPlugin.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireDocumentEvent('jpush.%@',%@)", eventName, jsString]];
+    });
+}
+
+-(void)setTagsWithAlias:(CDVInvokedUrlCommand*)command{
+    NSString *alias = [command argumentAtIndex:0];
+    NSArray  *tags  = [command argumentAtIndex:1];
+
+    [JPUSHService setTags:[NSSet setWithArray:tags]
+                    alias:alias
+    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
+        CDVPluginResult *result;
+        if (iResCode == 0) {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
+        } else {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
+        }
+        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+    }];
+}
+
+-(void)setTags:(CDVInvokedUrlCommand*)command{
+    NSArray *tags = command.arguments;
+    [JPUSHService setTags:[NSSet setWithArray:tags]
+                    alias:nil
+    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
+        CDVPluginResult *result;
+        if (iResCode == 0) {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
+        } else {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
+        }
+        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+    }];
+}
+
+-(void)setAlias:(CDVInvokedUrlCommand*)command{
+    NSString *alias = [command argumentAtIndex:0];
+    [JPUSHService setTags:nil
+                    alias:alias
+    fetchCompletionHandle:^(int iResCode, NSSet *iTags, NSString *iAlias) {
+        CDVPluginResult *result;
+        if (iResCode == 0) {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:nil];
+        } else {
+            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:nil];
+        }
+        [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+    }];
+}
+
+-(void)getRegistrationID:(CDVInvokedUrlCommand*)command{
+    NSString* registrationID = [JPUSHService registrationID];
+    [self handleResultWithValue:registrationID command:command];
+}
+
+-(void)startLogPageView:(CDVInvokedUrlCommand*)command{
+    NSString * pageName = [command argumentAtIndex:0];
+    [JPUSHService startLogPageView:pageName];
+}
+
+-(void)stopLogPageView:(CDVInvokedUrlCommand*)command{
+    NSString * pageName = [command argumentAtIndex:0];
+    [JPUSHService stopLogPageView:pageName];
+}
+
+-(void)beginLogPageView:(CDVInvokedUrlCommand*)command{
+    NSString *pageName = [command argumentAtIndex:0];
+    NSNumber *duration = [command argumentAtIndex:1];
+    [JPUSHService beginLogPageView:pageName duration:duration.intValue];
+}
+
+-(void)setBadge:(CDVInvokedUrlCommand*)command{
+    NSNumber *badge = [command argumentAtIndex:0];
+    [JPUSHService setBadge:badge.intValue];
+}
+
+-(void)resetBadge:(CDVInvokedUrlCommand*)command{
+    [JPUSHService resetBadge];
+}
+
+-(void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command{
+    NSNumber *badge = [command argumentAtIndex:0];
+    [UIApplication sharedApplication].applicationIconBadgeNumber = badge.intValue;
+}
+
+-(void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand*)command {
+    NSInteger num = [UIApplication sharedApplication].applicationIconBadgeNumber;
+    NSNumber *number = [NSNumber numberWithInteger:num];
+    [self handleResultWithValue:number command:command];
+}
+
+-(void)setDebugModeFromIos:(CDVInvokedUrlCommand*)command{
+    [JPUSHService setDebugMode];
+}
+
+-(void)setLogOFF:(CDVInvokedUrlCommand*)command{
+    [JPUSHService setLogOFF];
+}
+
+-(void)crashLogON:(CDVInvokedUrlCommand*)command{
+    [JPUSHService crashLogON];
+}
+
+-(void)setLocalNotification:(CDVInvokedUrlCommand*)command{
+    NSLog(@"ios 10 after please use UNNotificationRequest to set local notification, see apple doc to learn more");
+
+    NSDate       *date  = [NSDate dateWithTimeIntervalSinceNow:[[command argumentAtIndex:0] intValue]];
+    NSString     *alert = [command argumentAtIndex:1];
+    NSNumber     *badge = [command argumentAtIndex:2];
+    NSString     *idKey = [command argumentAtIndex:3];
+    NSDictionary *dict  = [command argumentAtIndex:4];
+    [JPUSHService setLocalNotification:date alertBody:alert badge:badge.intValue alertAction:nil identifierKey:idKey userInfo:dict soundName:nil];
+}
+
+-(void)deleteLocalNotificationWithIdentifierKey:(CDVInvokedUrlCommand*)command{
+    NSString *identifier = [command argumentAtIndex:0];
+    JPushNotificationIdentifier *jpid = [JPushNotificationIdentifier new];
+    jpid.identifiers = @[identifier];
+    [JPUSHService removeNotification:jpid];
+}
+
+-(void)clearAllLocalNotifications:(CDVInvokedUrlCommand*)command{
+    [JPUSHService removeNotification:nil];
+}
+
+-(void)setLocation:(CDVInvokedUrlCommand*)command{
+    NSNumber *latitude  = [command argumentAtIndex:0];
+    NSNumber *longitude = [command argumentAtIndex:1];
+    [JPUSHService setLatitude:latitude.doubleValue longitude:longitude.doubleValue];
+}
+
+-(void)getUserNotificationSettings:(CDVInvokedUrlCommand*)command{
+    if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) {
+        UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
+        WEAK_SELF(weakSelf);
+        [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
+            NSMutableDictionary *dict = [NSMutableDictionary dictionary];
+            dict[@"authorizationStatus"]       = @(settings.authorizationStatus);
+            dict[@"soundSetting"]              = @(settings.soundSetting);
+            dict[@"badgeSetting"]              = @(settings.badgeSetting);
+            dict[@"alertSetting"]              = @(settings.alertSetting);
+            dict[@"notificationCenterSetting"] = @(settings.notificationCenterSetting);
+            dict[@"lockScreenSetting"]         = @(settings.lockScreenSetting);
+            dict[@"carPlaySetting"]            = @(settings.carPlaySetting);
+            dict[@"alertStyle"]                = @(settings.alertStyle);
+            [weakSelf handleResultWithValue:dict command:command];
+        }];
+    }else if ([[UIDevice currentDevice].systemVersion floatValue] >= 8.0) {
+        UIUserNotificationSettings *settings = [[UIApplication sharedApplication] currentUserNotificationSettings];
+        UIUserNotificationType type = settings.types;
+        NSNumber *number = [NSNumber numberWithInteger:type];
+        [self handleResultWithValue:number command:command];
+    }else{
+        UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
+        NSNumber *number = [NSNumber numberWithInteger:type];
+        [self handleResultWithValue:number command:command];
+    }
+}
+
+#pragma mark - ios 10 APIs
+
+-(void)addDismissActions:(CDVInvokedUrlCommand*)command{
+    [self addActions:command dismiss:YES];
+}
+
+-(void)addNotificationActions:(CDVInvokedUrlCommand*)command{
+    [self addActions:command dismiss:NO];
+}
+
+-(void)addActions:(CDVInvokedUrlCommand*)command dismiss:(BOOL)dimiss{
+    NSArray *actionsData     = [command argumentAtIndex:0];
+    NSString *categoryId     = [command argumentAtIndex:1];
+    NSMutableArray *actions  = [NSMutableArray array];
+    for (NSDictionary *dict in actionsData) {
+        NSString *title      = dict[@"title"];
+        NSString *identifier = dict[@"identifier"];
+        NSString *option     = dict[@"option"];
+        NSString *type       = dict[@"type"];
+        if ([type isEqualToString:@"textInput"]) {
+            NSString *textInputButtonTitle = dict[@"textInputButtonTitle"];
+            NSString *textInputPlaceholder = dict[@"textInputPlaceholder"];
+            UNTextInputNotificationAction *inputAction = [UNTextInputNotificationAction actionWithIdentifier:identifier title:title options:option.integerValue textInputButtonTitle:textInputButtonTitle textInputPlaceholder:textInputPlaceholder];
+            [actions addObject:inputAction];
+        } else {
+            UNNotificationAction *action = [UNNotificationAction actionWithIdentifier:title title:title options:option.integerValue];
+            [actions addObject:action];
+        }
+    }
+    UNNotificationCategory *category;
+    if (dimiss) {
+        category = [UNNotificationCategory categoryWithIdentifier:categoryId
+                                                          actions:actions
+                                                intentIdentifiers:@[]
+                                                          options:UNNotificationCategoryOptionCustomDismissAction];
+    } else {
+        category = [UNNotificationCategory categoryWithIdentifier:categoryId
+                                                          actions:actions
+                                                intentIdentifiers:@[]
+                                                          options:UNNotificationCategoryOptionNone];
+    }
+    [[UNUserNotificationCenter currentNotificationCenter] setNotificationCategories:[NSSet setWithObject:category]];
+}
+
+#pragma mark - 内部方法
+
++(void)setupJPushSDK:(NSDictionary*)userInfo{
+    NSString *plistPath = [[NSBundle mainBundle] pathForResource:JPushConfig_FileName ofType:@"plist"];
+    if (plistPath == nil) {
+        NSLog(@"error: PushConfig.plist not found");
+        assert(0);
+    }
+
+    NSMutableDictionary *plistData = [[NSMutableDictionary alloc] initWithContentsOfFile:plistPath];
+    NSString *appkey       = [plistData valueForKey:JPushConfig_Appkey];
+    NSString *channel      = [plistData valueForKey:JPushConfig_Channel];
+    NSNumber *isProduction = [plistData valueForKey:JPushConfig_IsProduction];
+    NSNumber *isIDFA       = [plistData valueForKey:JPushConfig_IsIDFA];
+
+    NSString *advertisingId = nil;
+    if(isIDFA.boolValue) {
+        advertisingId = [[[ASIdentifierManager sharedManager] advertisingIdentifier] UUIDString];
+    }
+    [JPUSHService setupWithOption:userInfo
+                           appKey:appkey
+                          channel:channel
+                 apsForProduction:[isProduction boolValue]
+            advertisingIdentifier:advertisingId];
+}
+
+#pragma mark 将参数返回给js
+-(void)handleResultWithValue:(id)value command:(CDVInvokedUrlCommand*)command {
+    CDVPluginResult *result = nil;
+    CDVCommandStatus status = CDVCommandStatus_OK;
+
+    if ([value isKindOfClass:[NSString class]]) {
+        value = [value stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+    } else if ([value isKindOfClass:[NSNull class]]) {
+        value = nil;
+    }
+
+    if ([value isKindOfClass:[NSObject class]]) {
+        result = [CDVPluginResult resultWithStatus:status messageAsString:value];//NSObject 类型都可以
+    } else {
+        NSLog(@"Cordova callback block returned unrecognized type: %@", NSStringFromClass([value class]));
+        result = nil;
+    }
+
+    if (!result) {
+        result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR];
+    }
+    [self.commandDelegate sendPluginResult:result callbackId:command.callbackId];
+}
+
+#pragma mark 设置标签及别名回调
+-(void)tagsWithAliasCallback:(int)resultCode tags:(NSSet *)tags alias:(NSString *)alias {
+    if (resultCode == 0) {  // Success
+
+    } else {
+
+    }
+}
+
+- (void)networkDidReceiveMessage:(NSNotification *)notification {
+    if (notification && notification.userInfo) {
+        [JPushPlugin fireDocumentEvent:JPushDocumentEvent_ReceiveMessage
+                              jsString:[notification.userInfo toJsonString]];
+    }
+}
+
+@end

+ 0 - 0
miaomiao/plugins/jpush-phonegap-plugin/src/ios/lib/jpush-ios-3.0.6.a