x преди 5 години
родител
ревизия
920fed6ff8
променени са 100 файла, в които са добавени 3265 реда и са изтрити 1180 реда
  1. 44 2
      cordova/platforms/android/android.json
  2. 1 0
      cordova/platforms/android/app/src/main/AndroidManifest.xml
  3. 19 1
      cordova/platforms/android/app/src/main/assets/www/cordova_plugins.js
  4. 0 1
      cordova/platforms/android/app/src/main/assets/www/h5/css/chunk-e05bc250.8f9ed549.css
  5. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-057b2a2b.83350410.js
  6. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-057b2a2b.83350410.js.map
  7. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1206bda5.8aecfc62.js
  8. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1206bda5.8aecfc62.js.map
  9. 0 2
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1239267a.ba84e683.js
  10. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1239267a.ba84e683.js.map
  11. 0 7
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-17fb6bfc.59b180b4.js
  12. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-17fb6bfc.59b180b4.js.map
  13. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e25e209.66ab4a13.js
  14. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e25e209.66ab4a13.js.map
  15. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e931ea8.48bf0eed.js
  16. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e931ea8.48bf0eed.js.map
  17. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2604c6a4.7606a2df.js
  18. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2604c6a4.7606a2df.js.map
  19. 0 2
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d221dc8.7e2fef4b.js
  20. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d221dc8.7e2fef4b.js.map
  21. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d230838.4a3e8f60.js
  22. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d230838.4a3e8f60.js.map
  23. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-32655d9a.71e0ccce.js
  24. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-32655d9a.71e0ccce.js.map
  25. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3b81bd8e.4c19d2c4.js
  26. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3b81bd8e.4c19d2c4.js.map
  27. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3c12acd2.619afd7f.js
  28. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3c12acd2.619afd7f.js.map
  29. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-416bff87.9a3b43fa.js
  30. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-416bff87.9a3b43fa.js.map
  31. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-457330e9.659df110.js
  32. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-457330e9.659df110.js.map
  33. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574532e.c39c2781.js
  34. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574532e.c39c2781.js.map
  35. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-45748c74.01d5e787.js
  36. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-45748c74.01d5e787.js.map
  37. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574ca4b.1a4353b3.js
  38. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574ca4b.1a4353b3.js.map
  39. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4575a9d0.a3ec317f.js
  40. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4575a9d0.a3ec317f.js.map
  41. 0 2
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4af80ac8.f326b958.js
  42. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4af80ac8.f326b958.js.map
  43. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4ba20b2e.16b757f3.js
  44. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4ba20b2e.16b757f3.js.map
  45. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4c6be602.e6065cca.js
  46. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4c6be602.e6065cca.js.map
  47. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6c470f5d.cdd9d962.js
  48. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6c470f5d.cdd9d962.js.map
  49. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6cec4f9e.a7065d60.js
  50. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6cec4f9e.a7065d60.js.map
  51. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7084196a.06ee0e3e.js
  52. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7084196a.06ee0e3e.js.map
  53. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-74098e3a.e67682d2.js
  54. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-74098e3a.e67682d2.js.map
  55. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-75ac6416.429fb470.js
  56. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-75ac6416.429fb470.js.map
  57. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-797b900d.e763246b.js
  58. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-797b900d.e763246b.js.map
  59. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7baa1aee.dd79e623.js
  60. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7baa1aee.dd79e623.js.map
  61. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-97762e36.44a30485.js
  62. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-97762e36.44a30485.js.map
  63. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-a0ae187c.b90edcf2.js
  64. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-a0ae187c.b90edcf2.js.map
  65. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-dbf406ec.5f384a42.js
  66. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-dbf406ec.5f384a42.js.map
  67. 0 2
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-e05bc250.794e11f3.js
  68. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-e05bc250.794e11f3.js.map
  69. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ec5fb900.c65b616d.js
  70. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ec5fb900.c65b616d.js.map
  71. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-f7f01892.ec13fad5.js
  72. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-f7f01892.ec13fad5.js.map
  73. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ff908aee.09d1f2a7.js
  74. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ff908aee.09d1f2a7.js.map
  75. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/login.21c4c556.js
  76. 0 0
      cordova/platforms/android/app/src/main/assets/www/h5/js/login.21c4c556.js.map
  77. 1 1
      cordova/platforms/android/app/src/main/assets/www/index.html
  78. 532 0
      cordova/platforms/android/app/src/main/java/com/mesmotronic/plugins/FullScreenPlugin.java
  79. 276 0
      cordova/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java
  80. 12 0
      cordova/platforms/android/app/src/main/res/xml/config.xml
  81. 218 290
      cordova/platforms/android/platform_www/cordova_plugins.js
  82. 205 158
      cordova/platforms/android/platform_www/plugins/code-push/script/acquisition-sdk.js
  83. 22 17
      cordova/platforms/android/platform_www/plugins/cordova-plugin-zip/zip.js
  84. 1 1
      cordova/platforms/android/project.properties
  85. 762 694
      cordova/platforms/ios/CordovaLib/cordova.js
  86. 698 0
      cordova/platforms/ios/cordova/Api.js
  87. 27 0
      cordova/platforms/ios/cordova/apple_ios_version
  88. 27 0
      cordova/platforms/ios/cordova/apple_osx_version
  89. 32 0
      cordova/platforms/ios/cordova/apple_xcode_version
  90. 66 0
      cordova/platforms/ios/cordova/build
  91. 32 0
      cordova/platforms/ios/cordova/build-debug.xcconfig
  92. 0 0
      cordova/platforms/ios/cordova/build-extras.xcconfig
  93. 33 0
      cordova/platforms/ios/cordova/build-release.xcconfig
  94. 19 0
      cordova/platforms/ios/cordova/build.bat
  95. 45 0
      cordova/platforms/ios/cordova/build.xcconfig
  96. 32 0
      cordova/platforms/ios/cordova/check_reqs
  97. 25 0
      cordova/platforms/ios/cordova/check_reqs.bat
  98. 52 0
      cordova/platforms/ios/cordova/clean
  99. 19 0
      cordova/platforms/ios/cordova/clean.bat
  100. 65 0
      cordova/platforms/ios/cordova/defaults.xml

+ 44 - 2
cordova/platforms/android/android.json

@@ -31,8 +31,17 @@
             {
               "xml": "<feature name=\"LaunchMyApp\"><param name=\"android-package\" value=\"nl.xservices.plugins.LaunchMyApp\" /></feature>",
               "count": 1
+            },
+            {
+              "xml": "<feature name=\"AndroidFullScreen\"><param name=\"android-package\" value=\"com.mesmotronic.plugins.FullScreenPlugin\" /></feature>",
+              "count": 1
+            },
+            {
+              "xml": "<feature name=\"StatusBar\"><param name=\"android-package\" value=\"org.apache.cordova.statusbar.StatusBar\" /><param name=\"onload\" value=\"true\" /></feature>",
+              "count": 1
             }
-          ]
+          ],
+          "/widget": []
         }
       },
       "AndroidManifest.xml": {
@@ -187,6 +196,10 @@
             {
               "xml": "<activity android:exported=\"true\" android:label=\"@string/launcher_name\" android:launchMode=\"singleTop\" android:name=\".wxapi.WXPayEntryActivity\"><intent-filter><action android:name=\"android.intent.action.VIEW\" /><category android:name=\"android.intent.category.DEFAULT\" /><data android:scheme=\"wx1bb4342986c22b28\" /></intent-filter></activity>",
               "count": 1
+            },
+            {
+              "xml": "<meta-data android:name=\"android.max_aspect\" android:value=\"2.16\" />",
+              "count": 1
             }
           ],
           "/*": [
@@ -222,6 +235,11 @@
             }
           ]
         }
+      },
+      "config.xml": {
+        "parents": {
+          "/*": []
+        }
       }
     }
   },
@@ -251,6 +269,12 @@
       "ANDROID_HOST": " ",
       "ANDROID_PATHPREFIX": "/",
       "PACKAGE_NAME": "com.shotshock.twong"
+    },
+    "cordova-plugin-fullscreen": {
+      "PACKAGE_NAME": "com.shotshock.twong"
+    },
+    "cordova-plugin-statusbar": {
+      "PACKAGE_NAME": "com.shotshock.twong"
     }
   },
   "dependent_plugins": {},
@@ -286,6 +310,22 @@
       "clobbers": [
         "window.plugins.launchmyapp"
       ]
+    },
+    {
+      "id": "cordova-plugin-fullscreen.AndroidFullScreen",
+      "file": "plugins/cordova-plugin-fullscreen/www/AndroidFullScreen.js",
+      "pluginId": "cordova-plugin-fullscreen",
+      "clobbers": [
+        "AndroidFullScreen"
+      ]
+    },
+    {
+      "id": "cordova-plugin-statusbar.statusbar",
+      "file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
+      "pluginId": "cordova-plugin-statusbar",
+      "clobbers": [
+        "window.StatusBar"
+      ]
     }
   ],
   "plugin_metadata": {
@@ -294,6 +334,8 @@
     "cordova-plugin-jcore": "1.3.3",
     "jpush-phonegap-plugin": "3.7.6",
     "cordova-plugin-wechat": "3.0.0",
-    "cordova-plugin-customurlscheme": "5.0.2"
+    "cordova-plugin-customurlscheme": "5.0.2",
+    "cordova-plugin-fullscreen": "1.3.0",
+    "cordova-plugin-statusbar": "2.4.3"
   }
 }

+ 1 - 0
cordova/platforms/android/app/src/main/AndroidManifest.xml

@@ -111,6 +111,7 @@
                 <data android:scheme="wx1bb4342986c22b28" />
             </intent-filter>
         </activity>
+        <meta-data android:name="android.max_aspect" android:value="2.16" />
     </application>
     <permission android:name="com.shotshock.twong.permission.JPUSH_MESSAGE" android:protectionLevel="signature" />
     <uses-permission android:name="com.shotshock.twong.permission.JPUSH_MESSAGE" />

+ 19 - 1
cordova/platforms/android/app/src/main/assets/www/cordova_plugins.js

@@ -31,6 +31,22 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
       "clobbers": [
         "window.plugins.launchmyapp"
       ]
+    },
+    {
+      "id": "cordova-plugin-fullscreen.AndroidFullScreen",
+      "file": "plugins/cordova-plugin-fullscreen/www/AndroidFullScreen.js",
+      "pluginId": "cordova-plugin-fullscreen",
+      "clobbers": [
+        "AndroidFullScreen"
+      ]
+    },
+    {
+      "id": "cordova-plugin-statusbar.statusbar",
+      "file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
+      "pluginId": "cordova-plugin-statusbar",
+      "clobbers": [
+        "window.StatusBar"
+      ]
     }
   ];
   module.exports.metadata = {
@@ -39,6 +55,8 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
     "cordova-plugin-jcore": "1.3.3",
     "jpush-phonegap-plugin": "3.7.6",
     "cordova-plugin-wechat": "3.0.0",
-    "cordova-plugin-customurlscheme": "5.0.2"
+    "cordova-plugin-customurlscheme": "5.0.2",
+    "cordova-plugin-fullscreen": "1.3.0",
+    "cordova-plugin-statusbar": "2.4.3"
   };
 });

+ 0 - 1
cordova/platforms/android/app/src/main/assets/www/h5/css/chunk-e05bc250.8f9ed549.css

@@ -1 +0,0 @@
-.CustomerList[data-v-e76b0d8c]{margin-top:.13rem}.CustomerList .item[data-v-e76b0d8c]{height:1.38rem;border-bottom:1px solid #eee;padding:0 .24rem;background-color:#fff}.CustomerList .item .pictrue[data-v-e76b0d8c]{width:.9rem;height:.9rem;border-radius:50%;border:.03rem solid #fff;box-shadow:0 0 .1rem .05rem #f3f3f3;-webkit-box-shadow:0 0 .1rem .05rem #f3f3f3;-moz-box-shadow:0 0 .1rem .05rem #f3f3f3}.CustomerList .item .pictrue img[data-v-e76b0d8c]{width:100%;height:100%;border-radius:50%}.CustomerList .item .text[data-v-e76b0d8c]{width:5.82rem;font-size:.32rem;color:#000}

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-057b2a2b.83350410.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-057b2a2b.83350410.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1206bda5.8aecfc62.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1206bda5.8aecfc62.js.map


+ 0 - 2
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1239267a.ba84e683.js

@@ -1,2 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1239267a"],{9642:function(t,a,n){"use strict";n.r(a);var s=function(){var t=this,a=t.$createElement,n=t._self._c||a;return!1===t.status?n("div",{staticClass:"poster-poster"},[t._m(0),n("div",{staticClass:"poster"},[n("img",{attrs:{src:t.image}})])]):t._e()},e=[function(){var t=this,a=t.$createElement,n=t._self._c||a;return n("div",{staticClass:"tip"},[n("span",{staticClass:"iconfont icon-shuoming"}),t._v("提示:长按图片保存至手机相册\n  ")])}],i=n("ca41"),o={name:"Poster",components:{},props:{},data:function(){return{status:!0,id:0,image:""}},mounted:function(){var t=this,a=t.$route.params.id,n=t.$route.params.type;t.id=a,2==n?t.getBargainPoster():t.getCombinationPoster()},methods:{getBargainPoster:function(){var t=this;Object(i["g"])({bargainId:t.id,from:"wechat"}).then((function(a){t.image=a.data.url,t.status=!1})).catch((function(a){t.$dialog.error(a.msg)}))},getCombinationPoster:function(){var t=this;Object(i["p"])({id:t.id,from:"wechat"}).then((function(a){t.image=a.data.url,t.status=!1})).catch((function(a){t.$dialog.error(a.msg)}))}}},r=o,c=(n("b8db"),n("2877")),u=Object(c["a"])(r,s,e,!1,null,"ff36e5c0",null);a["default"]=u.exports},a33a:function(t,a,n){},b8db:function(t,a,n){"use strict";var s=n("a33a"),e=n.n(s);e.a}}]);
-//# sourceMappingURL=chunk-1239267a.ba84e683.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1239267a.ba84e683.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 7
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-17fb6bfc.59b180b4.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-17fb6bfc.59b180b4.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e25e209.66ab4a13.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e25e209.66ab4a13.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e931ea8.48bf0eed.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-1e931ea8.48bf0eed.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2604c6a4.7606a2df.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2604c6a4.7606a2df.js.map


+ 0 - 2
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d221dc8.7e2fef4b.js

@@ -1,2 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d221dc8"],{cbc6:function(t,a,i){"use strict";i.r(a);var s=function(){var t=this,a=t.$createElement,i=t._self._c||a;return i("div",{staticClass:"bargain-list"},[i("div",{staticClass:"header"}),i("div",{staticClass:"list"},[t._l(t.bargainLis,(function(a,s){return i("div",{key:s,staticClass:"item acea-row row-between-wrapper"},[i("div",{staticClass:"pictrue"},[i("img",{attrs:{src:a.image}})]),i("div",{staticClass:"text acea-row row-column-around"},[i("div",{staticClass:"line1",domProps:{textContent:t._s(a.title)}}),i("div",{staticClass:"num"},[i("span",{staticClass:"iconfont icon-pintuan"}),t._v(t._s(a.people)+"人正在参与\n        ")]),i("div",{staticClass:"money font-color-red"},[t._v("\n          可砍至: ¥"),i("span",{staticClass:"price",domProps:{textContent:t._s(a.min_price)}})])]),i("div",{staticClass:"cutBnt bg-color-red",on:{click:function(i){return t.goDetail(a.id)}}},[i("span",{staticClass:"iconfont icon-kanjia"}),t._v("参与砍价\n      ")])])})),t.status?t._e():i("div",{staticClass:"load font-color-red",on:{click:t.getBargainList}},[t._v("\n      点击加载更多\n    ")])],2)])},n=[],e=i("ca41"),o={name:"GoodsBargain",components:{},props:{},data:function(){return{bargainLis:[],status:!1,loading:!1,page:1,limit:20}},mounted:function(){this.getBargainList()},methods:{getBargainList:function(){var t=this;t.loading||t.status||(t.loading=!0,Object(e["f"])({page:t.page,limit:t.limit}).then((function(a){t.status=a.data.length<t.limit,t.bargainLis.push.apply(t.bargainLis,a.data),t.page++,t.loading=!1})))},goDetail:function(t){this.$router.push({path:"/activity/dargain_detail/"+t+"/0"})}}},c=o,l=i("2877"),r=Object(l["a"])(c,s,n,!1,null,null,null);a["default"]=r.exports}}]);
-//# sourceMappingURL=chunk-2d221dc8.7e2fef4b.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d221dc8.7e2fef4b.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d230838.4a3e8f60.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-2d230838.4a3e8f60.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-32655d9a.71e0ccce.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-32655d9a.71e0ccce.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3b81bd8e.4c19d2c4.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3b81bd8e.4c19d2c4.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3c12acd2.619afd7f.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-3c12acd2.619afd7f.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-416bff87.9a3b43fa.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-416bff87.9a3b43fa.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-457330e9.659df110.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-457330e9.659df110.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574532e.c39c2781.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574532e.c39c2781.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-45748c74.01d5e787.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-45748c74.01d5e787.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574ca4b.1a4353b3.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4574ca4b.1a4353b3.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4575a9d0.a3ec317f.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4575a9d0.a3ec317f.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 2
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4af80ac8.f326b958.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4af80ac8.f326b958.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4ba20b2e.16b757f3.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4ba20b2e.16b757f3.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4c6be602.e6065cca.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-4c6be602.e6065cca.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6c470f5d.cdd9d962.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6c470f5d.cdd9d962.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6cec4f9e.a7065d60.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-6cec4f9e.a7065d60.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7084196a.06ee0e3e.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7084196a.06ee0e3e.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-74098e3a.e67682d2.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-74098e3a.e67682d2.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-75ac6416.429fb470.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-75ac6416.429fb470.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-797b900d.e763246b.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-797b900d.e763246b.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7baa1aee.dd79e623.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-7baa1aee.dd79e623.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-97762e36.44a30485.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-97762e36.44a30485.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-a0ae187c.b90edcf2.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-a0ae187c.b90edcf2.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-dbf406ec.5f384a42.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-dbf406ec.5f384a42.js.map


+ 0 - 2
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-e05bc250.794e11f3.js

@@ -1,2 +0,0 @@
-(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e05bc250"],{"2cf7":function(t,r,e){"use strict";var d=e("67d7"),s=e.n(d);s.a},"67d7":function(t,r,e){},f191:function(t,r,e){"use strict";e.r(r);var d=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",{staticClass:"CustomerList"},t._l(t.list,(function(r){return e("div",{key:r.id,staticClass:"item acea-row row-between-wrapper",on:{click:function(e){t.$router.push("/customer/chat/"+r.uid+"/"+t.productId+(t.orderId?"?orderId="+t.orderId:""))}}},[e("div",{staticClass:"pictrue"},[e("img",{attrs:{src:r.avatar}})]),e("div",{staticClass:"text line1"},[t._v(t._s(r.nickname))])])})),0)},s=[],i=(e("7f7f"),e("c24f")),o={name:"CustomerList",data:function(){return{list:[],productId:0,orderId:""}},watch:{$route:function(t){"CustomerList"===t.name&&(t.params.productId?this.productId=t.params.productId:this.productId=0,t.query.orderId?this.orderId=t.query.orderId:this.orderId="")}},methods:{getList:function(){var t=this;Object(i["V"])().then((function(r){t.list=r.data}))}},mounted:function(){this.getList(),this.$route.params.productId&&(this.productId=this.$route.params.productId),this.$route.query.orderId&&(this.orderId=this.$route.query.orderId)}},u=o,c=(e("2cf7"),e("2877")),n=Object(c["a"])(u,d,s,!1,null,"e76b0d8c",null);r["default"]=n.exports}}]);
-//# sourceMappingURL=chunk-e05bc250.794e11f3.js.map

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-e05bc250.794e11f3.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ec5fb900.c65b616d.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ec5fb900.c65b616d.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-f7f01892.ec13fad5.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-f7f01892.ec13fad5.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ff908aee.09d1f2a7.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/chunk-ff908aee.09d1f2a7.js.map


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/login.21c4c556.js


Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
cordova/platforms/android/app/src/main/assets/www/h5/js/login.21c4c556.js.map


Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
cordova/platforms/android/app/src/main/assets/www/index.html


+ 532 - 0
cordova/platforms/android/app/src/main/java/com/mesmotronic/plugins/FullScreenPlugin.java

@@ -0,0 +1,532 @@
+package com.mesmotronic.plugins;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.apache.cordova.CordovaInterface;
+import org.apache.cordova.CordovaWebView;
+import org.json.JSONArray;
+import org.json.JSONException;
+
+import android.app.Activity;
+import android.graphics.Point;
+import android.os.Build;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+import android.graphics.Color;
+import android.os.Handler;
+
+public class FullScreenPlugin extends CordovaPlugin
+{
+	public static final String ACTION_IS_SUPPORTED = "isSupported";
+	public static final String ACTION_IS_IMMERSIVE_MODE_SUPPORTED = "isImmersiveModeSupported";
+	public static final String ACTION_IMMERSIVE_WIDTH = "immersiveWidth";
+	public static final String ACTION_IMMERSIVE_HEIGHT = "immersiveHeight";
+	public static final String ACTION_LEAN_MODE = "leanMode";
+	public static final String ACTION_SHOW_SYSTEM_UI = "showSystemUI";
+	public static final String ACTION_SHOW_UNDER_STATUS_BAR = "showUnderStatusBar";
+	public static final String ACTION_SHOW_UNDER_SYSTEM_UI = "showUnderSystemUI";
+	public static final String ACTION_IMMERSIVE_MODE = "immersiveMode";
+	public static final String ACTION_SET_SYSTEM_UI_VISIBILITY = "setSystemUiVisibility";
+	public static final String ACTION_RESET_WINDOW = "resetScreen";
+	
+	private CallbackContext context;
+	private Activity activity;
+	private Window window;
+	private View decorView;
+	private int mLastSystemUIVisibility = 0;
+	private final Handler mLeanBackHandler = new Handler();
+	private final Runnable mEnterLeanback = new Runnable() {
+	    @Override
+	    public void run() {
+	        leanMode();
+	    }
+	};
+	
+	/**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    @Override
+    public void initialize(final CordovaInterface cordova, final CordovaWebView webView) {
+        super.initialize(cordova, webView);
+
+        this.cordova.getActivity().runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                // Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially
+                // by the Cordova.
+                Window window = cordova.getActivity().getWindow();
+                window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+
+                // Read 'StatusBarBackgroundColor' from config.xml, default is #000000.
+                setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000"));
+            }
+        });
+    }
+
+	@Override
+	public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException
+	{
+		context = callbackContext;
+		activity = cordova.getActivity();
+		window = activity.getWindow();
+		decorView = window.getDecorView();
+		
+		if (ACTION_IS_SUPPORTED.equals(action))
+			return isSupported();
+		else if (ACTION_IS_IMMERSIVE_MODE_SUPPORTED.equals(action))
+			return isImmersiveModeSupported();
+		else if (ACTION_IMMERSIVE_WIDTH.equals(action))
+			return immersiveWidth();
+		else if (ACTION_IMMERSIVE_HEIGHT.equals(action))
+			return immersiveHeight();
+		else if (ACTION_LEAN_MODE.equals(action))
+			return leanMode();
+		else if (ACTION_SHOW_SYSTEM_UI.equals(action))
+			return showSystemUI();
+		else if (ACTION_SHOW_UNDER_STATUS_BAR.equals(action))
+			return showUnderStatusBar();
+		else if (ACTION_SHOW_UNDER_SYSTEM_UI.equals(action))
+			return showUnderSystemUI();
+		else if (ACTION_IMMERSIVE_MODE.equals(action))
+			return immersiveMode();
+		else if (ACTION_SET_SYSTEM_UI_VISIBILITY.equals(action))
+			return setSystemUiVisibility(args.getInt(0));
+		else if (ACTION_RESET_WINDOW.equals(action))
+			return resetScreen();
+		
+		return false;
+	}
+	
+	protected void resetWindow()
+	{
+		decorView.setOnFocusChangeListener(null); 
+		decorView.setOnSystemUiVisibilityChangeListener(null);
+		
+		window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+	}
+	
+	/**
+	 * Are any of the features of this plugin supported?
+	 */
+	protected boolean isSupported()
+	{
+		boolean supported = Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH;
+		
+        PluginResult res = new PluginResult(PluginResult.Status.OK, supported);
+        context.sendPluginResult(res);
+		return supported;
+	}
+	
+	/**
+	 * Is immersive mode supported?
+	 */
+	protected boolean isImmersiveModeSupported()
+	{
+		boolean supported = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
+		
+        PluginResult res = new PluginResult(PluginResult.Status.OK, supported);
+        context.sendPluginResult(res);
+		return supported;
+	}
+	
+	/**
+	 * The width of the screen in immersive mode
+	 */
+	protected boolean immersiveWidth()
+	{
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					Point outSize = new Point();
+					
+					decorView.getDisplay().getRealSize(outSize);
+					
+			        PluginResult res = new PluginResult(PluginResult.Status.OK, outSize.x);
+			        context.sendPluginResult(res);
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+	
+	/**
+	 * The height of the screen in immersive mode
+	 */	
+	protected boolean immersiveHeight()
+	{
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					Point outSize = new Point();
+					
+					decorView.getDisplay().getRealSize(outSize);
+					
+			        PluginResult res = new PluginResult(PluginResult.Status.OK, outSize.y);
+			        context.sendPluginResult(res);
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+        
+		return true;
+	}
+	
+	/**
+	 * Hide system UI until user interacts
+	 */
+	protected boolean leanMode()
+	{
+		if (!isSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+					
+					int uiOptions = 
+						View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+						| View.SYSTEM_UI_FLAG_FULLSCREEN
+			            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+			            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+			            | View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
+					
+					mLastSystemUIVisibility = uiOptions;
+					decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener()
+					{
+						@Override
+						public void onSystemUiVisibilityChange(int visibility) 
+						{
+							if((mLastSystemUIVisibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) != 0
+                 					&& (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
+        						resetHideTimer();
+    						}
+    						mLastSystemUIVisibility = visibility;
+						}
+					});
+
+					decorView.setSystemUiVisibility(uiOptions);
+					
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+
+	private void resetHideTimer() {
+	    // First cancel any queued events - i.e. resetting the countdown clock
+	    mLeanBackHandler.removeCallbacks(mEnterLeanback);
+	    // And fire the event in 3s time
+	    mLeanBackHandler.postDelayed(mEnterLeanback, 3000);
+	}
+	
+	/**
+	 * Show system UI
+	 */
+	protected boolean showSystemUI()
+	{
+		if (!isSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+			        
+					// Remove translucent theme from bars
+					
+					window.clearFlags
+					(
+						WindowManager.LayoutParams.FLAG_FULLSCREEN 
+						| WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION 
+						| WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS
+					);
+					
+			        // Update system UI
+					
+					decorView.setOnSystemUiVisibilityChangeListener(null);
+					decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
+					
+					PluginResult res = new PluginResult(PluginResult.Status.OK, true);
+			        context.sendPluginResult(res);
+					
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});			
+		
+		return true;
+	}
+	
+	/**
+	 * Extend your app underneath the status bar (Android 4.4+ only)
+	 */
+	protected boolean showUnderStatusBar()
+	{
+		if (!isImmersiveModeSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+					
+					// Make the status bar translucent
+					
+			        window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+			        
+			        // Extend view underneath status bar
+					
+					int uiOptions = 
+						View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+						| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+						| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
+
+					decorView.setSystemUiVisibility(uiOptions);
+					
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+
+	/**
+	 * Undo the effect of any of the other methods of this plugin
+	 */
+	protected boolean resetScreen()
+	{
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+	
+	/**
+	 * Extend your app underneath the system UI (Android 4.4+ only)
+	 */
+	protected boolean showUnderSystemUI()
+	{
+		if (!isImmersiveModeSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+					
+					// Make the status and nav bars translucent
+					
+					window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
+					window.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+					
+					// Extend view underneath status and nav bars
+					
+					int uiOptions = 
+							View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+							| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION;
+					
+					decorView.setSystemUiVisibility(uiOptions);
+					
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+	
+	/**
+	 * Hide system UI and switch to immersive mode (Android 4.4+ only)
+	 */
+	protected boolean immersiveMode()
+	{
+		if (!isImmersiveModeSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+					
+					final int uiOptions = 
+						View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+						| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+						| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+						| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+						| View.SYSTEM_UI_FLAG_FULLSCREEN
+						| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
+					
+					window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+					decorView.setSystemUiVisibility(uiOptions);
+					
+					decorView.setOnFocusChangeListener(new View.OnFocusChangeListener() 
+					{
+						@Override
+						public void onFocusChange(View v, boolean hasFocus) 
+						{
+							if (hasFocus)
+							{
+								decorView.setSystemUiVisibility(uiOptions);
+							}
+						}
+					});
+					
+					decorView.setOnSystemUiVisibilityChangeListener(new View.OnSystemUiVisibilityChangeListener()
+					{
+						@Override
+						public void onSystemUiVisibilityChange(int visibility) 
+						{
+							decorView.setSystemUiVisibility(uiOptions);
+						}
+					});
+					
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+			
+		return true;
+	}
+	
+	protected boolean setSystemUiVisibility(final int visibility)
+	{
+		if (!isSupported())
+		{
+			context.error("Not supported");
+			return false;
+		}
+		
+		activity.runOnUiThread(new Runnable()
+		{
+			@Override
+			public void run() 
+			{
+				try
+				{
+					resetWindow();
+					decorView.setSystemUiVisibility(visibility);
+					context.success();
+				}
+				catch (Exception e)
+				{
+					context.error(e.getMessage());
+				}
+			}
+		});
+		
+		return true;
+	}
+	
+	private void setStatusBarBackgroundColor(final String colorPref) {
+        if (Build.VERSION.SDK_INT >= 21) {
+            if (colorPref != null && !colorPref.isEmpty()) {
+                final Window window = cordova.getActivity().getWindow();
+                // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK
+                window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+                window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+                try {
+                    // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21
+                    window.getClass().getDeclaredMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
+                } catch (IllegalArgumentException ignore) {
+                } catch (Exception ignore) {
+                }
+            }
+        }
+    }
+	
+}

+ 276 - 0
cordova/platforms/android/app/src/main/java/org/apache/cordova/statusbar/StatusBar.java

@@ -0,0 +1,276 @@
+/*
+ * 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.
+ *
+*/
+package org.apache.cordova.statusbar;
+
+import android.app.Activity;
+import android.graphics.Color;
+import android.os.Build;
+import android.view.View;
+import android.view.Window;
+import android.view.WindowManager;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaArgs;
+import org.apache.cordova.CordovaInterface;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.LOG;
+import org.apache.cordova.PluginResult;
+import org.json.JSONException;
+import java.util.Arrays;
+
+public class StatusBar extends CordovaPlugin {
+    private static final String TAG = "StatusBar";
+
+    /**
+     * Sets the context of the Command. This can then be used to do things like
+     * get file paths associated with the Activity.
+     *
+     * @param cordova The context of the main Activity.
+     * @param webView The CordovaWebView Cordova is running in.
+     */
+    @Override
+    public void initialize(final CordovaInterface cordova, CordovaWebView webView) {
+        LOG.v(TAG, "StatusBar: initialization");
+        super.initialize(cordova, webView);
+
+        this.cordova.getActivity().runOnUiThread(new Runnable() {
+            @Override
+            public void run() {
+                // Clear flag FLAG_FORCE_NOT_FULLSCREEN which is set initially
+                // by the Cordova.
+                Window window = cordova.getActivity().getWindow();
+                window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
+
+                // Read 'StatusBarBackgroundColor' from config.xml, default is #000000.
+                setStatusBarBackgroundColor(preferences.getString("StatusBarBackgroundColor", "#000000"));
+
+                // Read 'StatusBarStyle' from config.xml, default is 'lightcontent'.
+                setStatusBarStyle(preferences.getString("StatusBarStyle", "lightcontent"));
+            }
+        });
+    }
+
+    /**
+     * Executes the request and returns PluginResult.
+     *
+     * @param action            The action to execute.
+     * @param args              JSONArry of arguments for the plugin.
+     * @param callbackContext   The callback id used when calling back into JavaScript.
+     * @return                  True if the action was valid, false otherwise.
+     */
+    @Override
+    public boolean execute(final String action, final CordovaArgs args, final CallbackContext callbackContext) throws JSONException {
+        LOG.v(TAG, "Executing action: " + action);
+        final Activity activity = this.cordova.getActivity();
+        final Window window = activity.getWindow();
+
+        if ("_ready".equals(action)) {
+            boolean statusBarVisible = (window.getAttributes().flags & WindowManager.LayoutParams.FLAG_FULLSCREEN) == 0;
+            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, statusBarVisible));
+            return true;
+        }
+
+        if ("show".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    // SYSTEM_UI_FLAG_FULLSCREEN is available since JellyBean, but we
+                    // use KitKat here to be aligned with "Fullscreen"  preference
+                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+                        int uiOptions = window.getDecorView().getSystemUiVisibility();
+                        uiOptions &= ~View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
+                        uiOptions &= ~View.SYSTEM_UI_FLAG_FULLSCREEN;
+
+                        window.getDecorView().setSystemUiVisibility(uiOptions);
+                    }
+
+                    // CB-11197 We still need to update LayoutParams to force status bar
+                    // to be hidden when entering e.g. text fields
+                    window.clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+                }
+            });
+            return true;
+        }
+
+        if ("hide".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    // SYSTEM_UI_FLAG_FULLSCREEN is available since JellyBean, but we
+                    // use KitKat here to be aligned with "Fullscreen"  preference
+                    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
+                        int uiOptions = window.getDecorView().getSystemUiVisibility()
+                                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+                                | View.SYSTEM_UI_FLAG_FULLSCREEN;
+
+                        window.getDecorView().setSystemUiVisibility(uiOptions);
+                    }
+
+                    // CB-11197 We still need to update LayoutParams to force status bar
+                    // to be hidden when entering e.g. text fields
+                    window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
+                }
+            });
+            return true;
+        }
+
+        if ("backgroundColorByHexString".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    try {
+                        setStatusBarBackgroundColor(args.getString(0));
+                    } catch (JSONException ignore) {
+                        LOG.e(TAG, "Invalid hexString argument, use f.i. '#777777'");
+                    }
+                }
+            });
+            return true;
+        }
+
+        if ("overlaysWebView".equals(action)) {
+            if (Build.VERSION.SDK_INT >= 21) {
+                this.cordova.getActivity().runOnUiThread(new Runnable() {
+                    @Override
+                    public void run() {
+                        try {
+                            setStatusBarTransparent(args.getBoolean(0));
+                        } catch (JSONException ignore) {
+                            LOG.e(TAG, "Invalid boolean argument");
+                        }
+                    }
+                });
+                return true;
+            }
+            else return args.getBoolean(0) == false;
+        }
+
+        if ("styleDefault".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    setStatusBarStyle("default");
+                }
+            });
+            return true;
+        }
+
+        if ("styleLightContent".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    setStatusBarStyle("lightcontent");
+                }
+            });
+            return true;
+        }
+
+        if ("styleBlackTranslucent".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    setStatusBarStyle("blacktranslucent");
+                }
+            });
+            return true;
+        }
+
+        if ("styleBlackOpaque".equals(action)) {
+            this.cordova.getActivity().runOnUiThread(new Runnable() {
+                @Override
+                public void run() {
+                    setStatusBarStyle("blackopaque");
+                }
+            });
+            return true;
+        }
+
+        return false;
+    }
+
+    private void setStatusBarBackgroundColor(final String colorPref) {
+        if (Build.VERSION.SDK_INT >= 21) {
+            if (colorPref != null && !colorPref.isEmpty()) {
+                final Window window = cordova.getActivity().getWindow();
+                // Method and constants not available on all SDKs but we want to be able to compile this code with any SDK
+                window.clearFlags(0x04000000); // SDK 19: WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
+                window.addFlags(0x80000000); // SDK 21: WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+                try {
+                    // Using reflection makes sure any 5.0+ device will work without having to compile with SDK level 21
+                    window.getClass().getMethod("setStatusBarColor", int.class).invoke(window, Color.parseColor(colorPref));
+                } catch (IllegalArgumentException ignore) {
+                    LOG.e(TAG, "Invalid hexString argument, use f.i. '#999999'");
+                } catch (Exception ignore) {
+                    // this should not happen, only in case Android removes this method in a version > 21
+                    LOG.w(TAG, "Method window.setStatusBarColor not found for SDK level " + Build.VERSION.SDK_INT);
+                }
+            }
+        }
+    }
+
+    private void setStatusBarTransparent(final boolean transparent) {
+        if (Build.VERSION.SDK_INT >= 21) {
+            final Window window = cordova.getActivity().getWindow();
+            if (transparent) {
+                window.getDecorView().setSystemUiVisibility(
+                        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+                                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+                window.setStatusBarColor(Color.TRANSPARENT);
+            }
+            else {
+                window.getDecorView().setSystemUiVisibility(
+                        View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+                                | View.SYSTEM_UI_FLAG_VISIBLE);
+            }
+        }
+    }
+
+    private void setStatusBarStyle(final String style) {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            if (style != null && !style.isEmpty()) {
+                View decorView = cordova.getActivity().getWindow().getDecorView();
+                int uiOptions = decorView.getSystemUiVisibility();
+
+                String[] darkContentStyles = {
+                    "default",
+                };
+
+                String[] lightContentStyles = {
+                    "lightcontent",
+                    "blacktranslucent",
+                    "blackopaque",
+                };
+
+                if (Arrays.asList(darkContentStyles).contains(style.toLowerCase())) {
+                    decorView.setSystemUiVisibility(uiOptions | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+                    return;
+                }
+
+                if (Arrays.asList(lightContentStyles).contains(style.toLowerCase())) {
+                    decorView.setSystemUiVisibility(uiOptions & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+                    return;
+                }
+
+                LOG.e(TAG, "Invalid style, must be either 'default', 'lightcontent' or the deprecated 'blacktranslucent' and 'blackopaque'");
+            }
+        }
+    }
+}

+ 12 - 0
cordova/platforms/android/app/src/main/res/xml/config.xml

@@ -16,6 +16,13 @@
     <feature name="LaunchMyApp">
         <param name="android-package" value="nl.xservices.plugins.LaunchMyApp" />
     </feature>
+    <feature name="AndroidFullScreen">
+        <param name="android-package" value="com.mesmotronic.plugins.FullScreenPlugin" />
+    </feature>
+    <feature name="StatusBar">
+        <param name="android-package" value="org.apache.cordova.statusbar.StatusBar" />
+        <param name="onload" value="true" />
+    </feature>
     <name>美天旺</name>
     <description>
         美天旺是完璧时空旗下新型垂直电商App,专注于新经济下的购物服务!
@@ -39,4 +46,9 @@
     <icon density="xxxhdpi" src="res/android/mipmap-xxxhdpi/ic_launcher.png" />
     <preference name="loglevel" value="DEBUG" />
     <preference name="WECHATAPPID" value="wx1bb4342986c22b28" />
+    <preference name="Fullscreen" value="true" />
+    <preference name="WebViewBounce" value="false" />
+    <preference name="DisallowOverscroll" value="true" />
+    <preference name="CodePushDeploymentKey" value="YOUR-ANDROID-DEPLOYMENT-KEY" />
+    <preference name="CodePushPublicKey" value="YOUR-PUBLIC-KEY" />
 </widget>

+ 218 - 290
cordova/platforms/android/platform_www/cordova_plugins.js

@@ -1,406 +1,334 @@
-cordova.define('cordova/plugin_list', function(require, exports, module) {
+cordova.define("cordova/plugin_list", function(require, exports, module) {
   module.exports = [
     {
-      "id": "cordova-plugin-device.device",
-      "file": "plugins/cordova-plugin-device/www/device.js",
-      "pluginId": "cordova-plugin-device",
-      "clobbers": [
-        "device"
-      ]
+      id: "cordova-plugin-device.device",
+      file: "plugins/cordova-plugin-device/www/device.js",
+      pluginId: "cordova-plugin-device",
+      clobbers: ["device"]
     },
     {
-      "id": "jpush-phonegap-plugin.JPushPlugin",
-      "file": "plugins/jpush-phonegap-plugin/www/JPushPlugin.js",
-      "pluginId": "jpush-phonegap-plugin",
-      "clobbers": [
-        "JPush"
-      ]
+      id: "jpush-phonegap-plugin.JPushPlugin",
+      file: "plugins/jpush-phonegap-plugin/www/JPushPlugin.js",
+      pluginId: "jpush-phonegap-plugin",
+      clobbers: ["JPush"]
     },
     {
-      "id": "cordova-plugin-wechat.Wechat",
-      "file": "plugins/cordova-plugin-wechat/www/wechat.js",
-      "pluginId": "cordova-plugin-wechat",
-      "clobbers": [
-        "Wechat"
-      ]
+      id: "cordova-plugin-wechat.Wechat",
+      file: "plugins/cordova-plugin-wechat/www/wechat.js",
+      pluginId: "cordova-plugin-wechat",
+      clobbers: ["Wechat"]
     },
     {
-      "id": "cordova-plugin-customurlscheme.LaunchMyApp",
-      "file": "plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js",
-      "pluginId": "cordova-plugin-customurlscheme",
-      "clobbers": [
-        "window.plugins.launchmyapp"
-      ]
+      id: "cordova-plugin-customurlscheme.LaunchMyApp",
+      file: "plugins/cordova-plugin-customurlscheme/www/android/LaunchMyApp.js",
+      pluginId: "cordova-plugin-customurlscheme",
+      clobbers: ["window.plugins.launchmyapp"]
     },
     {
-      "id": "cordova-plugin-fullscreen.AndroidFullScreen",
-      "file": "plugins/cordova-plugin-fullscreen/www/AndroidFullScreen.js",
-      "pluginId": "cordova-plugin-fullscreen",
-      "clobbers": [
-        "AndroidFullScreen"
-      ]
+      id: "cordova-plugin-fullscreen.AndroidFullScreen",
+      file: "plugins/cordova-plugin-fullscreen/www/AndroidFullScreen.js",
+      pluginId: "cordova-plugin-fullscreen",
+      clobbers: ["AndroidFullScreen"]
     },
     {
-      "id": "cordova-plugin-statusbar.statusbar",
-      "file": "plugins/cordova-plugin-statusbar/www/statusbar.js",
-      "pluginId": "cordova-plugin-statusbar",
-      "clobbers": [
-        "window.StatusBar"
-      ]
+      id: "cordova-plugin-statusbar.statusbar",
+      file: "plugins/cordova-plugin-statusbar/www/statusbar.js",
+      pluginId: "cordova-plugin-statusbar",
+      clobbers: ["window.StatusBar"]
     },
     {
-      "id": "code-push.AcquisitionManager",
-      "file": "plugins/code-push/script/acquisition-sdk.js",
-      "pluginId": "code-push",
-      "merges": [
-        "window"
-      ]
+      id: "code-push.AcquisitionManager",
+      file: "plugins/code-push/script/acquisition-sdk.js",
+      pluginId: "code-push",
+      merges: ["window"]
     },
     {
-      "id": "cordova-plugin-dialogs.notification",
-      "file": "plugins/cordova-plugin-dialogs/www/notification.js",
-      "pluginId": "cordova-plugin-dialogs",
-      "merges": [
-        "navigator.notification"
-      ]
+      id: "cordova-plugin-dialogs.notification",
+      file: "plugins/cordova-plugin-dialogs/www/notification.js",
+      pluginId: "cordova-plugin-dialogs",
+      merges: ["navigator.notification"]
     },
     {
-      "id": "cordova-plugin-dialogs.notification_android",
-      "file": "plugins/cordova-plugin-dialogs/www/android/notification.js",
-      "pluginId": "cordova-plugin-dialogs",
-      "merges": [
-        "navigator.notification"
-      ]
+      id: "cordova-plugin-dialogs.notification_android",
+      file: "plugins/cordova-plugin-dialogs/www/android/notification.js",
+      pluginId: "cordova-plugin-dialogs",
+      merges: ["navigator.notification"]
     },
     {
-      "id": "cordova-plugin-file.DirectoryEntry",
-      "file": "plugins/cordova-plugin-file/www/DirectoryEntry.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.DirectoryEntry"
-      ]
+      id: "cordova-plugin-file.DirectoryEntry",
+      file: "plugins/cordova-plugin-file/www/DirectoryEntry.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.DirectoryEntry"]
     },
     {
-      "id": "cordova-plugin-file.DirectoryReader",
-      "file": "plugins/cordova-plugin-file/www/DirectoryReader.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.DirectoryReader"
-      ]
+      id: "cordova-plugin-file.DirectoryReader",
+      file: "plugins/cordova-plugin-file/www/DirectoryReader.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.DirectoryReader"]
     },
     {
-      "id": "cordova-plugin-file.Entry",
-      "file": "plugins/cordova-plugin-file/www/Entry.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.Entry"
-      ]
+      id: "cordova-plugin-file.Entry",
+      file: "plugins/cordova-plugin-file/www/Entry.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.Entry"]
     },
     {
-      "id": "cordova-plugin-file.File",
-      "file": "plugins/cordova-plugin-file/www/File.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.File"
-      ]
+      id: "cordova-plugin-file.File",
+      file: "plugins/cordova-plugin-file/www/File.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.File"]
     },
     {
-      "id": "cordova-plugin-file.FileEntry",
-      "file": "plugins/cordova-plugin-file/www/FileEntry.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileEntry"
-      ]
+      id: "cordova-plugin-file.FileEntry",
+      file: "plugins/cordova-plugin-file/www/FileEntry.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileEntry"]
     },
     {
-      "id": "cordova-plugin-file.FileError",
-      "file": "plugins/cordova-plugin-file/www/FileError.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileError"
-      ]
+      id: "cordova-plugin-file.FileError",
+      file: "plugins/cordova-plugin-file/www/FileError.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileError"]
     },
     {
-      "id": "cordova-plugin-file.FileReader",
-      "file": "plugins/cordova-plugin-file/www/FileReader.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileReader"
-      ]
+      id: "cordova-plugin-file.FileReader",
+      file: "plugins/cordova-plugin-file/www/FileReader.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileReader"]
     },
     {
-      "id": "cordova-plugin-file.FileSystem",
-      "file": "plugins/cordova-plugin-file/www/FileSystem.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileSystem"
-      ]
+      id: "cordova-plugin-file.FileSystem",
+      file: "plugins/cordova-plugin-file/www/FileSystem.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileSystem"]
     },
     {
-      "id": "cordova-plugin-file.FileUploadOptions",
-      "file": "plugins/cordova-plugin-file/www/FileUploadOptions.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileUploadOptions"
-      ]
+      id: "cordova-plugin-file.FileUploadOptions",
+      file: "plugins/cordova-plugin-file/www/FileUploadOptions.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileUploadOptions"]
     },
     {
-      "id": "cordova-plugin-file.FileUploadResult",
-      "file": "plugins/cordova-plugin-file/www/FileUploadResult.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileUploadResult"
-      ]
+      id: "cordova-plugin-file.FileUploadResult",
+      file: "plugins/cordova-plugin-file/www/FileUploadResult.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileUploadResult"]
     },
     {
-      "id": "cordova-plugin-file.FileWriter",
-      "file": "plugins/cordova-plugin-file/www/FileWriter.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.FileWriter"
-      ]
+      id: "cordova-plugin-file.FileWriter",
+      file: "plugins/cordova-plugin-file/www/FileWriter.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.FileWriter"]
     },
     {
-      "id": "cordova-plugin-file.Flags",
-      "file": "plugins/cordova-plugin-file/www/Flags.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.Flags"
-      ]
+      id: "cordova-plugin-file.Flags",
+      file: "plugins/cordova-plugin-file/www/Flags.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.Flags"]
     },
     {
-      "id": "cordova-plugin-file.LocalFileSystem",
-      "file": "plugins/cordova-plugin-file/www/LocalFileSystem.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.LocalFileSystem"
-      ],
-      "merges": [
-        "window"
-      ]
+      id: "cordova-plugin-file.LocalFileSystem",
+      file: "plugins/cordova-plugin-file/www/LocalFileSystem.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.LocalFileSystem"],
+      merges: ["window"]
     },
     {
-      "id": "cordova-plugin-file.Metadata",
-      "file": "plugins/cordova-plugin-file/www/Metadata.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.Metadata"
-      ]
+      id: "cordova-plugin-file.Metadata",
+      file: "plugins/cordova-plugin-file/www/Metadata.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.Metadata"]
     },
     {
-      "id": "cordova-plugin-file.ProgressEvent",
-      "file": "plugins/cordova-plugin-file/www/ProgressEvent.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.ProgressEvent"
-      ]
+      id: "cordova-plugin-file.ProgressEvent",
+      file: "plugins/cordova-plugin-file/www/ProgressEvent.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.ProgressEvent"]
     },
     {
-      "id": "cordova-plugin-file.fileSystems",
-      "file": "plugins/cordova-plugin-file/www/fileSystems.js",
-      "pluginId": "cordova-plugin-file"
+      id: "cordova-plugin-file.fileSystems",
+      file: "plugins/cordova-plugin-file/www/fileSystems.js",
+      pluginId: "cordova-plugin-file"
     },
     {
-      "id": "cordova-plugin-file.requestFileSystem",
-      "file": "plugins/cordova-plugin-file/www/requestFileSystem.js",
-      "pluginId": "cordova-plugin-file",
-      "clobbers": [
-        "window.requestFileSystem"
-      ]
+      id: "cordova-plugin-file.requestFileSystem",
+      file: "plugins/cordova-plugin-file/www/requestFileSystem.js",
+      pluginId: "cordova-plugin-file",
+      clobbers: ["window.requestFileSystem"]
     },
     {
-      "id": "cordova-plugin-file.resolveLocalFileSystemURI",
-      "file": "plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js",
-      "pluginId": "cordova-plugin-file",
-      "merges": [
-        "window"
-      ]
+      id: "cordova-plugin-file.resolveLocalFileSystemURI",
+      file: "plugins/cordova-plugin-file/www/resolveLocalFileSystemURI.js",
+      pluginId: "cordova-plugin-file",
+      merges: ["window"]
     },
     {
-      "id": "cordova-plugin-file.isChrome",
-      "file": "plugins/cordova-plugin-file/www/browser/isChrome.js",
-      "pluginId": "cordova-plugin-file",
-      "runs": true
+      id: "cordova-plugin-file.isChrome",
+      file: "plugins/cordova-plugin-file/www/browser/isChrome.js",
+      pluginId: "cordova-plugin-file",
+      runs: true
     },
     {
-      "id": "cordova-plugin-file.androidFileSystem",
-      "file": "plugins/cordova-plugin-file/www/android/FileSystem.js",
-      "pluginId": "cordova-plugin-file",
-      "merges": [
-        "FileSystem"
-      ]
+      id: "cordova-plugin-file.androidFileSystem",
+      file: "plugins/cordova-plugin-file/www/android/FileSystem.js",
+      pluginId: "cordova-plugin-file",
+      merges: ["FileSystem"]
     },
     {
-      "id": "cordova-plugin-file.fileSystems-roots",
-      "file": "plugins/cordova-plugin-file/www/fileSystems-roots.js",
-      "pluginId": "cordova-plugin-file",
-      "runs": true
+      id: "cordova-plugin-file.fileSystems-roots",
+      file: "plugins/cordova-plugin-file/www/fileSystems-roots.js",
+      pluginId: "cordova-plugin-file",
+      runs: true
     },
     {
-      "id": "cordova-plugin-file.fileSystemPaths",
-      "file": "plugins/cordova-plugin-file/www/fileSystemPaths.js",
-      "pluginId": "cordova-plugin-file",
-      "merges": [
-        "cordova"
-      ],
-      "runs": true
+      id: "cordova-plugin-file.fileSystemPaths",
+      file: "plugins/cordova-plugin-file/www/fileSystemPaths.js",
+      pluginId: "cordova-plugin-file",
+      merges: ["cordova"],
+      runs: true
     },
     {
-      "id": "cordova-plugin-advanced-http.cookie-handler",
-      "file": "plugins/cordova-plugin-advanced-http/www/cookie-handler.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.cookie-handler",
+      file: "plugins/cordova-plugin-advanced-http/www/cookie-handler.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.dependency-validator",
-      "file": "plugins/cordova-plugin-advanced-http/www/dependency-validator.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.dependency-validator",
+      file: "plugins/cordova-plugin-advanced-http/www/dependency-validator.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.error-codes",
-      "file": "plugins/cordova-plugin-advanced-http/www/error-codes.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.error-codes",
+      file: "plugins/cordova-plugin-advanced-http/www/error-codes.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.global-configs",
-      "file": "plugins/cordova-plugin-advanced-http/www/global-configs.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.global-configs",
+      file: "plugins/cordova-plugin-advanced-http/www/global-configs.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.helpers",
-      "file": "plugins/cordova-plugin-advanced-http/www/helpers.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.helpers",
+      file: "plugins/cordova-plugin-advanced-http/www/helpers.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.js-util",
-      "file": "plugins/cordova-plugin-advanced-http/www/js-util.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.js-util",
+      file: "plugins/cordova-plugin-advanced-http/www/js-util.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.local-storage-store",
-      "file": "plugins/cordova-plugin-advanced-http/www/local-storage-store.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.local-storage-store",
+      file: "plugins/cordova-plugin-advanced-http/www/local-storage-store.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.lodash",
-      "file": "plugins/cordova-plugin-advanced-http/www/lodash.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.lodash",
+      file: "plugins/cordova-plugin-advanced-http/www/lodash.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.messages",
-      "file": "plugins/cordova-plugin-advanced-http/www/messages.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.messages",
+      file: "plugins/cordova-plugin-advanced-http/www/messages.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.ponyfills",
-      "file": "plugins/cordova-plugin-advanced-http/www/ponyfills.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.ponyfills",
+      file: "plugins/cordova-plugin-advanced-http/www/ponyfills.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.public-interface",
-      "file": "plugins/cordova-plugin-advanced-http/www/public-interface.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.public-interface",
+      file: "plugins/cordova-plugin-advanced-http/www/public-interface.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.tough-cookie",
-      "file": "plugins/cordova-plugin-advanced-http/www/umd-tough-cookie.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.tough-cookie",
+      file: "plugins/cordova-plugin-advanced-http/www/umd-tough-cookie.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.url-util",
-      "file": "plugins/cordova-plugin-advanced-http/www/url-util.js",
-      "pluginId": "cordova-plugin-advanced-http"
+      id: "cordova-plugin-advanced-http.url-util",
+      file: "plugins/cordova-plugin-advanced-http/www/url-util.js",
+      pluginId: "cordova-plugin-advanced-http"
     },
     {
-      "id": "cordova-plugin-advanced-http.http",
-      "file": "plugins/cordova-plugin-advanced-http/www/advanced-http.js",
-      "pluginId": "cordova-plugin-advanced-http",
-      "clobbers": [
-        "cordova.plugin.http"
-      ]
+      id: "cordova-plugin-advanced-http.http",
+      file: "plugins/cordova-plugin-advanced-http/www/advanced-http.js",
+      pluginId: "cordova-plugin-advanced-http",
+      clobbers: ["cordova.plugin.http"]
     },
     {
-      "id": "cordova-plugin-zip.Zip",
-      "file": "plugins/cordova-plugin-zip/zip.js",
-      "pluginId": "cordova-plugin-zip",
-      "clobbers": [
-        "zip"
-      ]
+      id: "cordova-plugin-zip.Zip",
+      file: "plugins/cordova-plugin-zip/zip.js",
+      pluginId: "cordova-plugin-zip",
+      clobbers: ["zip"]
     },
     {
-      "id": "cordova-plugin-code-push.codePush",
-      "file": "plugins/cordova-plugin-code-push/bin/www/codePush.js",
-      "pluginId": "cordova-plugin-code-push",
-      "clobbers": [
-        "codePush"
-      ]
+      id: "cordova-plugin-code-push.codePush",
+      file: "plugins/cordova-plugin-code-push/bin/www/codePush.js",
+      pluginId: "cordova-plugin-code-push",
+      clobbers: ["codePush"]
     },
     {
-      "id": "cordova-plugin-code-push.localPackage",
-      "file": "plugins/cordova-plugin-code-push/bin/www/localPackage.js",
-      "pluginId": "cordova-plugin-code-push",
-      "clobbers": [
-        "LocalPackage"
-      ]
+      id: "cordova-plugin-code-push.localPackage",
+      file: "plugins/cordova-plugin-code-push/bin/www/localPackage.js",
+      pluginId: "cordova-plugin-code-push",
+      clobbers: ["LocalPackage"]
     },
     {
-      "id": "cordova-plugin-code-push.remotePackage",
-      "file": "plugins/cordova-plugin-code-push/bin/www/remotePackage.js",
-      "pluginId": "cordova-plugin-code-push",
-      "clobbers": [
-        "RemotePackage"
-      ]
+      id: "cordova-plugin-code-push.remotePackage",
+      file: "plugins/cordova-plugin-code-push/bin/www/remotePackage.js",
+      pluginId: "cordova-plugin-code-push",
+      clobbers: ["RemotePackage"]
     },
     {
-      "id": "cordova-plugin-code-push.syncStatus",
-      "file": "plugins/cordova-plugin-code-push/bin/www/syncStatus.js",
-      "pluginId": "cordova-plugin-code-push",
-      "clobbers": [
-        "SyncStatus"
-      ]
+      id: "cordova-plugin-code-push.syncStatus",
+      file: "plugins/cordova-plugin-code-push/bin/www/syncStatus.js",
+      pluginId: "cordova-plugin-code-push",
+      clobbers: ["SyncStatus"]
     },
     {
-      "id": "cordova-plugin-code-push.installMode",
-      "file": "plugins/cordova-plugin-code-push/bin/www/installMode.js",
-      "pluginId": "cordova-plugin-code-push",
-      "clobbers": [
-        "InstallMode"
-      ]
+      id: "cordova-plugin-code-push.installMode",
+      file: "plugins/cordova-plugin-code-push/bin/www/installMode.js",
+      pluginId: "cordova-plugin-code-push",
+      clobbers: ["InstallMode"]
     },
     {
-      "id": "cordova-plugin-code-push.codePushUtil",
-      "file": "plugins/cordova-plugin-code-push/bin/www/codePushUtil.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.codePushUtil",
+      file: "plugins/cordova-plugin-code-push/bin/www/codePushUtil.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     },
     {
-      "id": "cordova-plugin-code-push.fileUtil",
-      "file": "plugins/cordova-plugin-code-push/bin/www/fileUtil.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.fileUtil",
+      file: "plugins/cordova-plugin-code-push/bin/www/fileUtil.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     },
     {
-      "id": "cordova-plugin-code-push.httpRequester",
-      "file": "plugins/cordova-plugin-code-push/bin/www/httpRequester.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.httpRequester",
+      file: "plugins/cordova-plugin-code-push/bin/www/httpRequester.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     },
     {
-      "id": "cordova-plugin-code-push.nativeAppInfo",
-      "file": "plugins/cordova-plugin-code-push/bin/www/nativeAppInfo.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.nativeAppInfo",
+      file: "plugins/cordova-plugin-code-push/bin/www/nativeAppInfo.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     },
     {
-      "id": "cordova-plugin-code-push.package",
-      "file": "plugins/cordova-plugin-code-push/bin/www/package.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.package",
+      file: "plugins/cordova-plugin-code-push/bin/www/package.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     },
     {
-      "id": "cordova-plugin-code-push.sdk",
-      "file": "plugins/cordova-plugin-code-push/bin/www/sdk.js",
-      "pluginId": "cordova-plugin-code-push",
-      "runs": true
+      id: "cordova-plugin-code-push.sdk",
+      file: "plugins/cordova-plugin-code-push/bin/www/sdk.js",
+      pluginId: "cordova-plugin-code-push",
+      runs: true
     }
   ];
   module.exports.metadata = {
@@ -419,4 +347,4 @@ cordova.define('cordova/plugin_list', function(require, exports, module) {
     "cordova-plugin-zip": "3.1.0",
     "cordova-plugin-code-push": "1.13.1"
   };
-});
+});

+ 205 - 158
cordova/platforms/android/platform_www/plugins/code-push/script/acquisition-sdk.js

@@ -1,182 +1,229 @@
-cordova.define("code-push.AcquisitionManager", function(require, exports, module) {
-/// <reference path="../definitions/harness.d.ts" />
-var AcquisitionStatus = (function () {
-    function AcquisitionStatus() {
-    }
+cordova.define("code-push.AcquisitionManager", function(
+  require,
+  exports,
+  module
+) {
+  /// <reference path="../definitions/harness.d.ts" />
+  var AcquisitionStatus = (function() {
+    function AcquisitionStatus() {}
     AcquisitionStatus.DeploymentSucceeded = "DeploymentSucceeded";
     AcquisitionStatus.DeploymentFailed = "DeploymentFailed";
     return AcquisitionStatus;
-})();
-exports.AcquisitionStatus = AcquisitionStatus;
-var AcquisitionManager = (function () {
+  })();
+  exports.AcquisitionStatus = AcquisitionStatus;
+  var AcquisitionManager = (function() {
     function AcquisitionManager(httpRequester, configuration) {
-        this._publicPrefixUrl = "v0.1/public/codepush/";
-        this._httpRequester = httpRequester;
-        this._serverUrl = configuration.serverUrl;
-        if (this._serverUrl.slice(-1) !== "/") {
-            this._serverUrl += "/";
-        }
-        this._appVersion = configuration.appVersion;
-        this._clientUniqueId = configuration.clientUniqueId;
-        this._deploymentKey = configuration.deploymentKey;
-        this._ignoreAppVersion = configuration.ignoreAppVersion;
+      this._publicPrefixUrl = "v0.1/public/codepush/";
+      this._httpRequester = httpRequester;
+      this._serverUrl = configuration.serverUrl;
+      if (this._serverUrl.slice(-1) !== "/") {
+        this._serverUrl += "/";
+      }
+      this._appVersion = configuration.appVersion;
+      this._clientUniqueId = configuration.clientUniqueId;
+      this._deploymentKey = configuration.deploymentKey;
+      this._ignoreAppVersion = configuration.ignoreAppVersion;
     }
-    AcquisitionManager.prototype.queryUpdateWithCurrentPackage = function (currentPackage, callback) {
-        var _this = this;
-        if (!currentPackage || !currentPackage.appVersion) {
-            throw new Error("Calling common acquisition SDK with incorrect package"); // Unexpected; indicates error in our implementation
+    AcquisitionManager.prototype.queryUpdateWithCurrentPackage = function(
+      currentPackage,
+      callback
+    ) {
+      var _this = this;
+      if (!currentPackage || !currentPackage.appVersion) {
+        throw new Error(
+          "Calling common acquisition SDK with incorrect package"
+        ); // Unexpected; indicates error in our implementation
+      }
+      var updateRequest = {
+        deployment_key: this._deploymentKey,
+        app_version: currentPackage.appVersion,
+        package_hash: currentPackage.packageHash,
+        is_companion: this._ignoreAppVersion,
+        label: currentPackage.label,
+        client_unique_id: this._clientUniqueId
+      };
+      var requestUrl =
+        this._serverUrl +
+        this._publicPrefixUrl +
+        "update_check?" +
+        queryStringify(updateRequest);
+      this._httpRequester.request(0 /* GET */, requestUrl, function(
+        error,
+        response
+      ) {
+        if (error) {
+          callback(error, null);
+          return;
+        }
+        if (response.statusCode !== 200) {
+          var errorMessage;
+          if (response.statusCode === 0) {
+            errorMessage =
+              "Couldn't send request to " +
+              requestUrl +
+              ", xhr.statusCode = 0 was returned. One of the possible reasons for that might be connection problems. Please, check your internet connection.";
+          } else {
+            errorMessage = response.statusCode + ": " + response.body;
+          }
+          callback(new Error(errorMessage), null);
+          return;
+        }
+        try {
+          var responseObject = JSON.parse(response.body);
+          var updateInfo = responseObject.update_info;
+        } catch (error) {
+          callback(error, null);
+          return;
         }
-        var updateRequest = {
-            deployment_key: this._deploymentKey,
-            app_version: currentPackage.appVersion,
-            package_hash: currentPackage.packageHash,
-            is_companion: this._ignoreAppVersion,
-            label: currentPackage.label,
-            client_unique_id: this._clientUniqueId
+        if (!updateInfo) {
+          callback(error, null);
+          return;
+        } else if (updateInfo.update_app_version) {
+          callback(null, {
+            updateAppVersion: true,
+            appVersion: updateInfo.target_binary_range
+          });
+          return;
+        } else if (!updateInfo.is_available) {
+          callback(null, null);
+          return;
+        }
+        var remotePackage = {
+          deploymentKey: _this._deploymentKey,
+          description: updateInfo.description,
+          label: updateInfo.label,
+          appVersion: updateInfo.target_binary_range,
+          isMandatory: updateInfo.is_mandatory,
+          packageHash: updateInfo.package_hash,
+          packageSize: updateInfo.package_size,
+          downloadUrl: updateInfo.download_url
         };
-        var requestUrl = this._serverUrl + this._publicPrefixUrl + "update_check?" + queryStringify(updateRequest);
-        this._httpRequester.request(0 /* GET */, requestUrl, function (error, response) {
+        callback(null, remotePackage);
+      });
+    };
+    AcquisitionManager.prototype.reportStatusDeploy = function(
+      deployedPackage,
+      status,
+      previousLabelOrAppVersion,
+      previousDeploymentKey,
+      callback
+    ) {
+      var url =
+        this._serverUrl + this._publicPrefixUrl + "report_status/deploy";
+      var body = {
+        app_version: this._appVersion,
+        deployment_key: this._deploymentKey
+      };
+      if (this._clientUniqueId) {
+        body.client_unique_id = this._clientUniqueId;
+      }
+      if (deployedPackage) {
+        body.label = deployedPackage.label;
+        body.app_version = deployedPackage.appVersion;
+        switch (status) {
+          case AcquisitionStatus.DeploymentSucceeded:
+          case AcquisitionStatus.DeploymentFailed:
+            body.status = status;
+            break;
+          default:
+            if (callback) {
+              if (!status) {
+                callback(new Error("Missing status argument."), null);
+              } else {
+                callback(
+                  new Error("Unrecognized status \"" + status + "\"."),
+                  null
+                );
+              }
+            }
+            return;
+        }
+      }
+      if (previousLabelOrAppVersion) {
+        body.previous_label_or_app_version = previousLabelOrAppVersion;
+      }
+      if (previousDeploymentKey) {
+        body.previous_deployment_key = previousDeploymentKey;
+      }
+      callback =
+        typeof arguments[arguments.length - 1] === "function" &&
+        arguments[arguments.length - 1];
+      this._httpRequester.request(
+        2 /* POST */,
+        url,
+        JSON.stringify(body),
+        function(error, response) {
+          if (callback) {
             if (error) {
-                callback(error, null);
-                return;
+              callback(error, null);
+              return;
             }
             if (response.statusCode !== 200) {
-                var errorMessage;
-                if (response.statusCode === 0) {
-                    errorMessage = "Couldn't send request to " + requestUrl + ", xhr.statusCode = 0 was returned. One of the possible reasons for that might be connection problems. Please, check your internet connection.";
-                }
-                else {
-                    errorMessage = response.statusCode + ": " + response.body;
-                }
-                callback(new Error(errorMessage), null);
-                return;
-            }
-            try {
-                var responseObject = JSON.parse(response.body);
-                var updateInfo = responseObject.update_info;
-            }
-            catch (error) {
-                callback(error, null);
-                return;
-            }
-            if (!updateInfo) {
-                callback(error, null);
-                return;
-            }
-            else if (updateInfo.update_app_version) {
-                callback(null, { updateAppVersion: true, appVersion: updateInfo.target_binary_range });
-                return;
-            }
-            else if (!updateInfo.is_available) {
-                callback(null, null);
-                return;
-            }
-            var remotePackage = {
-                deploymentKey: _this._deploymentKey,
-                description: updateInfo.description,
-                label: updateInfo.label,
-                appVersion: updateInfo.target_binary_range,
-                isMandatory: updateInfo.is_mandatory,
-                packageHash: updateInfo.package_hash,
-                packageSize: updateInfo.package_size,
-                downloadUrl: updateInfo.download_url
-            };
-            callback(null, remotePackage);
-        });
-    };
-    AcquisitionManager.prototype.reportStatusDeploy = function (deployedPackage, status, previousLabelOrAppVersion, previousDeploymentKey, callback) {
-        var url = this._serverUrl + this._publicPrefixUrl + "report_status/deploy";
-        var body = {
-            app_version: this._appVersion,
-            deployment_key: this._deploymentKey
-        };
-        if (this._clientUniqueId) {
-            body.client_unique_id = this._clientUniqueId;
-        }
-        if (deployedPackage) {
-            body.label = deployedPackage.label;
-            body.app_version = deployedPackage.appVersion;
-            switch (status) {
-                case AcquisitionStatus.DeploymentSucceeded:
-                case AcquisitionStatus.DeploymentFailed:
-                    body.status = status;
-                    break;
-                default:
-                    if (callback) {
-                        if (!status) {
-                            callback(new Error("Missing status argument."), null);
-                        }
-                        else {
-                            callback(new Error("Unrecognized status \"" + status + "\"."), null);
-                        }
-                    }
-                    return;
+              callback(
+                new Error(response.statusCode + ": " + response.body),
+                null
+              );
+              return;
             }
+            callback(null, null);
+          }
         }
-        if (previousLabelOrAppVersion) {
-            body.previous_label_or_app_version = previousLabelOrAppVersion;
-        }
-        if (previousDeploymentKey) {
-            body.previous_deployment_key = previousDeploymentKey;
-        }
-        callback = typeof arguments[arguments.length - 1] === "function" && arguments[arguments.length - 1];
-        this._httpRequester.request(2 /* POST */, url, JSON.stringify(body), function (error, response) {
-            if (callback) {
-                if (error) {
-                    callback(error, null);
-                    return;
-                }
-                if (response.statusCode !== 200) {
-                    callback(new Error(response.statusCode + ": " + response.body), null);
-                    return;
-                }
-                callback(null, null);
-            }
-        });
+      );
     };
-    AcquisitionManager.prototype.reportStatusDownload = function (downloadedPackage, callback) {
-        var url = this._serverUrl + this._publicPrefixUrl + "report_status/download";
-        var body = {
-            client_unique_id: this._clientUniqueId,
-            deployment_key: this._deploymentKey,
-            label: downloadedPackage.label
-        };
-        this._httpRequester.request(2 /* POST */, url, JSON.stringify(body), function (error, response) {
-            if (callback) {
-                if (error) {
-                    callback(error, null);
-                    return;
-                }
-                if (response.statusCode !== 200) {
-                    callback(new Error(response.statusCode + ": " + response.body), null);
-                    return;
-                }
-                callback(null, null);
+    AcquisitionManager.prototype.reportStatusDownload = function(
+      downloadedPackage,
+      callback
+    ) {
+      var url =
+        this._serverUrl + this._publicPrefixUrl + "report_status/download";
+      var body = {
+        client_unique_id: this._clientUniqueId,
+        deployment_key: this._deploymentKey,
+        label: downloadedPackage.label
+      };
+      this._httpRequester.request(
+        2 /* POST */,
+        url,
+        JSON.stringify(body),
+        function(error, response) {
+          if (callback) {
+            if (error) {
+              callback(error, null);
+              return;
+            }
+            if (response.statusCode !== 200) {
+              callback(
+                new Error(response.statusCode + ": " + response.body),
+                null
+              );
+              return;
             }
-        });
+            callback(null, null);
+          }
+        }
+      );
     };
     return AcquisitionManager;
-})();
-exports.AcquisitionManager = AcquisitionManager;
-function queryStringify(object) {
+  })();
+  exports.AcquisitionManager = AcquisitionManager;
+  function queryStringify(object) {
     var queryString = "";
     var isFirst = true;
     for (var property in object) {
-        if (object.hasOwnProperty(property)) {
-            var value = object[property];
-            if (value !== null && typeof value !== "undefined") {
-                if (!isFirst) {
-                    queryString += "&";
-                }
-                queryString += encodeURIComponent(property) + "=";
-                queryString += encodeURIComponent(value);
-            }
-            isFirst = false;
+      if (object.hasOwnProperty(property)) {
+        var value = object[property];
+        if (value !== null && typeof value !== "undefined") {
+          if (!isFirst) {
+            queryString += "&";
+          }
+          queryString += encodeURIComponent(property) + "=";
+          queryString += encodeURIComponent(value);
         }
+        isFirst = false;
+      }
     }
     return queryString;
-}
-
-//# sourceMappingURL=acquisition-sdk.js.map
+  }
 
+  //# sourceMappingURL=acquisition-sdk.js.map
 });

+ 22 - 17
cordova/platforms/android/platform_www/plugins/cordova-plugin-zip/zip.js

@@ -1,29 +1,34 @@
 cordova.define("cordova-plugin-zip.Zip", function(require, exports, module) {
-var exec = cordova.require('cordova/exec');
+  var exec = cordova.require("cordova/exec");
 
-function newProgressEvent(result) {
+  function newProgressEvent(result) {
     var event = {
-            loaded: result.loaded,
-            total: result.total
+      loaded: result.loaded,
+      total: result.total
     };
     return event;
-}
+  }
 
-exports.unzip = function(fileName, outputDirectory, callback, progressCallback) {
+  exports.unzip = function(
+    fileName,
+    outputDirectory,
+    callback,
+    progressCallback
+  ) {
     var win = function(result) {
-        if (result && typeof result.loaded != "undefined") {
-            if (progressCallback) {
-                return progressCallback(newProgressEvent(result));
-            }
-        } else if (callback) {
-            callback(0);
+      if (result && typeof result.loaded != "undefined") {
+        if (progressCallback) {
+          return progressCallback(newProgressEvent(result));
         }
+      } else if (callback) {
+        callback(0);
+      }
     };
     var fail = function(result) {
-        if (callback) {
-            callback(-1);
-        }
+      if (callback) {
+        callback(-1);
+      }
     };
-    exec(win, fail, 'Zip', 'unzip', [fileName, outputDirectory]);
-};
+    exec(win, fail, "Zip", "unzip", [fileName, outputDirectory]);
+  };
 });

+ 1 - 1
cordova/platforms/android/project.properties

@@ -11,4 +11,4 @@
 target=android-29
 android.library.reference.1=CordovaLib
 android.library.reference.2=app
-cordova.gradle.include.1=cordova-plugin-wechat/twong-android-build.gradle
+cordova.gradle.include.1=cordova-plugin-wechat/twong-android-build.gradle

Файловите разлики са ограничени, защото са твърде много
+ 762 - 694
cordova/platforms/ios/CordovaLib/cordova.js


+ 698 - 0
cordova/platforms/ios/cordova/Api.js

@@ -0,0 +1,698 @@
+/**
+    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.
+*/
+
+/* jslint node: true */
+
+/**
+ * @todo update coho to update this line.
+ * @todo use `package.json` instead but first
+ *  figure out how this fit in with the platform-centered workflow structure.
+ *  This workflow would not have the `package.json` file.
+ */
+// Coho updates this line
+const VERSION = '6.1.1';
+
+const fs = require('fs-extra');
+const path = require('path');
+const unorm = require('unorm');
+const projectFile = require('./lib/projectFile');
+const check_reqs = require('./lib/check_reqs');
+const CordovaError = require('cordova-common').CordovaError;
+const CordovaLogger = require('cordova-common').CordovaLogger;
+const events = require('cordova-common').events;
+const PluginManager = require('cordova-common').PluginManager;
+const util = require('util');
+const xcode = require('xcode');
+const ConfigParser = require('cordova-common').ConfigParser;
+
+function setupEvents (externalEventEmitter) {
+    if (externalEventEmitter) {
+        // This will make the platform internal events visible outside
+        events.forwardEventsTo(externalEventEmitter);
+    } else {
+        // There is no logger if external emitter is not present,
+        // so attach a console logger
+        CordovaLogger.get().subscribe(events);
+    }
+}
+
+function getVariableSpec (spec, options) {
+    return spec.includes('$') ? options.cli_variables[spec.replace('$', '')] : spec;
+}
+
+/**
+ * Creates a new PlatformApi instance.
+ *
+ * @param  {String}  [platform] Platform name, used for backward compatibility
+ *   w/ PlatformPoly (CordovaLib).
+ * @param  {String}  [platformRootDir] Platform root location, used for backward
+ *   compatibility w/ PlatformPoly (CordovaLib).
+ * @param {EventEmitter} [events] An EventEmitter instance that will be used for
+ *   logging purposes. If no EventEmitter provided, all events will be logged to
+ *   console
+ */
+function Api (platform, platformRootDir, events) {
+    // 'platform' property is required as per PlatformApi spec
+    this.platform = platform || 'ios';
+    this.root = platformRootDir || path.resolve(__dirname, '..');
+
+    setupEvents(events);
+
+    let xcodeProjDir;
+    let xcodeCordovaProj;
+
+    try {
+        const xcodeProjDir_array = fs.readdirSync(this.root).filter(e => e.match(/\.xcodeproj$/i));
+        if (xcodeProjDir_array.length > 1) {
+            for (let x = 0; x < xcodeProjDir_array.length; x++) {
+                if (xcodeProjDir_array[x].substring(0, 2) === '._') {
+                    xcodeProjDir_array.splice(x, 1);
+                }
+            }
+        }
+        xcodeProjDir = xcodeProjDir_array[0];
+
+        if (!xcodeProjDir) {
+            throw new CordovaError(`The provided path "${this.root}" is not a Cordova iOS project.`);
+        }
+
+        const cordovaProjName = xcodeProjDir.substring(xcodeProjDir.lastIndexOf(path.sep) + 1, xcodeProjDir.indexOf('.xcodeproj'));
+        xcodeCordovaProj = path.join(this.root, cordovaProjName);
+    } catch (e) {
+        throw new CordovaError(`The provided path "${this.root}" is not a Cordova iOS project.`);
+    }
+
+    this.locations = {
+        root: this.root,
+        www: path.join(this.root, 'www'),
+        platformWww: path.join(this.root, 'platform_www'),
+        configXml: path.join(xcodeCordovaProj, 'config.xml'),
+        defaultConfigXml: path.join(this.root, 'cordova/defaults.xml'),
+        pbxproj: path.join(this.root, xcodeProjDir, 'project.pbxproj'),
+        xcodeProjDir: path.join(this.root, xcodeProjDir),
+        xcodeCordovaProj
+    };
+}
+
+/**
+ * Creates platform in a specified directory.
+ *
+ * @param  {String}  destination Destination directory, where install platform to
+ * @param  {ConfigParser}  [config] ConfigParser instance, used to retrieve
+ *   project creation options, such as package id and project name.
+ * @param  {Object}  [options]  An options object. The most common options are:
+ * @param  {String}  [options.customTemplate]  A path to custom template, that
+ *   should override the default one from platform.
+ * @param  {Boolean}  [options.link]  Flag that indicates that platform's
+ *   sources will be linked to installed platform instead of copying.
+ * @param {EventEmitter} [events] An EventEmitter instance that will be used for
+ *   logging purposes. If no EventEmitter provided, all events will be logged to
+ *   console
+ *
+ * @return {Promise<PlatformApi>} Promise either fulfilled with PlatformApi
+ *   instance or rejected with CordovaError.
+ */
+Api.createPlatform = (destination, config, options, events) => {
+    setupEvents(events);
+
+    // CB-6992 it is necessary to normalize characters
+    // because node and shell scripts handles unicode symbols differently
+    // We need to normalize the name to NFD form since iOS uses NFD unicode form
+    const name = unorm.nfd(config.name());
+    let result;
+    try {
+        result = require('../../../lib/create')
+            .createProject(destination, config.getAttribute('ios-CFBundleIdentifier') || config.packageName(), name, options, config)
+            .then(() => {
+                // after platform is created we return Api instance based on new Api.js location
+                // This is required to correctly resolve paths in the future api calls
+                const PlatformApi = require(path.resolve(destination, 'cordova/Api'));
+                return new PlatformApi('ios', destination, events);
+            });
+    } catch (e) {
+        events.emit('error', 'createPlatform is not callable from the iOS project API.');
+        throw e;
+    }
+    return result;
+};
+
+/**
+ * Updates already installed platform.
+ *
+ * @param  {String}  destination Destination directory, where platform installed
+ * @param  {Object}  [options]  An options object. The most common options are:
+ * @param  {String}  [options.customTemplate]  A path to custom template, that
+ *   should override the default one from platform.
+ * @param  {Boolean}  [options.link]  Flag that indicates that platform's
+ *   sources will be linked to installed platform instead of copying.
+ * @param {EventEmitter} [events] An EventEmitter instance that will be used for
+ *   logging purposes. If no EventEmitter provided, all events will be logged to
+ *   console
+ *
+ * @return {Promise<PlatformApi>} Promise either fulfilled with PlatformApi
+ *   instance or rejected with CordovaError.
+ */
+Api.updatePlatform = (destination, options, events) => {
+    setupEvents(events);
+
+    let result;
+    try {
+        result = require('../../../lib/create')
+            .updateProject(destination, options)
+            .then(() => {
+                const PlatformApi = require(path.resolve(destination, 'cordova/Api'));
+                return new PlatformApi('ios', destination, events);
+            });
+    } catch (e) {
+        events.emit('error', 'updatePlatform is not callable from the iOS project API, you will need to do this manually.');
+        throw e;
+    }
+    return result;
+};
+
+/**
+ * Gets a CordovaPlatform object, that represents the platform structure.
+ *
+ * @return  {CordovaPlatform}  A structure that contains the description of
+ *   platform's file structure and other properties of platform.
+ */
+Api.prototype.getPlatformInfo = function () {
+    const result = {};
+    result.locations = this.locations;
+    result.root = this.root;
+    result.name = this.platform;
+    result.version = Api.version();
+    result.projectConfig = new ConfigParser(this.locations.configXml);
+
+    return result;
+};
+
+/**
+ * Updates installed platform with provided www assets and new app
+ *   configuration. This method is required for CLI workflow and will be called
+ *   each time before build, so the changes, made to app configuration and www
+ *   code, will be applied to platform.
+ *
+ * @param {CordovaProject} cordovaProject A CordovaProject instance, that defines a
+ *   project structure and configuration, that should be applied to platform
+ *   (contains project's www location and ConfigParser instance for project's
+ *   config).
+ *
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
+ *   CordovaError instance.
+ */
+Api.prototype.prepare = function (cordovaProject) {
+    cordovaProject.projectConfig = new ConfigParser(cordovaProject.locations.rootConfigXml || cordovaProject.projectConfig.path);
+
+    return require('./lib/prepare').prepare.call(this, cordovaProject);
+};
+
+/**
+ * Installs a new plugin into platform. It doesn't resolves plugin dependencies.
+ *
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
+ *   that will be installed.
+ * @param  {Object}  installOptions  An options object. Possible options below:
+ * @param  {Boolean}  installOptions.link: Flag that specifies that plugin
+ *   sources will be symlinked to app's directory instead of copying (if
+ *   possible).
+ * @param  {Object}  installOptions.variables  An object that represents
+ *   variables that will be used to install plugin. See more details on plugin
+ *   variables in documentation:
+ *   https://cordova.apache.org/docs/en/4.0.0/plugin_ref_spec.md.html
+ *
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
+ *   CordovaError instance.
+ */
+Api.prototype.addPlugin = function (plugin, installOptions) {
+    const xcodeproj = projectFile.parse(this.locations);
+
+    installOptions = installOptions || {};
+    installOptions.variables = installOptions.variables || {};
+    // Add PACKAGE_NAME variable into vars
+    if (!installOptions.variables.PACKAGE_NAME) {
+        installOptions.variables.PACKAGE_NAME = xcodeproj.getPackageName();
+    }
+
+    return PluginManager.get(this.platform, this.locations, xcodeproj)
+        .addPlugin(plugin, installOptions)
+        .then(() => {
+            if (plugin != null) {
+                const headerTags = plugin.getHeaderFiles(this.platform);
+                const bridgingHeaders = headerTags.filter(obj => obj.type === 'BridgingHeader');
+                if (bridgingHeaders.length > 0) {
+                    const project_dir = this.locations.root;
+                    const project_name = this.locations.xcodeCordovaProj.split('/').pop();
+                    const BridgingHeader = require('./lib/BridgingHeader').BridgingHeader;
+                    const bridgingHeaderFile = new BridgingHeader(path.join(project_dir, project_name, 'Bridging-Header.h'));
+                    events.emit('verbose', 'Adding Bridging-Headers since the plugin contained <header-file> with type="BridgingHeader"');
+                    bridgingHeaders.forEach(obj => {
+                        const bridgingHeaderPath = path.basename(obj.src);
+                        bridgingHeaderFile.addHeader(plugin.id, bridgingHeaderPath);
+                    });
+                    bridgingHeaderFile.write();
+                }
+            }
+        })
+        .then(() => {
+            if (plugin != null) {
+                const podSpecs = plugin.getPodSpecs ? plugin.getPodSpecs(this.platform) : [];
+                const frameworkTags = plugin.getFrameworks(this.platform);
+                const frameworkPods = frameworkTags.filter(obj => obj.type === 'podspec');
+                return this.addPodSpecs(plugin, podSpecs, frameworkPods, installOptions);
+            }
+        })
+        // CB-11022 Return truthy value to prevent running prepare after
+        .then(() => true);
+};
+
+/**
+ * Removes an installed plugin from platform.
+ *
+ * Since method accepts PluginInfo instance as input parameter instead of plugin
+ *   id, caller shoud take care of managing/storing PluginInfo instances for
+ *   future uninstalls.
+ *
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
+ *   that will be installed.
+ *
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
+ *   CordovaError instance.
+ */
+Api.prototype.removePlugin = function (plugin, uninstallOptions) {
+    const xcodeproj = projectFile.parse(this.locations);
+
+    return PluginManager.get(this.platform, this.locations, xcodeproj)
+        .removePlugin(plugin, uninstallOptions)
+        .then(() => {
+            if (plugin != null) {
+                const headerTags = plugin.getHeaderFiles(this.platform);
+                const bridgingHeaders = headerTags.filter(obj => obj.type === 'BridgingHeader');
+                if (bridgingHeaders.length > 0) {
+                    const project_dir = this.locations.root;
+                    const project_name = this.locations.xcodeCordovaProj.split('/').pop();
+                    const BridgingHeader = require('./lib/BridgingHeader').BridgingHeader;
+                    const bridgingHeaderFile = new BridgingHeader(path.join(project_dir, project_name, 'Bridging-Header.h'));
+                    events.emit('verbose', 'Removing Bridging-Headers since the plugin contained <header-file> with type="BridgingHeader"');
+                    bridgingHeaders.forEach(obj => {
+                        const bridgingHeaderPath = path.basename(obj.src);
+                        bridgingHeaderFile.removeHeader(plugin.id, bridgingHeaderPath);
+                    });
+                    bridgingHeaderFile.write();
+                }
+            }
+        })
+        .then(() => {
+            if (plugin != null) {
+                const podSpecs = plugin.getPodSpecs ? plugin.getPodSpecs(this.platform) : [];
+                const frameworkTags = plugin.getFrameworks(this.platform);
+                const frameworkPods = frameworkTags.filter(obj => obj.type === 'podspec');
+                return this.removePodSpecs(plugin, podSpecs, frameworkPods, uninstallOptions);
+            }
+        })
+        // CB-11022 Return truthy value to prevent running prepare after
+        .then(() => true);
+};
+
+/**
+ * adding CocoaPods libraries
+ *
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
+ *   that will be installed.
+ * @param  {Object}  podSpecs: the return value of plugin.getPodSpecs(this.platform)
+ * @param  {Object}  frameworkPods: framework tags object with type === 'podspec'
+ * @return  {Promise}  Return a promise
+ */
+
+Api.prototype.addPodSpecs = function (plugin, podSpecs, frameworkPods, installOptions) {
+    const project_dir = this.locations.root;
+    const project_name = this.locations.xcodeCordovaProj.split('/').pop();
+    const minDeploymentTarget = this.getPlatformInfo().projectConfig.getPreference('deployment-target', 'ios');
+
+    const Podfile = require('./lib/Podfile').Podfile;
+    const PodsJson = require('./lib/PodsJson').PodsJson;
+    const podsjsonFile = new PodsJson(path.join(project_dir, PodsJson.FILENAME));
+    const podfileFile = new Podfile(path.join(project_dir, Podfile.FILENAME), project_name, minDeploymentTarget);
+
+    if (podSpecs.length) {
+        events.emit('verbose', 'Adding pods since the plugin contained <podspecs>');
+        podSpecs.forEach(obj => {
+            // declarations
+            Object.keys(obj.declarations).forEach(key => {
+                if (obj.declarations[key] === 'true') {
+                    const declaration = Podfile.proofDeclaration(key);
+                    const podJson = {
+                        declaration
+                    };
+                    const val = podsjsonFile.getDeclaration(declaration);
+                    if (val) {
+                        podsjsonFile.incrementDeclaration(declaration);
+                    } else {
+                        podJson.count = 1;
+                        podsjsonFile.setJsonDeclaration(declaration, podJson);
+                        podfileFile.addDeclaration(podJson.declaration);
+                    }
+                }
+            });
+            // sources
+            Object.keys(obj.sources).forEach(key => {
+                const podJson = {
+                    source: obj.sources[key].source
+                };
+                const val = podsjsonFile.getSource(key);
+                if (val) {
+                    podsjsonFile.incrementSource(key);
+                } else {
+                    podJson.count = 1;
+                    podsjsonFile.setJsonSource(key, podJson);
+                    podfileFile.addSource(podJson.source);
+                }
+            });
+            // libraries
+            Object.keys(obj.libraries).forEach(key => {
+                const podJson = Object.assign({}, obj.libraries[key]);
+                if (podJson.spec) {
+                    podJson.spec = getVariableSpec(podJson.spec, installOptions);
+                }
+                const val = podsjsonFile.getLibrary(key);
+                if (val) {
+                    events.emit('warn', `${plugin.id} depends on ${podJson.name}, which may conflict with another plugin. ${podJson.name}@${val.spec} is already installed and was not overwritten.`);
+                    podsjsonFile.incrementLibrary(key);
+                } else {
+                    podJson.count = 1;
+                    podsjsonFile.setJsonLibrary(key, podJson);
+                    podfileFile.addSpec(podJson.name, podJson);
+                }
+            });
+        });
+    }
+
+    if (frameworkPods.length) {
+        events.emit('warn', '"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.');
+        events.emit('verbose', 'Adding pods since the plugin contained <framework>(s) with type="podspec"');
+        frameworkPods.forEach(obj => {
+            const spec = getVariableSpec(obj.spec, installOptions);
+            const podJson = {
+                name: obj.src,
+                type: obj.type,
+                spec
+            };
+
+            const val = podsjsonFile.getLibrary(podJson.name);
+            if (val) { // found
+                if (podJson.spec !== val.spec) { // exists, different spec, print warning
+                    events.emit('warn', `${plugin.id} depends on ${podJson.name}@${podJson.spec}, which conflicts with another plugin. ${podJson.name}@${val.spec} is already installed and was not overwritten.`);
+                }
+                // increment count, but don't add in Podfile because it already exists
+                podsjsonFile.incrementLibrary(podJson.name);
+            } else { // not found, write new
+                podJson.count = 1;
+                podsjsonFile.setJsonLibrary(podJson.name, podJson);
+                // add to Podfile
+                podfileFile.addSpec(podJson.name, podJson.spec);
+            }
+        });
+    }
+
+    if (podSpecs.length > 0 || frameworkPods.length > 0) {
+        // now that all the pods have been processed, write to pods.json
+        podsjsonFile.write();
+
+        // only write and pod install if the Podfile changed
+        if (podfileFile.isDirty()) {
+            podfileFile.write();
+            events.emit('verbose', 'Running `pod install` (to install plugins)');
+            projectFile.purgeProjectFileCache(this.locations.root);
+
+            return podfileFile.install(check_reqs.check_cocoapods)
+                .then(() => this.setSwiftVersionForCocoaPodsLibraries(podsjsonFile));
+        } else {
+            events.emit('verbose', 'Podfile unchanged, skipping `pod install`');
+        }
+    }
+    return Promise.resolve();
+};
+
+/**
+ * removing CocoaPods libraries
+ *
+ * @param  {PluginInfo}  plugin  A PluginInfo instance that represents plugin
+ *   that will be installed.
+ * @param  {Object}  podSpecs: the return value of plugin.getPodSpecs(this.platform)
+ * @param  {Object}  frameworkPods: framework tags object with type === 'podspec'
+ * @return  {Promise}  Return a promise
+ */
+
+Api.prototype.removePodSpecs = function (plugin, podSpecs, frameworkPods, uninstallOptions) {
+    const project_dir = this.locations.root;
+    const project_name = this.locations.xcodeCordovaProj.split('/').pop();
+
+    const Podfile = require('./lib/Podfile').Podfile;
+    const PodsJson = require('./lib/PodsJson').PodsJson;
+    const podsjsonFile = new PodsJson(path.join(project_dir, PodsJson.FILENAME));
+    const podfileFile = new Podfile(path.join(project_dir, Podfile.FILENAME), project_name);
+
+    if (podSpecs.length) {
+        events.emit('verbose', 'Adding pods since the plugin contained <podspecs>');
+        podSpecs.forEach(obj => {
+            // declarations
+            Object.keys(obj.declarations).forEach(key => {
+                if (obj.declarations[key] === 'true') {
+                    const declaration = Podfile.proofDeclaration(key);
+                    const podJson = {
+                        declaration
+                    };
+                    const val = podsjsonFile.getDeclaration(declaration);
+                    if (val) {
+                        podsjsonFile.decrementDeclaration(declaration);
+                    } else {
+                        const message = util.format('plugin \"%s\" declaration \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.declaration); /* eslint no-useless-escape : 0 */
+                        events.emit('verbose', message);
+                    }
+                    if (!val || val.count === 0) {
+                        podfileFile.removeDeclaration(podJson.declaration);
+                    }
+                }
+            });
+            // sources
+            Object.keys(obj.sources).forEach(key => {
+                const podJson = {
+                    source: obj.sources[key].source
+                };
+                const val = podsjsonFile.getSource(key);
+                if (val) {
+                    podsjsonFile.decrementSource(key);
+                } else {
+                    const message = util.format('plugin \"%s\" source \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.source); /* eslint no-useless-escape : 0 */
+                    events.emit('verbose', message);
+                }
+                if (!val || val.count === 0) {
+                    podfileFile.removeSource(podJson.source);
+                }
+            });
+            // libraries
+            Object.keys(obj.libraries).forEach(key => {
+                const podJson = Object.assign({}, obj.libraries[key]);
+                if (podJson.spec) {
+                    podJson.spec = getVariableSpec(podJson.spec, uninstallOptions);
+                }
+                const val = podsjsonFile.getLibrary(key);
+                if (val) {
+                    podsjsonFile.decrementLibrary(key);
+                } else {
+                    const message = util.format('plugin \"%s\" podspec \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.name); /* eslint no-useless-escape : 0 */
+                    events.emit('verbose', message);
+                }
+                if (!val || val.count === 0) {
+                    podfileFile.removeSpec(podJson.name);
+                }
+            });
+        });
+    }
+
+    if (frameworkPods.length) {
+        events.emit('warn', '"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.');
+        events.emit('verbose', 'Adding pods since the plugin contained <framework>(s) with type=\"podspec\"'); /* eslint no-useless-escape : 0 */
+        frameworkPods.forEach(obj => {
+            const spec = getVariableSpec(obj.spec, uninstallOptions);
+            const podJson = {
+                name: obj.src,
+                type: obj.type,
+                spec
+            };
+
+            const val = podsjsonFile.getLibrary(podJson.name);
+            if (val) { // found, decrement count
+                podsjsonFile.decrementLibrary(podJson.name);
+            } else { // not found (perhaps a sync error)
+                const message = util.format('plugin \"%s\" podspec \"%s\" does not seem to be in pods.json, nothing to remove. Will attempt to remove from Podfile.', plugin.id, podJson.name); /* eslint no-useless-escape : 0 */
+                events.emit('verbose', message);
+            }
+
+            // always remove from the Podfile
+            podfileFile.removeSpec(podJson.name);
+        });
+    }
+
+    if (podSpecs.length > 0 || frameworkPods.length > 0) {
+        // now that all the pods have been processed, write to pods.json
+        podsjsonFile.write();
+
+        if (podfileFile.isDirty()) {
+            podfileFile.write();
+            events.emit('verbose', 'Running `pod install` (to uninstall pods)');
+
+            return podfileFile.install(check_reqs.check_cocoapods)
+                .then(() => this.setSwiftVersionForCocoaPodsLibraries(podsjsonFile));
+        } else {
+            events.emit('verbose', 'Podfile unchanged, skipping `pod install`');
+        }
+    }
+    return Promise.resolve();
+};
+
+/**
+ * set Swift Version for all CocoaPods libraries
+ *
+ * @param  {PodsJson}  podsjsonFile  A PodsJson instance that represents pods.json
+ */
+
+Api.prototype.setSwiftVersionForCocoaPodsLibraries = function (podsjsonFile) {
+    let __dirty = false;
+    return check_reqs.check_cocoapods().then(toolOptions => {
+        if (toolOptions.ignore) {
+            events.emit('verbose', '=== skip Swift Version Settings For Cocoapods Libraries');
+        } else {
+            const podPbxPath = path.join(this.root, 'Pods', 'Pods.xcodeproj', 'project.pbxproj');
+            const podXcodeproj = xcode.project(podPbxPath);
+            podXcodeproj.parseSync();
+            const podTargets = podXcodeproj.pbxNativeTargetSection();
+            const podConfigurationList = podXcodeproj.pbxXCConfigurationList();
+            const podConfigs = podXcodeproj.pbxXCBuildConfigurationSection();
+
+            const libraries = podsjsonFile.getLibraries();
+            Object.keys(libraries).forEach(key => {
+                const podJson = libraries[key];
+                const name = podJson.name;
+                const swiftVersion = podJson['swift-version'];
+                if (swiftVersion) {
+                    __dirty = true;
+                    Object.keys(podTargets)
+                        .filter(targetKey => podTargets[targetKey].productName === name)
+                        .map(targetKey => podTargets[targetKey].buildConfigurationList)
+                        .map(buildConfigurationListId => podConfigurationList[buildConfigurationListId])
+                        .map(buildConfigurationList => buildConfigurationList.buildConfigurations)
+                        .reduce((acc, buildConfigurations) => acc.concat(buildConfigurations), [])
+                        .map(buildConfiguration => buildConfiguration.value)
+                        .forEach(buildId => {
+                            __dirty = true;
+                            podConfigs[buildId].buildSettings.SWIFT_VERSION = swiftVersion;
+                        });
+                }
+            });
+            if (__dirty) {
+                fs.writeFileSync(podPbxPath, podXcodeproj.writeSync(), 'utf-8');
+            }
+        }
+    });
+};
+
+/**
+ * Builds an application package for current platform.
+ *
+ * @param  {Object}  buildOptions  A build options. This object's structure is
+ *   highly depends on platform's specific. The most common options are:
+ * @param  {Boolean}  buildOptions.debug  Indicates that packages should be
+ *   built with debug configuration. This is set to true by default unless the
+ *   'release' option is not specified.
+ * @param  {Boolean}  buildOptions.release  Indicates that packages should be
+ *   built with release configuration. If not set to true, debug configuration
+ *   will be used.
+ * @param   {Boolean}  buildOptions.device  Specifies that built app is intended
+ *   to run on device
+ * @param   {Boolean}  buildOptions.emulator: Specifies that built app is
+ *   intended to run on emulator
+ * @param   {String}  buildOptions.target  Specifies the device id that will be
+ *   used to run built application.
+ * @param   {Boolean}  buildOptions.nobuild  Indicates that this should be a
+ *   dry-run call, so no build artifacts will be produced.
+ * @param   {String[]}  buildOptions.archs  Specifies chip architectures which
+ *   app packages should be built for. List of valid architectures is depends on
+ *   platform.
+ * @param   {String}  buildOptions.buildConfig  The path to build configuration
+ *   file. The format of this file is depends on platform.
+ * @param   {String[]} buildOptions.argv Raw array of command-line arguments,
+ *   passed to `build` command. The purpose of this property is to pass a
+ *   platform-specific arguments, and eventually let platform define own
+ *   arguments processing logic.
+ *
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
+ *   CordovaError instance.
+ */
+Api.prototype.build = function (buildOptions) {
+    return check_reqs.run()
+        .then(() => require('./lib/build').run.call(this, buildOptions));
+};
+
+/**
+ * Builds an application package for current platform and runs it on
+ *   specified/default device. If no 'device'/'emulator'/'target' options are
+ *   specified, then tries to run app on default device if connected, otherwise
+ *   runs the app on emulator.
+ *
+ * @param   {Object}  runOptions  An options object. The structure is the same
+ *   as for build options.
+ *
+ * @return {Promise} A promise either fulfilled if package was built and ran
+ *   successfully, or rejected with CordovaError.
+ */
+Api.prototype.run = function (runOptions) {
+    return check_reqs.run()
+        .then(() => require('./lib/run').run.call(this, runOptions));
+};
+
+/**
+ * Cleans out the build artifacts from platform's directory.
+ *
+ * @return  {Promise}  Return a promise either fulfilled, or rejected with
+ *   CordovaError.
+ */
+Api.prototype.clean = function (cleanOptions) {
+    return check_reqs.run()
+        .then(() => require('./lib/clean').run.call(this, cleanOptions))
+        .then(() => require('./lib/prepare').clean.call(this, cleanOptions));
+};
+
+/**
+ * Performs a requirements check for current platform. Each platform defines its
+ *   own set of requirements, which should be resolved before platform can be
+ *   built successfully.
+ *
+ * @return  {Promise<Requirement[]>}  Promise, resolved with set of Requirement
+ *   objects for current platform.
+ */
+Api.prototype.requirements = function () {
+    return check_reqs.check_all();
+};
+
+Api.version = function () {
+    return VERSION;
+};
+
+module.exports = Api;

+ 27 - 0
cordova/platforms/ios/cordova/apple_ios_version

@@ -0,0 +1,27 @@
+#!/usr/bin/env node
+
+/*
+    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.
+*/
+
+var versions = require('./lib/versions.js');
+
+versions.get_apple_ios_version().catch(err => {
+    console.log(err);
+    process.exit(2);
+});

+ 27 - 0
cordova/platforms/ios/cordova/apple_osx_version

@@ -0,0 +1,27 @@
+#!/usr/bin/env node
+
+/*
+    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.
+*/
+
+var versions = require('./lib/versions.js');
+
+versions.get_apple_osx_version().catch(err => {
+    console.log(err);
+    process.exit(2);
+});

+ 32 - 0
cordova/platforms/ios/cordova/apple_xcode_version

@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+/*
+    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.
+*/
+
+var versions = require('./lib/versions.js');
+
+versions.get_apple_xcode_version().then(
+    version => {
+        console.log(version);
+    },
+    err => {
+        console.error(err);
+        process.exit(2);
+    }
+);

+ 66 - 0
cordova/platforms/ios/cordova/build

@@ -0,0 +1,66 @@
+#!/usr/bin/env node
+
+/*
+       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.
+*/
+
+var args = process.argv;
+var Api = require('./Api');
+var nopt = require('nopt');
+
+// Support basic help commands
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) {
+    require('./lib/build').help();
+    process.exit(0);
+}
+
+// Parse arguments
+var buildOpts = nopt({
+    verbose: Boolean,
+    silent: Boolean,
+    archs: String,
+    debug: Boolean,
+    release: Boolean,
+    device: Boolean,
+    emulator: Boolean,
+    codeSignIdentity: String,
+    codeSignResourceRules: String,
+    provisioningProfile: String,
+    automaticProvisioning: Boolean,
+    developmentTeam: String,
+    packageType: String,
+    buildConfig: String,
+    buildFlag: [String, Array],
+    noSign: Boolean
+}, { '-r': '--release', d: '--verbose' }, args);
+
+// Make buildOptions compatible with PlatformApi build method spec
+buildOpts.argv = buildOpts.argv.remain;
+
+require('./loggingHelper').adjustLoggerLevel(buildOpts);
+
+new Api().build(buildOpts).then(
+    () => {
+        console.log('** BUILD SUCCEEDED **');
+    },
+    err => {
+        var errorMessage = (err && err.stack) ? err.stack : err;
+        console.error(errorMessage);
+        process.exit(2);
+    }
+);

+ 32 - 0
cordova/platforms/ios/cordova/build-debug.xcconfig

@@ -0,0 +1,32 @@
+//
+// 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.
+//
+
+//
+// XCode Build settings for "Debug" Build Configuration.
+//
+
+#include "build.xcconfig"
+
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) DEBUG=1
+
+#include "build-extras.xcconfig"
+
+// (CB-11792)
+// @COCOAPODS_SILENCE_WARNINGS@ //
+#include "../pods-debug.xcconfig"

+ 0 - 0
cordova/platforms/ios/cordova/build-extras.xcconfig


+ 33 - 0
cordova/platforms/ios/cordova/build-release.xcconfig

@@ -0,0 +1,33 @@
+//
+// 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.
+//
+
+//
+// XCode Build settings for "Release" Build Configuration.
+//
+
+#include "build.xcconfig"
+
+CODE_SIGN_IDENTITY = iPhone Distribution
+CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution
+
+#include "build-extras.xcconfig"
+
+// (CB-11792)
+// @COCOAPODS_SILENCE_WARNINGS@ //
+#include "../pods-release.xcconfig"

+ 19 - 0
cordova/platforms/ios/cordova/build.bat

@@ -0,0 +1,19 @@
+:: 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
+
+@ECHO OFF
+ECHO WARN: The 'build' command is not available for cordova-ios on windows machines.>&2

+ 45 - 0
cordova/platforms/ios/cordova/build.xcconfig

@@ -0,0 +1,45 @@
+//
+// 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.
+//
+
+//
+// XCode build settings shared by all Build Configurations.
+// Settings are overridden by configuration-level .xcconfig file (build-release/build-debug).
+//
+
+HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
+OTHER_LDFLAGS = -ObjC
+
+// Type of signing identity used for codesigning, resolves to first match of given type.
+// "iPhone Developer": Development builds (default, local only; iOS Development certificate) or "iPhone Distribution": Distribution builds (Adhoc/In-House/AppStore; iOS Distribution certificate)
+CODE_SIGN_IDENTITY = iPhone Developer
+CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
+
+// (CB-9721) Set ENABLE_BITCODE to NO in build.xcconfig
+ENABLE_BITCODE = NO
+
+// (CB-9719) Set CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES to YES in build.xcconfig
+CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
+
+// (CB-10072)
+SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
+
+// (CB-11854)
+CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
+
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) WK_WEB_VIEW_ONLY=$(WK_WEB_VIEW_ONLY)

+ 32 - 0
cordova/platforms/ios/cordova/check_reqs

@@ -0,0 +1,32 @@
+#!/usr/bin/env node
+
+/*
+       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.
+*/
+
+var check_reqs = require('./lib/check_reqs');
+
+// check for help flag
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) > -1) {
+    console.log('Usage: check_reqs or node check_reqs');
+} else {
+    check_reqs.run().catch(err => {
+        console.error('Failed to check requirements due to ' + err);
+        process.exit(2);
+    });
+}

+ 25 - 0
cordova/platforms/ios/cordova/check_reqs.bat

@@ -0,0 +1,25 @@
+:: 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
+@ECHO OFF
+SET script_path="%~dp0check_reqs"
+IF EXIST %script_path% (
+        node "%script_path%" %*
+) ELSE (
+    ECHO.
+    ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2
+    EXIT /B 1
+)

+ 52 - 0
cordova/platforms/ios/cordova/clean

@@ -0,0 +1,52 @@
+#!/usr/bin/env node
+
+/*
+       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.
+*/
+
+var Api = require('./Api');
+var nopt = require('nopt');
+
+if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) {
+    console.log('Cleans the project directory.');
+    process.exit(0);
+}
+
+// Do some basic argument parsing
+var opts = nopt({
+    verbose: Boolean,
+    silent: Boolean
+}, { d: '--verbose' });
+
+// Make buildOptions compatible with PlatformApi clean method spec
+opts.argv = opts.argv.original;
+
+// Skip cleaning prepared files when not invoking via cordova CLI.
+opts.noPrepare = true;
+
+require('./loggingHelper').adjustLoggerLevel(opts);
+
+new Api().clean(opts).then(
+    () => {
+        console.log('** CLEAN SUCCEEDED **');
+    },
+    err => {
+        console.error(err);
+        process.exit(2);
+    }
+);

+ 19 - 0
cordova/platforms/ios/cordova/clean.bat

@@ -0,0 +1,19 @@
+:: 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
+
+@ECHO OFF
+ECHO WARN: The 'clean' command is not available for cordova-ios on windows machines.>&2

+ 65 - 0
cordova/platforms/ios/cordova/defaults.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<widget xmlns     = "http://www.w3.org/ns/widgets"
+        id        = "io.cordova.helloCordova"
+        version   = "2.0.0">
+
+    <!-- Preferences for iOS -->
+    <preference name="AllowInlineMediaPlayback" value="false" />
+    <preference name="BackupWebStorage" value="cloud" />
+    <preference name="DisallowOverscroll" value="false" />
+    <preference name="EnableViewportScale" value="false" />
+    <preference name="KeyboardDisplayRequiresUserAction" value="true" />
+    <preference name="MediaTypesRequiringUserActionForPlayback" value="none" />
+    <preference name="SuppressesIncrementalRendering" value="false" />
+    <preference name="SuppressesLongPressGesture" value="false" />
+    <preference name="Suppresses3DTouchGesture" value="false" />
+    <preference name="GapBetweenPages" value="0" />
+    <preference name="PageLength" value="0" />
+    <preference name="PaginationBreakingMode" value="page" /> <!-- page, column -->
+    <preference name="PaginationMode" value="unpaginated" /> <!-- unpaginated, leftToRight, topToBottom, bottomToTop, rightToLeft -->
+
+    <feature name="CDVWebViewEngine">
+        <param name="ios-package" value="CDVWebViewEngine" />
+    </feature>
+    <feature name="LaunchScreen">
+        <param name="ios-package" value="CDVLaunchScreen"/>
+    </feature>
+    <feature name="LocalStorage">
+        <param name="ios-package" value="CDVLocalStorage"/>
+    </feature>
+    <feature name="Console">
+        <param name="ios-package" value="CDVLogger"/>
+        <param name="onload" value="true"/>
+    </feature>
+    <feature name="HandleOpenUrl">
+        <param name="ios-package" value="CDVHandleOpenURL"/>
+        <param name="onload" value="true"/>
+    </feature>
+    <feature name="IntentAndNavigationFilter">
+        <param name="ios-package" value="CDVIntentAndNavigationFilter"/>
+        <param name="onload" value="true"/>
+    </feature>
+    <feature name="GestureHandler">
+        <param name="ios-package" value="CDVGestureHandler"/>
+        <param name="onload" value="true"/>
+    </feature>
+
+</widget>

Някои файлове не бяха показани, защото твърде много файлове са промени