From 96f0830caab4d48a01d97db1d9ec3f4c52b95be3 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Wed, 18 Jan 2017 13:31:43 +0300 Subject: [PATCH 01/28] CB-12363 Added build badges for iOS 9.3 and 10.0 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c2d84a98..41f9909d 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Access GPS data. # under the License. --> -|Android 4.4|Android 5.1|iOS|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| +|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| # cordova-plugin-geolocation From 5da753661397792514816d066734490f063c5919 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:41:26 -0800 Subject: [PATCH 02/28] CB-12519 Updated version and RELEASENOTES.md for release 2.4.2 --- RELEASENOTES.md | 8 +- package.json | 2 +- plugin.xml | 444 +++++++++++++++++++---------------------------- tests/plugin.xml | 37 +--- 4 files changed, 189 insertions(+), 302 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index a5174289..65c0d095 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,10 @@ --> # Release Notes +### 2.4.2 (Feb 28, 2017) +* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** +* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges + ### 2.4.1 (Dec 07, 2016) * [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.4.1 * corrected KCLAuthorizationStatus error, changed to always removed user of [manager locationServicesEnabled]. Must return [CLLocationManager locationServicesEnabled] or 'none' @@ -109,8 +113,8 @@ * [CB-7158](https://issues.apache.org/jira/browse/CB-7158) Fix geolocation for ios 8 * Revert [CB-6911](https://issues.apache.org/jira/browse/CB-6911) partially (keeping Info.plist key installation for iOS 8) * [CB-6911](https://issues.apache.org/jira/browse/CB-6911) Geolocation fails in iOS 8 -* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) Windows 8.1 - Use a new proxy as old geolocation methods is deprecated -* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) Append Windows 8.1 into plugin.xml + Optimize Windows 8 Geolocation proxy +* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) **Windows 8.1** - Use a new proxy as old geolocation methods is deprecated +* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) Append **Windows 8.1** into plugin.xml + Optimize Windows 8 Geolocation proxy * Renamed test dir, added nested plugin.xml * added documentation for manual tests * [CB-7146](https://issues.apache.org/jira/browse/CB-7146) Added manual tests diff --git a/package.json b/package.json index ea3600cd..7550a317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "2.4.2-dev", + "version": "2.4.2", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 8c553922..2197d4b0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,269 +1,177 @@ - - - - - - Geolocation - Cordova Geolocation Plugin - Apache 2.0 - cordova,geolocation - https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git - https://issues.apache.org/jira/browse/CB/component/12320638 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $GEOLOCATION_USAGE_DESCRIPTION - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - read_geolocation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + Geolocation + Cordova Geolocation Plugin + Apache 2.0 + cordova,geolocation + https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git + https://issues.apache.org/jira/browse/CB/component/12320638 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $GEOLOCATION_USAGE_DESCRIPTION + + + + + + + + + + + + + + + + + + + + + + + + + + + read_geolocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index d06d5a78..8d693de3 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,32 +1,7 @@ - - - - - Cordova Geolocation Plugin Tests - Apache 2.0 - - - - + + + Cordova Geolocation Plugin Tests + Apache 2.0 + + From 4a7694a654556802c99e363dbafba5193690222c Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Tue, 28 Feb 2017 17:56:00 -0800 Subject: [PATCH 03/28] Set VERSION to 2.4.3-dev (via coho) --- package.json | 2 +- plugin.xml | 444 ++++++++++++++++++++++++++++------------------- tests/plugin.xml | 37 +++- 3 files changed, 300 insertions(+), 183 deletions(-) diff --git a/package.json b/package.json index 7550a317..84017f21 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "2.4.2", + "version": "2.4.3-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 2197d4b0..24b1dced 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,177 +1,269 @@ - - - Geolocation - Cordova Geolocation Plugin - Apache 2.0 - cordova,geolocation - https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git - https://issues.apache.org/jira/browse/CB/component/12320638 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $GEOLOCATION_USAGE_DESCRIPTION - - - - - - - - - - - - - - - - - - - - - - - - - - - read_geolocation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + Geolocation + Cordova Geolocation Plugin + Apache 2.0 + cordova,geolocation + https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git + https://issues.apache.org/jira/browse/CB/component/12320638 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $GEOLOCATION_USAGE_DESCRIPTION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + read_geolocation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index 8d693de3..a3580d06 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -1,7 +1,32 @@ - - - Cordova Geolocation Plugin Tests - Apache 2.0 - - + + + + + Cordova Geolocation Plugin Tests + Apache 2.0 + + + + From 41ec6e4a5b83a8d01cda2bf42a14414edefb17c4 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 21 Apr 2017 19:19:47 -0700 Subject: [PATCH 04/28] CB-12685: added package.json to tests folder --- tests/package.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/package.json diff --git a/tests/package.json b/tests/package.json new file mode 100644 index 00000000..b1e0d866 --- /dev/null +++ b/tests/package.json @@ -0,0 +1,14 @@ +{ + "name": "cordova-plugin-geolocation-tests", + "version": "2.4.3-dev", + "description": "", + "cordova": { + "id": "cordova-plugin-geolocation-tests", + "platforms": [] + }, + "keywords": [ + "ecosystem:cordova" + ], + "author": "", + "license": "Apache 2.0" +} From 538355ca6f3128e88e3a402189e6c086445b39b7 Mon Sep 17 00:00:00 2001 From: filmaj Date: Mon, 24 Apr 2017 18:24:23 -0700 Subject: [PATCH 05/28] Close #88 From 9f9496f0577ff66fb2449ac21b28ee1f0252aca2 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Wed, 26 Apr 2017 15:56:42 +0300 Subject: [PATCH 06/28] CB-12622 Added Android 6.0 build badge to README --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41f9909d..50af37c6 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Access GPS data. # under the License. --> -|Android 4.4|Android 5.1|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| +|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| +|:-:|:-:|:-:|:-:|:-:|:-:|:-:| +|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| # cordova-plugin-geolocation From 12fae5bd44d182b526ebb517b89a71a35044d411 Mon Sep 17 00:00:00 2001 From: filmaj Date: Thu, 27 Apr 2017 12:48:20 -0700 Subject: [PATCH 07/28] CB-12736 Updated version and RELEASENOTES.md for release 2.4.3 (via coho) --- RELEASENOTES.md | 4 ++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 65c0d095..d2804c4e 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,10 @@ --> # Release Notes +### 2.4.3 (Apr 27, 2017) +* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` +* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder + ### 2.4.2 (Feb 28, 2017) * [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** * [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges diff --git a/package.json b/package.json index 84017f21..a7d62467 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "2.4.3-dev", + "version": "2.4.3", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 24b1dced..91128674 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="2.4.3-dev"> + version="2.4.3"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index a3580d06..62d69d2b 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="2.4.3-dev"> + version="2.4.3"> Cordova Geolocation Plugin Tests Apache 2.0 From 43e71bf49ccbb39fbcbb9a260812e9020181d289 Mon Sep 17 00:00:00 2001 From: filmaj Date: Thu, 27 Apr 2017 12:48:22 -0700 Subject: [PATCH 08/28] Set VERSION to 2.4.4-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a7d62467..71457727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "2.4.3", + "version": "2.4.4-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 91128674..adb28e3b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="2.4.3"> + version="2.4.4-dev"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 62d69d2b..6df35814 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="2.4.3"> + version="2.4.4-dev"> Cordova Geolocation Plugin Tests Apache 2.0 From f085dd3c63e2094d38668f6c06cd45d0fc78e6b3 Mon Sep 17 00:00:00 2001 From: filmaj Date: Wed, 24 May 2017 21:58:18 +0200 Subject: [PATCH 09/28] CB-12847: added `bugs` entry to package.json. --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 71457727..45b0e4c9 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,9 @@ "type": "git", "url": "https://github.com/apache/cordova-plugin-geolocation" }, + "bugs": { + "url": "https://github.com/apache/cordova-website/issues" + }, "keywords": [ "cordova", "geolocation", From 7863bb287e473df9790d6b38376ead22191ea037 Mon Sep 17 00:00:00 2001 From: filmaj Date: Thu, 25 May 2017 12:40:35 +0200 Subject: [PATCH 10/28] CB-12847: fixed `bugs` entry in package.json. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 45b0e4c9..4bc3ab2c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "url": "https://github.com/apache/cordova-plugin-geolocation" }, "bugs": { - "url": "https://github.com/apache/cordova-website/issues" + "url": "https://issues.apache.org/jira/browse/CB" }, "keywords": [ "cordova", From 4f776e5a88cebd629e04f7c165a971203a3e82a6 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Mon, 26 Jun 2017 11:22:15 +0300 Subject: [PATCH 11/28] CB-12935: (ios, android) Enable paramedic builds on Travis CI --- .travis.yml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 70 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9af4c58..277a212f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,71 @@ -language: node_js sudo: false -node_js: - - "4.2" +addons: + jwt: + secure: yGb6UDaYlYgPpe6T3mqSvUbWrJAFeAJNQnVOFr9tfWEt9SdTmwrU68cEVMKmpc+nqCkvfrAn49XPzcERkgMDUQXPQzWHo87TfYpjqu3/+jfqyJy6RuE5ddbWQW05LtgRhjiPfmXmpAe41dbI7khl8Kx60zz9cxyHqBcR/k9bfFs= +env: + global: + - SAUCE_USERNAME=snay + - TRAVIS_NODE_VERSION="4.2" +matrix: + include: + - env: PLATFORM=ios-9.3 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=ios-10.0 + os: osx + osx_image: xcode7.3 + language: node_js + node_js: '4.2' + - env: PLATFORM=android-4.4 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - tools + - env: PLATFORM=android-5.1 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - tools + - env: PLATFORM=android-6.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - tools + - env: PLATFORM=android-7.0 + os: linux + language: android + jdk: oraclejdk8 + android: + components: + - tools + - tools +before_install: +- npm cache clean -f +- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm + && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm + install $TRAVIS_NODE_VERSION +- node --version +- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi +- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25; + fi +- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic + && npm install && popd +- npm install -g cordova +install: +- npm install +script: +- npm test +- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce + --buildName travis-plugin-geolocation-$TRAVIS_JOB_NUMBER From 259aa76017c53e6c8af4e8a543b214ed740de7bc Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 30 Jun 2017 09:31:37 +0300 Subject: [PATCH 12/28] CB-12935: (windows) Enable paramedic builds on AppVeyor --- .appveyor.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..4cd6d535 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,28 @@ +# appveyor file +# http://www.appveyor.com/docs/appveyor-yml + +max_jobs: 1 + +shallow_clone: true + +init: + - git config --global core.autocrlf true + +image: + - Visual Studio 2017 + +environment: + nodejs_version: "4" + matrix: + - PLATFORM: windows-10-store + +install: + - npm cache clean -f + - node --version + - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git + - npm install -g cordova + +build: off + +test_script: + - cordova-paramedic --config pr\%PLATFORM% --plugin . --justBuild From 855215324b4bf48e34e4100e0854d466fb405a59 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 7 Jul 2017 10:35:15 +0300 Subject: [PATCH 13/28] CB-12991: (CI) Updated CI badges --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 50af37c6..480de32e 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,9 @@ description: Access GPS data. # under the License. --> -|Android 4.4|Android 5.1|Android 6.0|iOS 9.3|iOS 10.0|Windows 10 Store|Travis CI| -|:-:|:-:|:-:|:-:|:-:|:-:|:-:| -|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-4.4,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-5.1,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=android-6.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-9.3,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=ios-10.0,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](http://cordova-ci.cloudapp.net:8080/buildStatus/icon?job=cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation)](http://cordova-ci.cloudapp.net:8080/job/cordova-periodic-build/PLATFORM=windows-10-store,PLUGIN=cordova-plugin-geolocation/)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| +|AppVeyor|Travis CI| +|:-:|:-:| +|[![Build status](https://ci.appveyor.com/api/projects/status/github/apache/cordova-plugin-geolocation?branch=master)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-plugin-geolocation)|[![Build Status](https://travis-ci.org/apache/cordova-plugin-geolocation.svg?branch=master)](https://travis-ci.org/apache/cordova-plugin-geolocation)| # cordova-plugin-geolocation From de69eb1b55c53934d9e5e034681f74487f093d7b Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Mon, 10 Jul 2017 10:34:16 +0300 Subject: [PATCH 14/28] CB-13000: (CI) Speed up android builds --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 277a212f..fab6b090 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,7 +25,6 @@ matrix: android: components: - tools - - tools - env: PLATFORM=android-5.1 os: linux language: android @@ -33,7 +32,6 @@ matrix: android: components: - tools - - tools - env: PLATFORM=android-6.0 os: linux language: android @@ -41,7 +39,6 @@ matrix: android: components: - tools - - tools - env: PLATFORM=android-7.0 os: linux language: android @@ -49,7 +46,6 @@ matrix: android: components: - tools - - tools before_install: - npm cache clean -f - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm From 69eb5ba5b5e801c55661dd277a2dd6997ff19c4d Mon Sep 17 00:00:00 2001 From: Audrey So Date: Mon, 12 Jun 2017 10:18:43 -0700 Subject: [PATCH 15/28] CB-12895 : added eslint and removed jshint --- .eslintrc.yml | 10 +++ .jshintrc | 17 ---- package.json | 12 ++- src/firefoxos/GeolocationProxy.js | 30 +++---- src/windows/GeolocationProxy.js | 113 ++++++++++++------------ tests/tests.js | 126 +++++++++++++-------------- www/Coordinates.js | 2 +- www/Position.js | 2 +- www/PositionError.js | 2 +- www/android/geolocation.js | 34 ++++---- www/blackberry10/GeolocationProxy.js | 38 ++++---- www/geolocation.js | 78 ++++++++--------- 12 files changed, 231 insertions(+), 233 deletions(-) create mode 100644 .eslintrc.yml delete mode 100644 .jshintrc diff --git a/.eslintrc.yml b/.eslintrc.yml new file mode 100644 index 00000000..0cccb8c7 --- /dev/null +++ b/.eslintrc.yml @@ -0,0 +1,10 @@ +root: true +extends: semistandard +rules: + indent: + - error + - 4 + camelcase: off + padded-blocks: off + operator-linebreak: off + no-throw-literal: off \ No newline at end of file diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index df324821..00000000 --- a/.jshintrc +++ /dev/null @@ -1,17 +0,0 @@ -{ - "browser": true - , "devel": true - , "bitwise": true - , "undef": true - , "trailing": true - , "quotmark": false - , "indent": 4 - , "unused": "vars" - , "latedef": "nofunc" - , "globals": { - "module": false, - "exports": false, - "require": false, - "cordova": true - } -} diff --git a/package.json b/package.json index 4bc3ab2c..59241673 100644 --- a/package.json +++ b/package.json @@ -40,8 +40,8 @@ "cordova-firefoxos" ], "scripts": { - "test": "npm run jshint", - "jshint": "node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests" + "test": "npm run eslint", + "eslint": "node node_modules/eslint/bin/eslint www && node node_modules/eslint/bin/eslint src && node node_modules/eslint/bin/eslint tests" }, "author": "Apache Software Foundation", "license": "Apache-2.0", @@ -53,6 +53,12 @@ } }, "devDependencies": { - "jshint": "^2.6.0" + "eslint": "^4.0.0", + "eslint-config-semistandard": "^11.0.0", + "eslint-config-standard": "^10.2.1", + "eslint-plugin-import": "^2.3.0", + "eslint-plugin-node": "^5.0.0", + "eslint-plugin-promise": "^3.5.0", + "eslint-plugin-standard": "^3.0.1" } } diff --git a/src/firefoxos/GeolocationProxy.js b/src/firefoxos/GeolocationProxy.js index e4b40529..598f705a 100644 --- a/src/firefoxos/GeolocationProxy.js +++ b/src/firefoxos/GeolocationProxy.js @@ -18,17 +18,17 @@ * under the License. * */ - + // latest geolocation spec can be found here: http://www.w3.org/TR/geolocation-API/ var idsMap = {}; module.exports = { - getLocation: function(success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); - function successCallback(position) { - // Cordova is creating Position object using just coords - success(position.coords); + getLocation: function (success, error, args) { + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef + function successCallback (position) { + // Cordova is creating Position object using just coords + success(position.coords); } geo.getCurrentPosition(successCallback, error, { enableHighAccuracy: args[0], @@ -36,11 +36,11 @@ module.exports = { }); }, - addWatch: function(success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); + addWatch: function (success, error, args) { + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef var id = args[0]; - function successCallback(position) { - success(position.coords); + function successCallback (position) { + success(position.coords); } var nativeId = geo.watchPosition(successCallback, error, { enableHighAccuracy: args[1] @@ -49,19 +49,19 @@ module.exports = { idsMap[id] = nativeId; }, - clearWatch: function(success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); + clearWatch: function (success, error, args) { + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef var id = args[0]; - if(id in idsMap) { + if (id in idsMap) { geo.clearWatch(idsMap[id]); delete idsMap[id]; } - if(success) { + if (success) { success(); } } }; -require("cordova/exec/proxy").add("Geolocation", module.exports); +require('cordova/exec/proxy').add('Geolocation', module.exports); diff --git a/src/windows/GeolocationProxy.js b/src/windows/GeolocationProxy.js index 03ed4950..f792b912 100644 --- a/src/windows/GeolocationProxy.js +++ b/src/windows/GeolocationProxy.js @@ -16,14 +16,14 @@ /* global Windows, WinJS */ -var PositionError = require('./PositionError'); -var callbacks = {}; -var locs = {}; +var PositionError = require('./PositionError'); +var callbacks = {}; +var locs = {}; // constants var FALLBACK_EPSILON = 0.001; -function ensureAndCreateLocator() { +function ensureAndCreateLocator () { var deferral; var loc = new Windows.Devices.Geolocation.Geolocator(); @@ -46,30 +46,32 @@ function ensureAndCreateLocator() { return deferral; } -function createErrorCode(loc) { +function createErrorCode (loc) { + /* eslint-disable no-fallthrough */ switch (loc.locationStatus) { - case Windows.Devices.Geolocation.PositionStatus.initializing: - // This status indicates that a location device is still initializing - case Windows.Devices.Geolocation.PositionStatus.noData: - // No location data is currently available - case Windows.Devices.Geolocation.PositionStatus.notInitialized: - // This status indicates that the app has not yet requested - // location data by calling GetGeolocationAsync() or - // registering an event handler for the positionChanged event. - case Windows.Devices.Geolocation.PositionStatus.notAvailable: - // Location is not available on this version of Windows - return PositionError.POSITION_UNAVAILABLE; - - case Windows.Devices.Geolocation.PositionStatus.disabled: - // The app doesn't have permission to access location, - // either because location has been turned off. - return PositionError.PERMISSION_DENIED; - - default: - break; + case Windows.Devices.Geolocation.PositionStatus.initializing: + // This status indicates that a location device is still initializing + case Windows.Devices.Geolocation.PositionStatus.noData: + // No location data is currently available + case Windows.Devices.Geolocation.PositionStatus.notInitialized: + // This status indicates that the app has not yet requested + // location data by calling GetGeolocationAsync() or + // registering an event handler for the positionChanged event. + case Windows.Devices.Geolocation.PositionStatus.notAvailable: + // Location is not available on this version of Windows + return PositionError.POSITION_UNAVAILABLE; + + case Windows.Devices.Geolocation.PositionStatus.disabled: + // The app doesn't have permission to access location, + // either because location has been turned off. + return PositionError.PERMISSION_DENIED; + + default: + break; } } -function createResult(pos) { +/* eslint-enable no-fallthrough */ +function createResult (pos) { var res = { accuracy: pos.coordinate.accuracy, heading: pos.coordinate.heading, @@ -95,14 +97,14 @@ module.exports = { getLocation: function (success, fail, args, env) { ensureAndCreateLocator().done(function (loc) { if (loc) { - var highAccuracy = args[0], - maxAge = args[1]; + var highAccuracy = args[0]; + var maxAge = args[1]; loc.desiredAccuracy = highAccuracy ? Windows.Devices.Geolocation.PositionAccuracy.high : Windows.Devices.Geolocation.PositionAccuracy.default; - loc.reportInterval = maxAge ? maxAge : 0; + loc.reportInterval = maxAge || 0; loc.getGeopositionAsync().then( function (pos) { @@ -115,11 +117,10 @@ module.exports = { }); } ); - } - else { + } else { fail({ code: PositionError.POSITION_UNAVAILABLE, - message: "You do not have the required location services present on your system." + message: 'You do not have the required location services present on your system.' }); } }, fail); @@ -136,33 +137,33 @@ module.exports = { var onStatusChanged = function (e) { switch (e.status) { - case Windows.Devices.Geolocation.PositionStatus.noData: - case Windows.Devices.Geolocation.PositionStatus.notAvailable: - fail({ - code: PositionError.POSITION_UNAVAILABLE, - message: "Data from location services is currently unavailable or you do not have the required location services present on your system." - }); - break; - - case Windows.Devices.Geolocation.PositionStatus.disabled: - fail({ - code: PositionError.PERMISSION_DENIED, - message: "Your location is currently turned off." - }); - break; + case Windows.Devices.Geolocation.PositionStatus.noData: + case Windows.Devices.Geolocation.PositionStatus.notAvailable: + fail({ + code: PositionError.POSITION_UNAVAILABLE, + message: 'Data from location services is currently unavailable or you do not have the required location services present on your system.' + }); + break; + + case Windows.Devices.Geolocation.PositionStatus.disabled: + fail({ + code: PositionError.PERMISSION_DENIED, + message: 'Your location is currently turned off.' + }); + break; // case Windows.Devices.Geolocation.PositionStatus.initializing: // case Windows.Devices.Geolocation.PositionStatus.ready: - default: - break; + default: + break; } }; loc.desiredAccuracy = highAccuracy ? - Windows.Devices.Geolocation.PositionAccuracy.high : - Windows.Devices.Geolocation.PositionAccuracy.default; + Windows.Devices.Geolocation.PositionAccuracy.high : + Windows.Devices.Geolocation.PositionAccuracy.default; - if (cordova.platformId == 'windows') { + if (cordova.platformId === 'windows') { // eslint-disable-line no-undef // 'positionchanged' event fails with error below if movementThreshold is not set // JavaScript runtime error: Operation aborted // You must set the MovementThreshold property or the ReportInterval property before adding event handlers. @@ -174,8 +175,8 @@ module.exports = { } } - loc.addEventListener("positionchanged", onPositionChanged); - loc.addEventListener("statuschanged", onStatusChanged); + loc.addEventListener('positionchanged', onPositionChanged); + loc.addEventListener('statuschanged', onStatusChanged); callbacks[clientId] = { pos: onPositionChanged, status: onStatusChanged }; locs[clientId] = loc; @@ -185,11 +186,11 @@ module.exports = { clearWatch: function (success, fail, args, env) { var clientId = args[0]; var callback = callbacks[clientId]; - var loc = locs[clientId]; + var loc = locs[clientId]; if (callback && loc) { - loc.removeEventListener("positionchanged", callback.pos); - loc.removeEventListener("statuschanged", callback.status); + loc.removeEventListener('positionchanged', callback.pos); + loc.removeEventListener('statuschanged', callback.status); delete callbacks[clientId]; delete locs[clientId]; @@ -199,4 +200,4 @@ module.exports = { } }; -require("cordova/exec/proxy").add("Geolocation", module.exports); +require('cordova/exec/proxy').add('Geolocation', module.exports); diff --git a/tests/tests.js b/tests/tests.js index 50c5bfb2..cf3a5ab5 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -19,7 +19,7 @@ * */ -/* jshint jasmine: true */ +/* eslint-env jasmine */ /* global WinJS, device */ exports.defineAutoTests = function () { @@ -42,7 +42,7 @@ exports.defineAutoTests = function () { done(); }); }; - + var succeed = function (done, context) { // prevents done() to be called several times if (context) { @@ -60,7 +60,7 @@ exports.defineAutoTests = function () { }; // On Windows, some tests prompt user for permission to use geolocation and interrupt autotests run - var isWindowsStore = (cordova.platformId == "windows8") || (cordova.platformId == "windows" && !WinJS.Utilities.isPhone); + var isWindowsStore = (cordova.platformId === 'windows8') || (cordova.platformId === 'windows' && !WinJS.Utilities.isPhone); // eslint-disable-line no-undef var majorDeviceVersion = null; var versionRegex = /(\d)\..+/.exec(device.version); if (versionRegex !== null) { @@ -68,29 +68,28 @@ exports.defineAutoTests = function () { } // Starting from Android 6.0 there are confirmation dialog which prevents us from running auto tests in silent mode (user interaction needed) // Also, Android emulator doesn't provide geo fix without manual interactions or mocks - var skipAndroid = cordova.platformId == "android" && (device.isVirtual || majorDeviceVersion >= 6); + var skipAndroid = cordova.platformId === 'android' && (device.isVirtual || majorDeviceVersion >= 6); // eslint-disable-line no-undef var isIOSSim = false; // if iOS simulator does not have a location set, it will fail. - describe('Geolocation (navigator.geolocation)', function () { - it("geolocation.spec.1 should exist", function () { + it('geolocation.spec.1 should exist', function () { expect(navigator.geolocation).toBeDefined(); }); - it("geolocation.spec.2 should contain a getCurrentPosition function", function () { + it('geolocation.spec.2 should contain a getCurrentPosition function', function () { expect(typeof navigator.geolocation.getCurrentPosition).toBeDefined(); - expect(typeof navigator.geolocation.getCurrentPosition == 'function').toBe(true); + expect(typeof navigator.geolocation.getCurrentPosition === 'function').toBe(true); }); - it("geolocation.spec.3 should contain a watchPosition function", function () { + it('geolocation.spec.3 should contain a watchPosition function', function () { expect(typeof navigator.geolocation.watchPosition).toBeDefined(); - expect(typeof navigator.geolocation.watchPosition == 'function').toBe(true); + expect(typeof navigator.geolocation.watchPosition === 'function').toBe(true); }); - it("geolocation.spec.4 should contain a clearWatch function", function () { + it('geolocation.spec.4 should contain a clearWatch function', function () { expect(typeof navigator.geolocation.clearWatch).toBeDefined(); - expect(typeof navigator.geolocation.clearWatch == 'function').toBe(true); + expect(typeof navigator.geolocation.clearWatch === 'function').toBe(true); }); }); @@ -99,7 +98,7 @@ exports.defineAutoTests = function () { describe('error callback', function () { - it("geolocation.spec.5 should be called if we set timeout to 0 and maximumAge to a very small number", function (done) { + it('geolocation.spec.5 should be called if we set timeout to 0 and maximumAge to a very small number', function (done) { if (isWindowsStore || skipAndroid) { pending(); } @@ -113,14 +112,14 @@ exports.defineAutoTests = function () { }); }); - it("geolocation.spec.9 on failure should return PositionError object with error code constants", function (done) { + it('geolocation.spec.9 on failure should return PositionError object with error code constants', function (done) { if (isWindowsStore || skipAndroid) { pending(); } navigator.geolocation.getCurrentPosition( fail.bind(this, done), - function(gpsError) { + function (gpsError) { // W3C specs: http://dev.w3.org/geo/api/spec-source.html#position_error_interface expect(gpsError.PERMISSION_DENIED).toBe(1); expect(gpsError.POSITION_UNAVAILABLE).toBe(2); @@ -137,7 +136,7 @@ exports.defineAutoTests = function () { describe('success callback', function () { - it("geolocation.spec.6 should be called with a Position object", function (done) { + it('geolocation.spec.6 should be called with a Position object', function (done) { if (isWindowsStore || skipAndroid) { pending(); } @@ -146,14 +145,13 @@ exports.defineAutoTests = function () { expect(p.coords).toBeDefined(); expect(p.timestamp).toBeDefined(); done(); - }, function(err){ - if(err.message && err.message.indexOf('kCLErrorDomain') > -1){ - console.log("Error: Location not set in simulator, tests will fail."); + }, function (err) { + if (err.message && err.message.indexOf('kCLErrorDomain') > -1) { + console.log('Error: Location not set in simulator, tests will fail.'); expect(true).toBe(true); isIOSSim = true; done(); - } - else { + } else { fail(done); } }, @@ -167,10 +165,10 @@ exports.defineAutoTests = function () { describe('watchPosition method', function () { - beforeEach(function(done) { + beforeEach(function (done) { // This timeout is set to lessen the load on platform's geolocation services // which were causing occasional test failures - setTimeout(function() { + setTimeout(function () { done(); }, 100); }); @@ -182,7 +180,7 @@ exports.defineAutoTests = function () { navigator.geolocation.clearWatch(errorWatch); }); - it("geolocation.spec.7 should be called if we set timeout to 0 and maximumAge to a very small number", function (done) { + it('geolocation.spec.7 should be called if we set timeout to 0 and maximumAge to a very small number', function (done) { if (isWindowsStore || skipAndroid) { pending(); } @@ -197,7 +195,7 @@ exports.defineAutoTests = function () { }); }); - it("geolocation.spec.10 on failure should return PositionError object with error code constants", function (done) { + it('geolocation.spec.10 on failure should return PositionError object with error code constants', function (done) { if (isWindowsStore || skipAndroid) { pending(); } @@ -205,7 +203,7 @@ exports.defineAutoTests = function () { var context = this; errorWatch = navigator.geolocation.watchPosition( fail.bind(this, done, context, 'Unexpected win'), - function(gpsError) { + function (gpsError) { if (context.done) return; context.done = true; @@ -231,7 +229,7 @@ exports.defineAutoTests = function () { navigator.geolocation.clearWatch(successWatch); }); - it("geolocation.spec.8 should be called with a Position object", function (done) { + it('geolocation.spec.8 should be called with a Position object', function (done) { if (isWindowsStore || skipAndroid || isIOSSim) { pending(); } @@ -245,7 +243,7 @@ exports.defineAutoTests = function () { expect(p.coords).toBeDefined(); expect(p.timestamp).toBeDefined(); - // callback could be called sync so we invoke done async to make sure we know watcher id to .clear in afterEach + // callback could be called sync so we invoke done async to make sure we know watcher id to .clear in afterEach setTimeout(function () { done(); }); @@ -273,10 +271,10 @@ exports.defineManualTests = function (contentEl, createActionButton) { /** * Set location status */ - function setLocationStatus(status) { + function setLocationStatus (status) { document.getElementById('location_status').innerHTML = status; } - function setLocationDetails(p) { + function setLocationDetails (p) { var date = (new Date(p.timestamp)); document.getElementById('latitude').innerHTML = p.coords.latitude; document.getElementById('longitude').innerHTML = p.coords.longitude; @@ -285,19 +283,19 @@ exports.defineManualTests = function (contentEl, createActionButton) { document.getElementById('heading').innerHTML = p.coords.heading; document.getElementById('speed').innerHTML = p.coords.speed; document.getElementById('altitude_accuracy').innerHTML = p.coords.altitudeAccuracy; - document.getElementById('timestamp').innerHTML = date.toDateString() + " " + date.toTimeString(); + document.getElementById('timestamp').innerHTML = date.toDateString() + ' ' + date.toTimeString(); } /** * Stop watching the location */ - function stopLocation() { + function stopLocation () { var geo = navigator.geolocation; if (!geo) { - alert('navigator.geolocation object is missing.'); + alert('navigator.geolocation object is missing.'); // eslint-disable-line no-undef return; } - setLocationStatus("Stopped"); + setLocationStatus('Stopped'); if (watchLocationId) { geo.clearWatch(watchLocationId); watchLocationId = null; @@ -310,7 +308,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { var watchLocation = function () { var geo = navigator.geolocation; if (!geo) { - alert('navigator.geolocation object is missing.'); + alert('navigator.geolocation object is missing.'); // eslint-disable-line no-undef return; } @@ -321,13 +319,13 @@ exports.defineManualTests = function (contentEl, createActionButton) { // Fail callback var fail = function (e) { - console.log("watchLocation fail callback with error code " + e); + console.log('watchLocation fail callback with error code ' + e); stopLocation(geo); }; // Get location watchLocationId = geo.watchPosition(success, fail, { enableHighAccuracy: true }); - setLocationStatus("Running"); + setLocationStatus('Running'); }; /** @@ -336,7 +334,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { var getLocation = function (opts) { var geo = navigator.geolocation; if (!geo) { - alert('navigator.geolocation object is missing.'); + alert('navigator.geolocation object is missing.'); // eslint-disable-line no-undef return; } @@ -346,16 +344,16 @@ exports.defineManualTests = function (contentEl, createActionButton) { // Success callback var success = function (p) { setLocationDetails(p); - setLocationStatus("Done"); + setLocationStatus('Done'); }; // Fail callback var fail = function (e) { - console.log("getLocation fail callback with error code " + e.code); - setLocationStatus("Error: " + e.code); + console.log('getLocation fail callback with error code ' + e.code); + setLocationStatus('Error: ' + e.code); }; - setLocationStatus("Retrieving location..."); + setLocationStatus('Retrieving location...'); // Get location geo.getCurrentPosition(success, fail, opts || { enableHighAccuracy: true }); //, {timeout: 10000}); @@ -366,54 +364,54 @@ exports.defineManualTests = function (contentEl, createActionButton) { var location_div = '
' + 'Status: Stopped' + - '', - latitude = '' + + '
'; + var latitude = '' + '' + '' + '' + - '', - longitude = '' + + ''; + var longitude = '' + '' + '' + '' + - '', - altitude = '' + + ''; + var altitude = '' + '' + '' + '' + - '', - accuracy = '' + + ''; + var accuracy = '' + '' + '' + '' + - '', - heading = '' + + ''; + var heading = '' + '' + '' + '' + - '', - speed = '' + + ''; + var speed = '' + '' + '' + '' + - '', - altitude_accuracy = '' + + ''; + var altitude_accuracy = '' + '' + '' + '' + - '', - time = '' + + ''; + var time = '' + '' + '' + '' + '' + '
Latitude: (decimal degrees) geographic coordinate [#ref]
Longitude: (decimal degrees) geographic coordinate [#ref]
Altitude: null if not supported;
' + '(meters) height above the [WGS84] ellipsoid. [#ref]
Accuracy: (meters; non-negative; 95% confidence level) the accuracy level of the latitude and longitude coordinates. [#ref]
Heading: null if not supported;
' + 'NaN if speed == 0;
' + '(degrees; 0° ≤ heading < 360°) direction of travel of the hosting device- counting clockwise relative to the true north. [#ref]
Speed: null if not supported;
' + '(meters per second; non-negative) magnitude of the horizontal component of the hosting device current velocity. [#ref]
Altitude Accuracy: null if not supported;
(meters; non-negative; 95% confidence level) the accuracy level of the altitude. [#ref]
Time: (DOMTimeStamp) when the position was acquired [#ref]
' + - '
', - actions = + ''; + var actions = '
' + 'Expected result: Will update all applicable values in status box for current location. Status will read Retrieving Location (may not see this if location is retrieved immediately) then Done.' + '

' + @@ -421,10 +419,10 @@ exports.defineManualTests = function (contentEl, createActionButton) { '

' + 'Expected result: Will stop watching the location so values will not be updated. Status will read Stopped.' + '

' + - 'Expected result: Will update location values with a cached position that is up to 30 seconds old. Verify with time value. Status will read Done.', - values_info = - '

Details about each value are listed below in the status box

', - note = + 'Expected result: Will update location values with a cached position that is up to 30 seconds old. Verify with time value. Status will read Done.'; + var values_info = + '

Details about each value are listed below in the status box

'; + var note = '

Allow use of current location, if prompted

'; contentEl.innerHTML = values_info + location_div + latitude + longitude + altitude + accuracy + heading + speed + diff --git a/www/Coordinates.js b/www/Coordinates.js index 84fdd5b8..1d7e8794 100644 --- a/www/Coordinates.js +++ b/www/Coordinates.js @@ -30,7 +30,7 @@ * @param {Object} altacc * @constructor */ -var Coordinates = function(lat, lng, alt, acc, head, vel, altacc) { +var Coordinates = function (lat, lng, alt, acc, head, vel, altacc) { /** * The latitude of the position. */ diff --git a/www/Position.js b/www/Position.js index d6b2c0cc..b4f20e07 100644 --- a/www/Position.js +++ b/www/Position.js @@ -21,7 +21,7 @@ var Coordinates = require('./Coordinates'); -var Position = function(coords, timestamp) { +var Position = function (coords, timestamp) { if (coords) { this.coords = new Coordinates(coords.latitude, coords.longitude, coords.altitude, coords.accuracy, coords.heading, coords.velocity, coords.altitudeAccuracy); } else { diff --git a/www/PositionError.js b/www/PositionError.js index 94562407..476b322a 100644 --- a/www/PositionError.js +++ b/www/PositionError.js @@ -26,7 +26,7 @@ * @param code * @param message */ -var PositionError = function(code, message) { +var PositionError = function (code, message) { this.code = code || null; this.message = message || ''; }; diff --git a/www/android/geolocation.js b/www/android/geolocation.js index 7265bec0..54005545 100644 --- a/www/android/geolocation.js +++ b/www/android/geolocation.js @@ -19,7 +19,7 @@ * */ -var exec = cordova.require('cordova/exec'); +var exec = cordova.require('cordova/exec'); // eslint-disable-line no-undef var utils = require('cordova/utils'); var PositionError = require('./PositionError'); @@ -28,44 +28,44 @@ var PositionError = require('./PositionError'); var pluginToNativeWatchMap = {}; module.exports = { - getCurrentPosition: function(success, error, args) { - var win = function() { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); - geo.getCurrentPosition(success, error, args); + getCurrentPosition: function (success, error, args) { + var win = function () { + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef + geo.getCurrentPosition(success, error, args); }; - var fail = function() { + var fail = function () { if (error) { - error(new PositionError (PositionError.PERMISSION_DENIED, 'Illegal Access')); + error(new PositionError(PositionError.PERMISSION_DENIED, 'Illegal Access')); } }; - exec(win, fail, "Geolocation", "getPermission", []); + exec(win, fail, 'Geolocation', 'getPermission', []); }, - watchPosition: function(success, error, args) { + watchPosition: function (success, error, args) { var pluginWatchId = utils.createUUID(); - var win = function() { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); + var win = function () { + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef pluginToNativeWatchMap[pluginWatchId] = geo.watchPosition(success, error, args); }; - var fail = function() { + var fail = function () { if (error) { error(new PositionError(PositionError.PERMISSION_DENIED, 'Illegal Access')); } }; - exec(win, fail, "Geolocation", "getPermission", []); + exec(win, fail, 'Geolocation', 'getPermission', []); return pluginWatchId; }, - clearWatch: function(pluginWatchId) { - var win = function() { + clearWatch: function (pluginWatchId) { + var win = function () { var nativeWatchId = pluginToNativeWatchMap[pluginWatchId]; - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); + var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef geo.clearWatch(nativeWatchId); }; - exec(win, null, "Geolocation", "getPermission", []); + exec(win, null, 'Geolocation', 'getPermission', []); } }; diff --git a/www/blackberry10/GeolocationProxy.js b/www/blackberry10/GeolocationProxy.js index 0bba2263..476d84f9 100644 --- a/www/blackberry10/GeolocationProxy.js +++ b/www/blackberry10/GeolocationProxy.js @@ -19,12 +19,12 @@ * */ -var idsMap = {}, - geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); +var idsMap = {}; +var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef module.exports = { - getLocation: function(success, error, args) { + getLocation: function (success, error, args) { var successCallback = function (result) { var pos = result.coords; pos.timestamp = result.timestamp; @@ -38,32 +38,32 @@ module.exports = { }); }, - addWatch: function(success, error, args) { - var id = args[0], - successCallback = function (result) { - var pos = result.coords; - pos.timestamp = result.timestamp; - if (success) { - success(pos); - } - }, - nativeId = geo.watchPosition(successCallback, error, { - enableHighAccuracy: args[1] - }); + addWatch: function (success, error, args) { + var id = args[0]; + var successCallback = function (result) { + var pos = result.coords; + pos.timestamp = result.timestamp; + if (success) { + success(pos); + } + }; + var nativeId = geo.watchPosition(successCallback, error, { + enableHighAccuracy: args[1] + }); idsMap[id] = nativeId; }, - clearWatch: function(success, error, args) { + clearWatch: function (success, error, args) { var id = args[0]; - if(id in idsMap) { + if (id in idsMap) { geo.clearWatch(idsMap[id]); delete idsMap[id]; } - if(success) { + if (success) { success(); } } }; -require("cordova/exec/proxy").add("Geolocation", module.exports); +require('cordova/exec/proxy').add('Geolocation', module.exports); diff --git a/www/geolocation.js b/www/geolocation.js index f1f64456..c6c57884 100644 --- a/www/geolocation.js +++ b/www/geolocation.js @@ -19,16 +19,16 @@ * */ -var argscheck = require('cordova/argscheck'), - utils = require('cordova/utils'), - exec = require('cordova/exec'), - PositionError = require('./PositionError'), - Position = require('./Position'); +var argscheck = require('cordova/argscheck'); +var utils = require('cordova/utils'); +var exec = require('cordova/exec'); +var PositionError = require('./PositionError'); +var Position = require('./Position'); -var timers = {}; // list of timers in use +var timers = {}; // list of timers in use // Returns default params, overrides if provided with values -function parseParameters(options) { +function parseParameters (options) { var opt = { maximumAge: 0, enableHighAccuracy: false, @@ -55,20 +55,20 @@ function parseParameters(options) { } // Returns a timeout failure, closed over a specified timeout value and error callback. -function createTimeout(errorCallback, timeout) { - var t = setTimeout(function() { +function createTimeout (errorCallback, timeout) { + var t = setTimeout(function () { clearTimeout(t); t = null; errorCallback({ - code:PositionError.TIMEOUT, - message:"Position retrieval timed out." + code: PositionError.TIMEOUT, + message: 'Position retrieval timed out.' }); }, timeout); return t; } var geolocation = { - lastPosition:null, // reference to last known (cached) position returned + lastPosition: null, // reference to last known (cached) position returned /** * Asynchronously acquires the current position. * @@ -76,15 +76,15 @@ var geolocation = { * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL) * @param {PositionOptions} options The options for getting the position data. (OPTIONAL) */ - getCurrentPosition:function(successCallback, errorCallback, options) { + getCurrentPosition: function (successCallback, errorCallback, options) { argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); options = parseParameters(options); // Timer var that will fire an error callback if no position is retrieved from native // before the "timeout" param provided expires - var timeoutTimer = {timer:null}; + var timeoutTimer = {timer: null}; - var win = function(p) { + var win = function (p) { clearTimeout(timeoutTimer.timer); if (!(timeoutTimer.timer)) { // Timeout already happened, or native fired error callback for @@ -94,20 +94,20 @@ var geolocation = { } var pos = new Position( { - latitude:p.latitude, - longitude:p.longitude, - altitude:p.altitude, - accuracy:p.accuracy, - heading:p.heading, - velocity:p.velocity, - altitudeAccuracy:p.altitudeAccuracy + latitude: p.latitude, + longitude: p.longitude, + altitude: p.altitude, + accuracy: p.accuracy, + heading: p.heading, + velocity: p.velocity, + altitudeAccuracy: p.altitudeAccuracy }, p.timestamp ); geolocation.lastPosition = pos; successCallback(pos); }; - var fail = function(e) { + var fail = function (e) { clearTimeout(timeoutTimer.timer); timeoutTimer.timer = null; var err = new PositionError(e.code, e.message); @@ -123,8 +123,8 @@ var geolocation = { // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object. } else if (options.timeout === 0) { fail({ - code:PositionError.TIMEOUT, - message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter." + code: PositionError.TIMEOUT, + message: "timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter." }); // Otherwise we have to call into native to retrieve a position. } else { @@ -139,7 +139,7 @@ var geolocation = { // always truthy before we call into native timeoutTimer.timer = true; } - exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]); + exec(win, fail, 'Geolocation', 'getLocation', [options.enableHighAccuracy, options.maximumAge]); } return timeoutTimer; }, @@ -152,7 +152,7 @@ var geolocation = { * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL) * @return String The watch id that must be passed to #clearWatch to stop watching. */ - watchPosition:function(successCallback, errorCallback, options) { + watchPosition: function (successCallback, errorCallback, options) { argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); options = parseParameters(options); @@ -161,7 +161,7 @@ var geolocation = { // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options); - var fail = function(e) { + var fail = function (e) { clearTimeout(timers[id].timer); var err = new PositionError(e.code, e.message); if (errorCallback) { @@ -169,20 +169,20 @@ var geolocation = { } }; - var win = function(p) { + var win = function (p) { clearTimeout(timers[id].timer); if (options.timeout !== Infinity) { timers[id].timer = createTimeout(fail, options.timeout); } var pos = new Position( { - latitude:p.latitude, - longitude:p.longitude, - altitude:p.altitude, - accuracy:p.accuracy, - heading:p.heading, - velocity:p.velocity, - altitudeAccuracy:p.altitudeAccuracy + latitude: p.latitude, + longitude: p.longitude, + altitude: p.altitude, + accuracy: p.accuracy, + heading: p.heading, + velocity: p.velocity, + altitudeAccuracy: p.altitudeAccuracy }, p.timestamp ); @@ -190,7 +190,7 @@ var geolocation = { successCallback(pos); }; - exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]); + exec(win, fail, 'Geolocation', 'addWatch', [id, options.enableHighAccuracy]); return id; }, @@ -199,11 +199,11 @@ var geolocation = { * * @param {String} id The ID of the watch returned from #watchPosition */ - clearWatch:function(id) { + clearWatch: function (id) { if (id && timers[id] !== undefined) { clearTimeout(timers[id].timer); timers[id].timer = false; - exec(null, null, "Geolocation", "clearWatch", [id]); + exec(null, null, 'Geolocation', 'clearWatch', [id]); } } }; From 5e472fd54dd1467f1ebb7f2c5a215adebd98927c Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Tue, 19 Sep 2017 09:05:47 +0300 Subject: [PATCH 16/28] CB-13299 (CI) Fix Android builds --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fab6b090..fe6ee630 100644 --- a/.travis.yml +++ b/.travis.yml @@ -47,7 +47,6 @@ matrix: components: - tools before_install: -- npm cache clean -f - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION From 642a2f35d4df90e9d5929dc5eb2f9bbdb6ad5dbf Mon Sep 17 00:00:00 2001 From: Kelvin Dart Date: Wed, 18 Oct 2017 16:52:17 +0100 Subject: [PATCH 17/28] CB-13294 Remove cordova-plugin-compat This closes #96 --- package.json | 4 ++-- plugin.xml | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 59241673..ba37f400 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "2.4.4-dev", + "version": "3.0.0-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", @@ -48,7 +48,7 @@ "engines": { "cordovaDependencies": { "3.0.0": { - "cordova": ">100" + "cordova-android": ">=6.3.0" } } }, diff --git a/plugin.xml b/plugin.xml index adb28e3b..cf93db87 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="2.4.4-dev"> + version="3.0.0-dev"> Geolocation Cordova Geolocation Plugin @@ -31,7 +31,9 @@ xmlns:android="http://schemas.android.com/apk/res/android" https://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation.git https://issues.apache.org/jira/browse/CB/component/12320638 - + + + From 23a733527d696963f8325ba98bee83ce96994f00 Mon Sep 17 00:00:00 2001 From: Alexander Sorokin Date: Fri, 20 Oct 2017 08:58:57 +0300 Subject: [PATCH 18/28] CB-13472: (CI) Fixed Travis Android builds again --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fe6ee630..db6d35bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,7 +53,7 @@ before_install: - node --version - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi -- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25; +- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26; fi - git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic && npm install && popd From c692c156d75869427358274b0ae7e2abedababc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Wed, 1 Nov 2017 11:13:20 +0100 Subject: [PATCH 19/28] CB-13516 (all): Add 'protective' entry to cordovaDependencies --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index ba37f400..0734c251 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,9 @@ "cordovaDependencies": { "3.0.0": { "cordova-android": ">=6.3.0" + }, + "4.0.0": { + "cordova": ">100" } } }, From 4de8bdf3aeb17f158b0219731a0b29b6f487f4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Sat, 14 Oct 2017 17:45:59 +0200 Subject: [PATCH 20/28] CB-13267 (iOS): Remove ios usage descriptions --- README.md | 21 +++++++++++++-------- plugin.xml | 5 ----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 480de32e..7535d947 100644 --- a/README.md +++ b/README.md @@ -161,14 +161,19 @@ error, the `geolocationError` callback is passed a ### iOS Quirks - Since iOS 10 it's mandatory to add a `NSLocationWhenInUseUsageDescription` entry in the info.plist. - - `NSLocationWhenInUseUsageDescription` describes the reason that the app accesses the user's location. When the system prompts the user to allow access, this string is displayed as part of the dialog box. To add this entry you can pass the variable `GEOLOCATION_USAGE_DESCRIPTION` on plugin install. - - Example: - `cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="your usage message"` - - If you don't pass the variable, the plugin will add an empty string as value. + Since iOS 10 it's mandatory to provide an usage description in the `info.plist` if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide an usage description. + + This plugins requires the following usage description: + + * `NSLocationWhenInUseUsageDescription` describes the reason that the app accesses the user's location. + + To add this entry into the `info.plist`, you can use the `edit-config` tag in the `config.xml` like this: + +``` + + need location access to find things nearby + +``` ### Android Quirks diff --git a/plugin.xml b/plugin.xml index cf93db87..4ad5718a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -101,11 +101,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" - - - $GEOLOCATION_USAGE_DESCRIPTION - - From 0b0ca15c757292be371c9a9e1717e6aaebb1b41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Thu, 2 Nov 2017 20:28:02 +0100 Subject: [PATCH 21/28] Add edit-config tag in tests/plugin.xml --- tests/plugin.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/plugin.xml b/tests/plugin.xml index 6df35814..14d12008 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -29,4 +29,7 @@ + + need location access to pass tests +
From a168c04b33e6bb3f030fc07861c491040b49eb5a Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Mon, 6 Nov 2017 14:37:45 -0800 Subject: [PATCH 22/28] CB-13542 Updated version and RELEASENOTES.md for release 3.0.0 (via coho) --- RELEASENOTES.md | 9 +++++++++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index d2804c4e..dff15f5f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,15 @@ --> # Release Notes +### 3.0.0 (Nov 06, 2017) +* [CB-13267](https://issues.apache.org/jira/browse/CB-13267) (iOS): Remove **iOS** usage descriptions +* [CB-13516](https://issues.apache.org/jira/browse/CB-13516) (all): Add 'protective' entry to `cordovaDependencies` +* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again +* [CB-13294](https://issues.apache.org/jira/browse/CB-13294) Remove `cordova-plugin-compat` +* [CB-13299](https://issues.apache.org/jira/browse/CB-13299) (CI) Fix **Android** builds +* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` +* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. + ### 2.4.3 (Apr 27, 2017) * [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` * [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder diff --git a/package.json b/package.json index 0734c251..11d87a5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "3.0.0-dev", + "version": "3.0.0", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 4ad5718a..fbac718d 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="3.0.0-dev"> + version="3.0.0"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 14d12008..a6c621d5 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="2.4.4-dev"> + version="3.0.0"> Cordova Geolocation Plugin Tests Apache 2.0 From 083a1c55b3d6a66c9dec2804934c247313089977 Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Mon, 6 Nov 2017 14:38:39 -0800 Subject: [PATCH 23/28] Set VERSION to 3.0.1-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 11d87a5b..79c43641 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "3.0.0", + "version": "3.0.1-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index fbac718d..457b96a6 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="3.0.0"> + version="3.0.1-dev"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index a6c621d5..3daca5f4 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="3.0.0"> + version="3.0.1-dev"> Cordova Geolocation Plugin Tests Apache 2.0 From 92f595cefb83716189d6176ae01b044f8d016233 Mon Sep 17 00:00:00 2001 From: Suraj Pindoria Date: Tue, 12 Dec 2017 11:31:49 -0800 Subject: [PATCH 24/28] CB-13664: remove deprecated platforms --- README.md | 9 -- package.json | 20 +--- plugin.xml | 146 +-------------------------- src/firefoxos/GeolocationProxy.js | 67 ------------ src/ubuntu/geolocation.cpp | 133 ------------------------ src/ubuntu/geolocation.h | 69 ------------- src/wp/GeoLocation.cs | 34 ------- www/blackberry10/GeolocationProxy.js | 69 ------------- 8 files changed, 4 insertions(+), 543 deletions(-) delete mode 100644 src/firefoxos/GeolocationProxy.js delete mode 100644 src/ubuntu/geolocation.cpp delete mode 100644 src/ubuntu/geolocation.h delete mode 100644 src/wp/GeoLocation.cs delete mode 100644 www/blackberry10/GeolocationProxy.js diff --git a/README.md b/README.md index 7535d947..a212a763 100644 --- a/README.md +++ b/README.md @@ -88,13 +88,8 @@ It is also possible to install via repo url directly ( unstable ) ## Supported Platforms -- Amazon Fire OS - Android -- BlackBerry 10 -- Firefox OS - iOS -- Tizen -- Windows Phone 7 and 8 - Windows ## Methods @@ -310,10 +305,6 @@ It contains a set of properties that describe the geographic coordinates of a po * __speed__: Current ground speed of the device, specified in meters per second. _(Number)_ -### Amazon Fire OS Quirks - -__altitudeAccuracy__: Not supported by Android devices, returning `null`. - ### Android Quirks __altitudeAccuracy__: Not supported by Android devices, returning `null`. diff --git a/package.json b/package.json index 79c43641..2ef9f651 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,13 @@ { "name": "cordova-plugin-geolocation", - "version": "3.0.1-dev", + "version": "4.0.0-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", "platforms": [ "android", - "amazon-fireos", "ios", - "blackberry10", - "ubuntu", - "wp7", - "wp8", - "windows8", - "windows", - "firefoxos" + "windows" ] }, "repository": { @@ -29,15 +22,8 @@ "geolocation", "ecosystem:cordova", "cordova-android", - "cordova-amazon-fireos", "cordova-ios", - "cordova-blackberry10", - "cordova-ubuntu", - "cordova-wp7", - "cordova-wp8", - "cordova-windows8", - "cordova-windows", - "cordova-firefoxos" + "cordova-windows" ], "scripts": { "test": "npm run eslint", diff --git a/plugin.xml b/plugin.xml index 457b96a6..74da986a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="3.0.1-dev"> + version="4.0.0-dev"> Geolocation Cordova Geolocation Plugin @@ -61,16 +61,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" - - - - - - - - - - @@ -103,113 +93,6 @@ xmlns:android="http://schemas.android.com/apk/res/android" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - read_geolocation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -236,31 +119,4 @@ xmlns:android="http://schemas.android.com/apk/res/android" - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/firefoxos/GeolocationProxy.js b/src/firefoxos/GeolocationProxy.js deleted file mode 100644 index 598f705a..00000000 --- a/src/firefoxos/GeolocationProxy.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -// latest geolocation spec can be found here: http://www.w3.org/TR/geolocation-API/ - -var idsMap = {}; - -module.exports = { - getLocation: function (success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef - function successCallback (position) { - // Cordova is creating Position object using just coords - success(position.coords); - } - geo.getCurrentPosition(successCallback, error, { - enableHighAccuracy: args[0], - maximumAge: args[1] - }); - }, - - addWatch: function (success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef - var id = args[0]; - function successCallback (position) { - success(position.coords); - } - var nativeId = geo.watchPosition(successCallback, error, { - enableHighAccuracy: args[1] - }); - - idsMap[id] = nativeId; - }, - - clearWatch: function (success, error, args) { - var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef - var id = args[0]; - - if (id in idsMap) { - geo.clearWatch(idsMap[id]); - delete idsMap[id]; - } - - if (success) { - success(); - } - } -}; - -require('cordova/exec/proxy').add('Geolocation', module.exports); diff --git a/src/ubuntu/geolocation.cpp b/src/ubuntu/geolocation.cpp deleted file mode 100644 index 3d40ab4c..00000000 --- a/src/ubuntu/geolocation.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* - * - * Copyright 2013-2016 Canonical Ltd. - * - * Licensed 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. - * -*/ - -#include - -#include "geolocation.h" - -Geolocation::Geolocation(Cordova *cordova) - : CPlugin(cordova), - _geoPositionInfoSource(QGeoPositionInfoSource::createDefaultSource(this)) { - if (_geoPositionInfoSource.data() != 0) { - QObject::connect(_geoPositionInfoSource.data(), - SIGNAL(positionUpdated(QGeoPositionInfo)), - this, - SLOT(positionUpdated(QGeoPositionInfo))); - - QObject::connect(_geoPositionInfoSource.data(), - SIGNAL(updateTimeout()), - this, - SLOT(updateTimeout())); - } -} - -void Geolocation::addWatch(int scId, int ecId, const QString &id, bool enableHighAccuracy) { - Q_UNUSED(enableHighAccuracy); - - assert(_id2sc.find(id) == _id2sc.end()); - - if (!_geoPositionInfoSource.data()) { - QVariantMap err; - err.insert("code", POSITION_UNAVAILABLE); - err.insert("message", "unavailable"); - - this->cb(ecId, err); - return; - } - - _id2sc[id] = scId; - _id2ec[id] = ecId; -} - -void Geolocation::clearWatch(int scId, int ecId, const QString &id) { - _id2sc.remove(id); - _id2ec.remove(id); -} - -void Geolocation::getLocation(int scId, int ecId, bool enableHighAccuracy, qint64 maximumAge) { - Q_UNUSED(maximumAge); - Q_UNUSED(enableHighAccuracy); - - if (!_geoPositionInfoSource.data()) { - QVariantMap err; - err.insert("code", POSITION_UNAVAILABLE); - err.insert("message", "unavailable"); - - this->cb(ecId, err); - return; - } - - _geoPositionInfoSource->requestUpdate(); - - QString id = QString("_INTERNAL_") + QUuid::createUuid().toString(); - - _id2sc[id] = scId; - _id2ec[id] = ecId; - _singleUpdate.insert(id); -} - -void Geolocation::positionUpdated(const QGeoPositionInfo &update) { - QGeoCoordinate coordinate = update.coordinate(); - - QVariantMap p; - - p.insert("latitude", coordinate.latitude()); - p.insert("longitude", coordinate.longitude()); - - if (coordinate.type() == QGeoCoordinate::Coordinate3D) - p.insert("altitude", coordinate.altitude()); - - if (update.hasAttribute(QGeoPositionInfo::HorizontalAccuracy)) - p.insert("accuracy", update.attribute(QGeoPositionInfo::HorizontalAccuracy)); - - if (update.hasAttribute(QGeoPositionInfo::Direction)) - p.insert("heading", update.attribute(QGeoPositionInfo::Direction)); - - if (update.hasAttribute(QGeoPositionInfo::GroundSpeed)) - p.insert("velocity", update.attribute(QGeoPositionInfo::GroundSpeed)); - - if (update.hasAttribute(QGeoPositionInfo::VerticalAccuracy)) - p.insert("altitudeAccuracy", update.attribute(QGeoPositionInfo::VerticalAccuracy)); - - p.insert("timestamp", update.timestamp().toMSecsSinceEpoch()); - - for (const QString &id: _id2sc.keys()) { - int scId = _id2sc[id]; - this->cb(scId, p); - if (_singleUpdate.contains(id)) { - _singleUpdate.remove(id); - _id2sc.remove(id); - _id2ec.remove(id); - } - } -} - -void Geolocation::updateTimeout() { - QVariantMap err; - err.insert("code", TIMEOUT); - err.insert("message", "timeout"); - - for (int ecId: _id2ec) { - this->cb(ecId, err); - } - - _id2ec.clear(); - _id2sc.clear(); - _singleUpdate.clear(); -} diff --git a/src/ubuntu/geolocation.h b/src/ubuntu/geolocation.h deleted file mode 100644 index 7345bec9..00000000 --- a/src/ubuntu/geolocation.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Copyright 2013 Canonical Ltd. - * - * Licensed 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. - * -*/ - -#ifndef GEOLOCATION_H_SVO2013 -#define GEOLOCATION_H_SVO2013 - -#include -#include -#include -#include - -#include - -class Geolocation: public CPlugin { - Q_OBJECT -public: - explicit Geolocation(Cordova *cordova); - - virtual const QString fullName() override { - return Geolocation::fullID(); - } - - virtual const QString shortName() override { - return "Geolocation"; - } - - static const QString fullID() { - return "Geolocation"; - } - -public slots: - void getLocation(int scId, int ecId, bool enableHighAccuracy, qint64 maximumAge); - void addWatch(int scId, int ecId, const QString &id, bool enableHighAccuracy); - void clearWatch(int scId, int ecId, const QString &id); - -protected slots: - void positionUpdated(const QGeoPositionInfo &update); - void updateTimeout(); - -private: - QMap _id2sc; - QMap _id2ec; - QSet _singleUpdate; - QSharedPointer _geoPositionInfoSource; - - enum PositionError { - PERMISSION_DENIED = 1, - POSITION_UNAVAILABLE = 2, - TIMEOUT = 3 - }; -}; - -#endif diff --git a/src/wp/GeoLocation.cs b/src/wp/GeoLocation.cs deleted file mode 100644 index 42af72de..00000000 --- a/src/wp/GeoLocation.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - Licensed 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. -*/ - -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using System.Threading; -using System.Device.Location; - -namespace WPCordovaClassLib.Cordova.Commands -{ - /// - /// This is a command stub, the browser provides the correct implementation. We use this to trigger the static analyzer that we require this permission - /// - public class Geolocation - { - /* Unreachable code, by design -jm */ - private void triggerGeoInclusion() - { - new GeoCoordinateWatcher(); - } - } -} diff --git a/www/blackberry10/GeolocationProxy.js b/www/blackberry10/GeolocationProxy.js deleted file mode 100644 index 476d84f9..00000000 --- a/www/blackberry10/GeolocationProxy.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var idsMap = {}; -var geo = cordova.require('cordova/modulemapper').getOriginalSymbol(window, 'navigator.geolocation'); // eslint-disable-line no-undef - -module.exports = { - - getLocation: function (success, error, args) { - var successCallback = function (result) { - var pos = result.coords; - pos.timestamp = result.timestamp; - if (success) { - success(pos); - } - }; - geo.getCurrentPosition(successCallback, error, { - enableHighAccuracy: args[0], - maximumAge: args[1] - }); - }, - - addWatch: function (success, error, args) { - var id = args[0]; - var successCallback = function (result) { - var pos = result.coords; - pos.timestamp = result.timestamp; - if (success) { - success(pos); - } - }; - var nativeId = geo.watchPosition(successCallback, error, { - enableHighAccuracy: args[1] - }); - idsMap[id] = nativeId; - }, - - clearWatch: function (success, error, args) { - var id = args[0]; - if (id in idsMap) { - geo.clearWatch(idsMap[id]); - delete idsMap[id]; - } - if (success) { - success(); - } - } - -}; - -require('cordova/exec/proxy').add('Geolocation', module.exports); From 0f5868057f12b816c1974e311f89e52dc563954c Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 15 Dec 2017 17:25:13 -0800 Subject: [PATCH 25/28] CB-13681 Updated version and RELEASENOTES.md for release 4.0.0 (via coho) --- RELEASENOTES.md | 3 +++ package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index dff15f5f..920297d2 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -20,6 +20,9 @@ --> # Release Notes +### 4.0.0 (Dec 15, 2017) +* [CB-13664](https://issues.apache.org/jira/browse/CB-13664) remove deprecated platforms + ### 3.0.0 (Nov 06, 2017) * [CB-13267](https://issues.apache.org/jira/browse/CB-13267) (iOS): Remove **iOS** usage descriptions * [CB-13516](https://issues.apache.org/jira/browse/CB-13516) (all): Add 'protective' entry to `cordovaDependencies` diff --git a/package.json b/package.json index 2ef9f651..2d7ddb19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "4.0.0-dev", + "version": "4.0.0", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index 74da986a..b6a8c6aa 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="4.0.0-dev"> + version="4.0.0"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 3daca5f4..4c0646c2 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="3.0.1-dev"> + version="4.0.0"> Cordova Geolocation Plugin Tests Apache 2.0 From a9a266b755c44cfc142bf2aa81267ebb7f985adf Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 15 Dec 2017 17:26:44 -0800 Subject: [PATCH 26/28] Set VERSION to 4.0.1-dev (via coho) --- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2d7ddb19..6c97d635 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "4.0.0", + "version": "4.0.1-dev", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index b6a8c6aa..c3869bb2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="4.0.0"> + version="4.0.1-dev"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 4c0646c2..1dddb44d 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="4.0.0"> + version="4.0.1-dev"> Cordova Geolocation Plugin Tests Apache 2.0 From 9dd3b32473fef8f04706a82797202fd610c5aa19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Wed, 27 Dec 2017 00:25:54 +0100 Subject: [PATCH 27/28] CB-13705: Fix to allow 4.0.0 version install --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c97d635..bd94bc3d 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "3.0.0": { "cordova-android": ">=6.3.0" }, - "4.0.0": { + "5.0.0": { "cordova": ">100" } } From 8167dce4ee5a7106b3cb14606a69f6d16384f276 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Wed, 27 Dec 2017 19:13:36 -0500 Subject: [PATCH 28/28] CB-13714 Updated version and RELEASENOTES.md for release 4.0.1 (via coho) --- RELEASENOTES.md | 199 +---------------------------------------------- package.json | 2 +- plugin.xml | 2 +- tests/plugin.xml | 2 +- 4 files changed, 5 insertions(+), 200 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 920297d2..12b5a75b 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,198 +1,3 @@ - -# Release Notes +### 4.0.1 (Dec 27, 2017) +* [CB-13705](https://issues.apache.org/jira/browse/CB-13705) Fix to allow 4.0.0 version install -### 4.0.0 (Dec 15, 2017) -* [CB-13664](https://issues.apache.org/jira/browse/CB-13664) remove deprecated platforms - -### 3.0.0 (Nov 06, 2017) -* [CB-13267](https://issues.apache.org/jira/browse/CB-13267) (iOS): Remove **iOS** usage descriptions -* [CB-13516](https://issues.apache.org/jira/browse/CB-13516) (all): Add 'protective' entry to `cordovaDependencies` -* [CB-13472](https://issues.apache.org/jira/browse/CB-13472) (CI) Fixed Travis **Android** builds again -* [CB-13294](https://issues.apache.org/jira/browse/CB-13294) Remove `cordova-plugin-compat` -* [CB-13299](https://issues.apache.org/jira/browse/CB-13299) (CI) Fix **Android** builds -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) added `eslint` and removed `jshint` -* [CB-12847](https://issues.apache.org/jira/browse/CB-12847) added `bugs` entry to `package.json`. - -### 2.4.3 (Apr 27, 2017) -* [CB-12622](https://issues.apache.org/jira/browse/CB-12622) Added **Android 6.0** build badge to `README` -* [CB-12685](https://issues.apache.org/jira/browse/CB-12685) added `package.json` to tests folder - -### 2.4.2 (Feb 28, 2017) -* [CB-12363](https://issues.apache.org/jira/browse/CB-12363) Added build badges for **iOS 9.3** and **iOS 10.0** -* [CB-12230](https://issues.apache.org/jira/browse/CB-12230) Removed **Windows 8.1** build badges - -### 2.4.1 (Dec 07, 2016) -* [CB-12224](https://issues.apache.org/jira/browse/CB-12224) Updated version and RELEASENOTES.md for release 2.4.1 -* corrected KCLAuthorizationStatus error, changed to always removed user of [manager locationServicesEnabled]. Must return [CLLocationManager locationServicesEnabled] or 'none' -* [CB-11962](https://issues.apache.org/jira/browse/CB-11962) (ios) Added variable for setting NSLocationWhenInUseUsageDescription -* [CB-11917](https://issues.apache.org/jira/browse/CB-11917) - Remove pull request template checklist item: "iCLA has been submitted…" -* [CB-11904](https://issues.apache.org/jira/browse/CB-11904) Incremented plugin version. - -### 2.4.0 (Sep 26, 2016) -* **Ubuntu** Fix altitude & accuracies retrieval -* [CB-11875](https://issues.apache.org/jira/browse/CB-11875) added `android.hardware.location.gps` `uses-feature`. - -### 2.3.0 (Sep 08, 2016) -* [CB-11795](https://issues.apache.org/jira/browse/CB-11795) Add 'protective' entry to cordovaDependencies -* Plugin uses `Android Log class` and not `Cordova LOG class` -* Add badges for paramedic builds on Jenkins -* Add pull request template. -* Adding links to reference content and sample content to the top of the readme file -* Update **iOS** geolocation plugin to avoid `THREAD WARNING: ['Geolocation']`, operation occurs in new Thread -* [CB-10996](https://issues.apache.org/jira/browse/CB-10996) Adding front matter to README.md - -### 2.2.0 (Apr 15, 2016) -* Replace `PermissionHelper.java` with `cordova-plugin-compat` -* [CB-10691](https://issues.apache.org/jira/browse/CB-10691) Check the context to avoid null errors -* [CB-10636](https://issues.apache.org/jira/browse/CB-10636) Add `JSHint` for plugins -* Using a fallback epsilon in case `Number.EPSILON` is not defined. -* [CB-10574](https://issues.apache.org/jira/browse/CB-10574) MobileSpec can't get results for **WP8.1** Builds - -### 2.1.0 (Jan 15, 2016) -* [CB-10319](https://issues.apache.org/jira/browse/CB-10319) **Android** Adding reflective helper methods for permission requests -* [CB-8523](https://issues.apache.org/jira/browse/CB-8523) Fixed accuracy when `enableHighAccuracy: false` on **iOS**. -* [CB-10286](https://issues.apache.org/jira/browse/CB-10286) Don't skip automatic tests on **Android** devices -* [CB-10277](https://issues.apache.org/jira/browse/CB-10277) Error callback should be called w/ `PositionError` when location access is denied -* [CB-10285](https://issues.apache.org/jira/browse/CB-10285) Added tests for `PositionError` constants -* [CB-10278](https://issues.apache.org/jira/browse/CB-10278) geolocation `watchPosition` doesn't return `watchID` string -* [CB-8443](https://issues.apache.org/jira/browse/CB-8443) **Android** nothing happens if `GPS` is turned off -* [CB-10204](https://issues.apache.org/jira/browse/CB-10204) Fix `getCurrentPosition` options on **Android** -* [CB-7146](https://issues.apache.org/jira/browse/CB-7146) Remove built-in `WebView navigator.geolocation` manual tests -* [CB-2845](https://issues.apache.org/jira/browse/CB-2845) `PositionError` constants not attached to prototype as specified in W3C document - -### 2.0.0 (Nov 18, 2015) -* [CB-10035](https://issues.apache.org/jira/browse/CB-10035) Updated `RELEASENOTES` to be newest to oldest -* [CB-9907](https://issues.apache.org/jira/browse/CB-9907) Handle **iOS** tests that fail when ios simulator does not have a location -* [CB-8826](https://issues.apache.org/jira/browse/CB-8826) Check for `NSLocationWhenInUseUsageDescription` first -* [CB-9105](https://issues.apache.org/jira/browse/CB-9105): Fixing `JS` errors in the shim -* Added support for new permissions model for **Android 6.0** aka **Marshmallow** -* Expect `lastPosition` to have a `timestamp` that is already in `msecs` -* [CB-4596](https://issues.apache.org/jira/browse/CB-4596) Date objects are supposed to be `DOMTimeStamp` -* Fixing contribute link. -* [CB-9355](https://issues.apache.org/jira/browse/CB-9355) Fix Geolocation plugin start watch fail related to unset `MovementThreshold` on **Windows 10** - -### 1.0.1 (Jun 17, 2015) -* [CB-9128](https://issues.apache.org/jira/browse/CB-9128) cordova-plugin-geolocation documentation translation: cordova-plugin-geolocation -* fix npm md issue -* [CB-8845](https://issues.apache.org/jira/browse/CB-8845) Updated comment why Android tests are currently pended -* [CB-8845](https://issues.apache.org/jira/browse/CB-8845) Pended tests for Android -* Add more install text for legacy versions of cordova tools. This closes #36 - -### 1.0.0 (Apr 15, 2015) -* [CB-8746](https://issues.apache.org/jira/browse/CB-8746) gave plugin major version bump -* [CB-8683](https://issues.apache.org/jira/browse/CB-8683) changed plugin-id to pacakge-name -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) properly updated translated docs to use new id -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) updated translated docs to use new id -* Use TRAVIS_BUILD_DIR, install paramedic by npm -* [CB-8681](https://issues.apache.org/jira/browse/CB-8681) Fixed occasional test failures -* docs: added Windows to supported platforms -* [CB-8653](https://issues.apache.org/jira/browse/CB-8653) Updated Readme -* [CB-8659](https://issues.apache.org/jira/browse/CB-8659): ios: 4.0.x Compatibility: Remove use of initWebView method -* [CB-8659](https://issues.apache.org/jira/browse/CB-8659): ios: 4.0.x Compatibility: Remove use of deprecated headers -* Wrong parameter in Firefox OS plugin -* [CB-8568](https://issues.apache.org/jira/browse/CB-8568) Integrate TravisCI -* [CB-8438](https://issues.apache.org/jira/browse/CB-8438) cordova-plugin-geolocation documentation translation: cordova-plugin-geolocation -* [CB-8538](https://issues.apache.org/jira/browse/CB-8538) Added package.json file -* [CB-8443](https://issues.apache.org/jira/browse/CB-8443) Geolocation tests fail on Windows due to done is called multiple times - -### 0.3.12 (Feb 04, 2015) -* [CB-8351](https://issues.apache.org/jira/browse/CB-8351) ios: Use argumentForIndex rather than NSArray extension - -### 0.3.11 (Dec 02, 2014) -* Do not stop updating location when the error is `kCLErrorLocationUnknown` -* [CB-8094](https://issues.apache.org/jira/browse/CB-8094) Pended auto tests for **Windows** Store since they require user interaction -* [CB-8085](https://issues.apache.org/jira/browse/CB-8085) Fix geolocation plugin on **Windows** -* [CB-7977](https://issues.apache.org/jira/browse/CB-7977) Mention `deviceready` in plugin docs -* [CB-7700](https://issues.apache.org/jira/browse/CB-7700) cordova-plugin-geolocation documentation translation: cordova-plugin-geolocation - -### 0.3.10 (Sep 17, 2014) -* [CB-7556](https://issues.apache.org/jira/browse/CB-7556) iOS: Clearing all Watches does not stop Location Services -* [CB-7158](https://issues.apache.org/jira/browse/CB-7158) Fix geolocation for ios 8 -* Revert [CB-6911](https://issues.apache.org/jira/browse/CB-6911) partially (keeping Info.plist key installation for iOS 8) -* [CB-6911](https://issues.apache.org/jira/browse/CB-6911) Geolocation fails in iOS 8 -* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) **Windows 8.1** - Use a new proxy as old geolocation methods is deprecated -* [CB-5114](https://issues.apache.org/jira/browse/CB-5114) Append **Windows 8.1** into plugin.xml + Optimize Windows 8 Geolocation proxy -* Renamed test dir, added nested plugin.xml -* added documentation for manual tests -* [CB-7146](https://issues.apache.org/jira/browse/CB-7146) Added manual tests -* Removed js-module for tests from plugin.xml -* Changing cdvtest format to use module exports -* register tests using new style -* Convert tests to new style -* Removed amazon-fireos code for geolocation. -* [CB-7571](https://issues.apache.org/jira/browse/CB-7571) Bump version of nested plugin to match parent plugin - -### 0.3.9 (Aug 06, 2014) -* **FFOS** update GeolocationProxy.js -* [CB-7187](https://issues.apache.org/jira/browse/CB-7187) ios: Add explicit dependency on CoreLocation.framework -* [CB-7187](https://issues.apache.org/jira/browse/CB-7187) Delete unused #import of CDVShared.h -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Updated translations for docs -* ios: Changed distanceFilter from none to 5 meters, prevents it from spamming the callback even though nothing changed. - -### 0.3.8 (Jun 05, 2014) -* [CB-6127](https://issues.apache.org/jira/browse/CB-6127) Spanish and French Translations added. Github close #14 -* [CB-6804](https://issues.apache.org/jira/browse/CB-6804) Add license -* [CB-5416](https://issues.apache.org/jira/browse/CB-5416) - Adding support for auto-managing permissions -* [CB-6491](https://issues.apache.org/jira/browse/CB-6491) add CONTRIBUTING.md -* pass by only coords -* proper implementation for firefoxos -* call FxOS's getCurrentProxy added - -### 0.3.7 (Apr 17, 2014) -* [CB-6422](https://issues.apache.org/jira/browse/CB-6422): [windows8] use cordova/exec/proxy -* [CB-6212](https://issues.apache.org/jira/browse/CB-6212): [iOS] fix warnings compiled under arm64 64-bit -* [CB-5977](https://issues.apache.org/jira/browse/CB-5977): [android] Removing the Android Geolocation Code. Mission Accomplished. -* [CB-6460](https://issues.apache.org/jira/browse/CB-6460): Update license headers -* Add NOTICE file - -### 0.3.6 (Feb 05, 2014) -* add ubuntu platform support -* [CB-5326](https://issues.apache.org/jira/browse/CB-5326) adding FFOS permission and updating supported platforms -* [CB-5729](https://issues.apache.org/jira/browse/CB-5729) [BlackBerry10] Update GeolocationProxy to return collapsed object - -### 0.3.5 (Jan 02, 2014) -* [CB-5658](https://issues.apache.org/jira/browse/CB-5658) Add doc/index.md for Geolocation plugin -* windows8: adds missing reference to PositionError (w/o it the app crashes) -* Removing incorrectly added closing comments for wp7 platform in plugin.xml - -### 0.3.4 (Dec 4, 2013) -* Append proxy to platform definition in plugin.xml -* Append windows 8 Geolocation proxy -* Code clean-up for android src. -* Updated amazon-fireos platform + reverting some of the fixes in android code. -* Added amazon-fireos platform + some of the fixes in android code. -* [CB-5334](https://issues.apache.org/jira/browse/CB-5334) [BlackBerry10] Use command proxy -* call FxOS's getCurrentProxy added -* pass by only coords -* proper implementation for firefoxos - -### 0.3.3 (Oct 28, 2013) -* [CB-5128](https://issues.apache.org/jira/browse/CB-5128): add repo + issue tag to plugin.xml for geolocation plugin -* [CB-4915](https://issues.apache.org/jira/browse/CB-4915) Incremented plugin version on dev branch. - -### 0.3.2 (Sept 25, 2013) -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) bumping&resetting version -* [BlackBerry10] removed uneeded permission tags in plugin.xml -* [CB-4889](https://issues.apache.org/jira/browse/CB-4889) renaming org.apache.cordova.core.geolocation to org.apache.cordova.geolocation - -### 0.3.0 (Sept 5, 2013) -* Added support for windows 8 (Adds required permission) diff --git a/package.json b/package.json index bd94bc3d..0aae0135 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-geolocation", - "version": "4.0.1-dev", + "version": "4.0.1", "description": "Cordova Geolocation Plugin", "cordova": { "id": "cordova-plugin-geolocation", diff --git a/plugin.xml b/plugin.xml index c3869bb2..d4fe505b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation" - version="4.0.1-dev"> + version="4.0.1"> Geolocation Cordova Geolocation Plugin diff --git a/tests/plugin.xml b/tests/plugin.xml index 1dddb44d..5f969788 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -22,7 +22,7 @@ xmlns:rim="http://www.blackberry.com/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-geolocation-tests" - version="4.0.1-dev"> + version="4.0.1"> Cordova Geolocation Plugin Tests Apache 2.0