17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Android/assets/www/js/index.js:
--------------------------------------------------------------------------------
1 | document.addEventListener('deviceready', onDeviceReady, false);
2 |
3 | // Cordova is ready
4 | function onDeviceReady() {
5 |
6 | // Uncomment to test Retina Layers
7 | // L.Browser.retina = true;
8 |
9 | //Load layers
10 | var windbreaker = L.mapbox.tileLayer('bobbysud.map-0c36p1bf', {
11 | detectRetina:true,
12 | retinaVersion: 'bobbysud.map-qqgc030n',
13 | maxZoom:19
14 | }),
15 | terrain = L.mapbox.tileLayer('bobbysud.map-8owxxni8', {
16 | detectRetina:true,
17 | retinaVersion:'bobbysud.map-tyt3admo',
18 | maxZoom:19
19 | }),
20 | afternoon = L.mapbox.tileLayer('bobbysud.map-cfaq2kkp', {
21 | detectRetina:true,
22 | retinaVersion:'bobbysud.map-15wycltk',
23 | maxZoom:18
24 | })
25 |
26 | //Load map and first layer
27 | var map = L.mapbox.map('map', null,{
28 | layers: [windbreaker],
29 | zoomControl: false,
30 | attributionControl: false,
31 | });
32 |
33 | //Create array of layers
34 | var baseLayers = {
35 | 'Windbreaker': windbreaker,
36 | 'Terrain': terrain,
37 | 'Afternoon': afternoon
38 | };
39 |
40 | //Add layer switcher to map
41 | L.control.layers(baseLayers).addTo(map);
42 |
43 |
44 |
45 | //Specify icon
46 | var myIcon = L.icon({
47 | iconUrl: '../www/img/marker.png',
48 | iconRetinaUrl: '../www/img/marker.png',
49 | iconSize: [38, 95],
50 | iconAnchor: [20, 48],
51 | popupAnchor: [-1, -38],
52 | });
53 |
54 |
55 |
56 | //Create a custom 'on the users location found' function
57 | function onLocationFound(e) {
58 | L.marker(e.latlng,{icon: myIcon}).addTo(map)
59 | .bindPopup('You are here').openPopup();
60 | }
61 |
62 | //Create a custom 'on the users location not found' function
63 | function onLocationError(e) {
64 | //Default location
65 | map.setView([37.7853, -122.4319],14)
66 |
67 | //Alert the user to turn on their location settings. This is a native alert rather than alert('');
68 | navigator.notification.alert(
69 | 'Make sure your location settings are enabled', // message
70 | null, // callback
71 | 'Woops!', // title
72 | 'Done' // buttonName
73 | );
74 | }
75 |
76 | map.on('locationfound', onLocationFound);
77 | map.on('locationerror', onLocationError);
78 |
79 | map.locate({setView: true, maxZoom: 19});
80 |
81 |
82 |
83 | //Place marker function
84 | function placeMarker (e){
85 | var content = "";
86 |
87 | L.marker(e.latlng,{icon:myIcon}).addTo(map)
88 | .bindPopup(content).openPopup();
89 |
90 |
91 | $('.open-camera').onpress(function(){
92 |
93 | navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
94 | destinationType: Camera.DestinationType.DATA_URL
95 | });
96 |
97 | function onSuccess(imageData) {
98 | $('.content').append("")
99 | }
100 |
101 | function onFail(message) {
102 | alert('Failed because: ' + message);
103 | }
104 |
105 | })
106 | }
107 |
108 | map.on('contextmenu',placeMarker)
109 |
110 |
111 |
112 | $('#arrow, #arrow-text').onpress(function(){ //onpress is quicker than click
113 |
114 | var options = { frequency: 100 }; // Update every .1 seconds
115 | var watchID = navigator.compass.watchHeading(onSuccess, onError, options);
116 |
117 | function onSuccess(heading) {
118 | var heading = Math.round(heading.magneticHeading)
119 | $('#arrow-text').html(heading + 'º')
120 |
121 | $('#arrow').css('-webkit-transform','rotate(' + (360 - heading) + 'deg)') //Subtract from 360 so it always points north
122 | };
123 |
124 | function onError(compassError) {
125 | alert('Compass error: ' + compassError.code);
126 | };
127 | })
128 |
129 | }//End onDeviceReady
--------------------------------------------------------------------------------
/Android/assets/www/js/lib/leaflet/images/layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/js/lib/leaflet/images/layers.png
--------------------------------------------------------------------------------
/Android/assets/www/js/lib/leaflet/images/marker-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/js/lib/leaflet/images/marker-icon.png
--------------------------------------------------------------------------------
/Android/assets/www/js/lib/leaflet/images/marker-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/js/lib/leaflet/images/marker-icon@2x.png
--------------------------------------------------------------------------------
/Android/assets/www/js/lib/leaflet/images/marker-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/js/lib/leaflet/images/marker-shadow.png
--------------------------------------------------------------------------------
/Android/assets/www/js/lib/zepto-onpress.js:
--------------------------------------------------------------------------------
1 | /* Author:
2 | Max Degterev @suprMax
3 |
4 | Zepto fast buttons without nasty ghostclicks.
5 | Supports event delegation and handlers removal.
6 | Highly inspired by http://code.google.com/mobile/articles/fast_buttons.html
7 |
8 | Usage:
9 |
10 | bind:
11 | $('#someid').onpress(function(event){});
12 | $('#someid').offpress(function(event){});
13 |
14 | delegation:
15 | $('#someid').onpress('.childNode', function(event){});
16 | $('#someid').offpress('.childNode', function(event){});
17 |
18 | Word of advice:
19 | Never ever try to attach this event handlers to: document, html, body.
20 | All sorts of weirdness going to happen. Use onclick instead.
21 | */
22 | (function(e){e.os.touch=!(typeof window.ontouchstart==="undefined");var t=1e3;var n=function(e){var t,n;if(typeof e[0]==="function"){t=e[0]}else{n=e[0];t=e[1]}return[n,t]};if(e.os.touch){var r=[],i=[],s=[],o=e(document);var u=function(){r.splice(0,2)};var a=function(e){for(var t=0,n=r.length;t10||Math.abs(t.touches[0].pageY-e[1])>10){p()}};var h=function(n){p();f[1].call(this,n);if(n.type==="touchend"){r.push(e[0],e[1]);window.setTimeout(u,t)}};var p=function(){o.off("touchmove.onpress",c);f[0]?a.off("touchend.onpress",f[0],h):a.off("touchend.onpress",h)};i.push(f[1]);s.push(l);if(f[0]){this.on("touchstart.onpress",f[0],l);this.on("press.onpress",f[0],f[1])}else{this.on("touchstart.onpress",l);this.on("press.onpress",f[1])}};e.fn.offpress=function(){var e=n(arguments),t;if(e[1]){t=i.indexOf(e[1]);if(t<0){return}if(e[0]){this.off("touchstart.onpress",e[0],s[t]);this.off("press.onpress",e[0],e[1])}else{this.off("touchstart.onpress",s[t]);this.off("press.onpress",e[1])}i.splice(t,1);s.splice(t,1)}else{if(e[0]){this.off("touchstart.onpress",e[0]);this.off("press.onpress",e[0])}else{this.off("touchstart.onpress");this.off("press.onpress")}}}}else{e.fn.onpress=function(){var e=n(arguments);if(e[0]){this.on("click.onpress",e[0],e[1]);this.on("press.onpress",e[0],e[1])}else{this.on("click.onpress",e[1]);this.on("press.onpress",e[1])}};e.fn.offpress=function(){var e=n(arguments);e[0]?this.off(".onpress",e[0],e[1]):this.off(".onpress",e[1])}}})(window.Zepto||window.jQuery)
--------------------------------------------------------------------------------
/Android/assets/www/res/icon/android/icon-36-ldpi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/icon/android/icon-36-ldpi.png
--------------------------------------------------------------------------------
/Android/assets/www/res/icon/android/icon-48-mdpi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/icon/android/icon-48-mdpi.png
--------------------------------------------------------------------------------
/Android/assets/www/res/icon/android/icon-72-hdpi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/icon/android/icon-72-hdpi.png
--------------------------------------------------------------------------------
/Android/assets/www/res/icon/android/icon-96-xhdpi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/icon/android/icon-96-xhdpi.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-hdpi-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-hdpi-landscape.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-hdpi-portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-hdpi-portrait.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-ldpi-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-ldpi-landscape.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-ldpi-portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-ldpi-portrait.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-mdpi-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-mdpi-landscape.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-mdpi-portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-mdpi-portrait.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-xhdpi-landscape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-xhdpi-landscape.png
--------------------------------------------------------------------------------
/Android/assets/www/res/screen/android/screen-xhdpi-portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/assets/www/res/screen/android/screen-xhdpi-portrait.png
--------------------------------------------------------------------------------
/Android/bin/MapGap.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/MapGap.apk
--------------------------------------------------------------------------------
/Android/bin/classes.dex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes.dex
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/BuildConfig.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/BuildConfig.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/MapGap.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/MapGap.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R$attr.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R$attr.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R$drawable.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R$drawable.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R$layout.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R$layout.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R$string.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R$string.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R$xml.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R$xml.class
--------------------------------------------------------------------------------
/Android/bin/classes/com/MapBox/MapGap/R.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/classes/com/MapBox/MapGap/R.class
--------------------------------------------------------------------------------
/Android/bin/dexedLibs/cordova-2.7.0-45a9989e7c584033a79d24f68422c43c.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/dexedLibs/cordova-2.7.0-45a9989e7c584033a79d24f68422c43c.jar
--------------------------------------------------------------------------------
/Android/bin/jarlist.cache:
--------------------------------------------------------------------------------
1 | # cache for current jar dependecy. DO NOT EDIT.
2 | # format is
3 | # Encoding is UTF-8
4 |
--------------------------------------------------------------------------------
/Android/bin/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/Android/bin/res/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/res/drawable/icon.png
--------------------------------------------------------------------------------
/Android/bin/resources.ap_:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/bin/resources.ap_
--------------------------------------------------------------------------------
/Android/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
29 |
30 |
31 |
35 |
36 |
37 |
38 |
39 |
40 |
49 |
50 |
51 |
52 |
56 |
57 |
69 |
70 |
71 |
89 |
90 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/Android/cordova/appinfo.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/cordova/appinfo.jar
--------------------------------------------------------------------------------
/Android/cordova/build:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #!/bin/bash
19 |
20 | set -e
21 |
22 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
23 |
24 | bash "$CORDOVA_PATH"/cordova build
25 |
--------------------------------------------------------------------------------
/Android/cordova/clean:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #!/bin/bash
19 |
20 | set -e
21 |
22 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
23 |
24 | bash "$CORDOVA_PATH"/cordova clean
25 |
--------------------------------------------------------------------------------
/Android/cordova/log:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #!/bin/bash
19 |
20 | set -e
21 |
22 | CORDOVA_PATH=$( cd "$( dirname "$0" )/.." && pwd )
23 |
24 | bash "$CORDOVA_PATH"/cordova/cordova log
25 |
--------------------------------------------------------------------------------
/Android/cordova/release:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #!/bin/bash
19 |
20 | set -e
21 |
22 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
23 |
24 | bash "$CORDOVA_PATH"/cordova release
25 |
--------------------------------------------------------------------------------
/Android/cordova/run:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | #!/bin/bash
19 |
20 | set -e
21 |
22 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd )
23 |
24 | bash "$CORDOVA_PATH"/cordova run
25 |
--------------------------------------------------------------------------------
/Android/libs/cordova-2.7.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/libs/cordova-2.7.0.jar
--------------------------------------------------------------------------------
/Android/local.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must *NOT* be checked into Version Control Systems,
5 | # as it contains information specific to your local configuration.
6 |
7 | # location of the SDK. This is only used by Ant
8 | # For customization when using a Version Control System, please read the
9 | # header note.
10 | sdk.dir=/Users/BobbySudekum/android-sdks
11 |
--------------------------------------------------------------------------------
/Android/proguard-project.txt:
--------------------------------------------------------------------------------
1 | # To enable ProGuard in your project, edit project.properties
2 | # to define the proguard.config property as described in that file.
3 | #
4 | # Add project specific ProGuard rules here.
5 | # By default, the flags in this file are appended to flags specified
6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt
7 | # You can edit the include path and order by changing the ProGuard
8 | # include property in project.properties.
9 | #
10 | # For more details, see
11 | # http://developer.android.com/guide/developing/tools/proguard.html
12 |
13 | # Add any project specific keep options here:
14 |
15 | # If your project uses WebView with JS, uncomment the following
16 | # and specify the fully qualified class name to the JavaScript interface
17 | # class:
18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
19 | # public *;
20 | #}
21 |
--------------------------------------------------------------------------------
/Android/project.properties:
--------------------------------------------------------------------------------
1 | # This file is automatically generated by Android Tools.
2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3 | #
4 | # This file must be checked in Version Control Systems.
5 | #
6 | # To customize properties used by the Ant build system edit
7 | # "ant.properties", and override values to adapt the script to your
8 | # project structure.
9 | #
10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
12 |
13 | # Project target.
14 | target=android-17
15 |
--------------------------------------------------------------------------------
/Android/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Android/res/drawable-ldpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-ldpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/Android/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/Android/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/Android/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/Android/res/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/Android/res/drawable/icon.png
--------------------------------------------------------------------------------
/Android/res/layout/main.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Android/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | MapGap
4 |
5 |
--------------------------------------------------------------------------------
/Android/res/xml/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/Android/src/com/MapBox/MapGap/MapGap.java:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | package com.MapBox.MapGap;
21 |
22 | import android.os.Bundle;
23 | import org.apache.cordova.*;
24 |
25 | public class MapGap extends DroidGap
26 | {
27 | @Override
28 | public void onCreate(Bundle savedInstanceState)
29 | {
30 | super.onCreate(savedInstanceState);
31 | // Set by in config.xml
32 | super.loadUrl(Config.getStartUrl());
33 | //super.loadUrl("file:///android_asset/www/index.html")
34 | }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDV.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVAvailability.h"
21 |
22 | #import "CDVPlugin.h"
23 | #import "CDVViewController.h"
24 | #import "CDVCommandDelegate.h"
25 | #import "CDVURLProtocol.h"
26 | #import "CDVInvokedUrlCommand.h"
27 |
28 | #import "CDVAccelerometer.h"
29 | #import "CDVBattery.h"
30 | #import "CDVCamera.h"
31 | #import "CDVCapture.h"
32 | #import "CDVConnection.h"
33 | #import "CDVContact.h"
34 | #import "CDVContacts.h"
35 | #import "CDVDebug.h"
36 | #import "CDVDevice.h"
37 | #import "CDVFile.h"
38 | #import "CDVFileTransfer.h"
39 | #import "CDVLocation.h"
40 | #import "CDVNotification.h"
41 | #import "CDVPluginResult.h"
42 | #import "CDVReachability.h"
43 | #import "CDVSound.h"
44 | #import "CDVSplashScreen.h"
45 | #import "CDVWhitelist.h"
46 | #import "CDVLocalStorage.h"
47 | #import "CDVInAppBrowser.h"
48 | #import "CDVScreenOrientationDelegate.h"
49 | #import "CDVTimer.h"
50 |
51 | #import "NSArray+Comparisons.h"
52 | #import "NSData+Base64.h"
53 | #import "NSDictionary+Extensions.h"
54 | #import "NSMutableArray+QueueAdditions.h"
55 | #import "UIDevice+Extensions.h"
56 |
57 | #import "CDVJSON.h"
58 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVAccelerometer.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | @interface CDVAccelerometer : CDVPlugin
24 | {
25 | double x;
26 | double y;
27 | double z;
28 | NSTimeInterval timestamp;
29 | }
30 |
31 | @property (readonly, assign) BOOL isRunning;
32 | @property (nonatomic, strong) NSString* callbackId;
33 |
34 | - (CDVAccelerometer*)init;
35 |
36 | - (void)start:(CDVInvokedUrlCommand*)command;
37 | - (void)stop:(CDVInvokedUrlCommand*)command;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVAvailability.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #define __CORDOVA_IOS__
21 |
22 | #define __CORDOVA_0_9_6 906
23 | #define __CORDOVA_1_0_0 10000
24 | #define __CORDOVA_1_1_0 10100
25 | #define __CORDOVA_1_2_0 10200
26 | #define __CORDOVA_1_3_0 10300
27 | #define __CORDOVA_1_4_0 10400
28 | #define __CORDOVA_1_4_1 10401
29 | #define __CORDOVA_1_5_0 10500
30 | #define __CORDOVA_1_6_0 10600
31 | #define __CORDOVA_1_6_1 10601
32 | #define __CORDOVA_1_7_0 10700
33 | #define __CORDOVA_1_8_0 10800
34 | #define __CORDOVA_1_8_1 10801
35 | #define __CORDOVA_1_9_0 10900
36 | #define __CORDOVA_2_0_0 20000
37 | #define __CORDOVA_2_1_0 20100
38 | #define __CORDOVA_2_2_0 20200
39 | #define __CORDOVA_2_3_0 20300
40 | #define __CORDOVA_2_4_0 20400
41 | #define __CORDOVA_2_5_0 20500
42 | #define __CORDOVA_2_6_0 20600
43 | #define __CORDOVA_2_7_0 20700
44 | #define __CORDOVA_NA 99999 /* not available */
45 |
46 | /*
47 | #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_1_7_0
48 | // do something when its at least 1.7.0
49 | #else
50 | // do something else (non 1.7.0)
51 | #endif
52 | */
53 | #ifndef CORDOVA_VERSION_MIN_REQUIRED
54 | #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_2_7_0
55 | #endif
56 |
57 | /*
58 | Returns YES if it is at least version specified as NSString(X)
59 | Usage:
60 | if (IsAtLeastiOSVersion(@"5.1")) {
61 | // do something for iOS 5.1 or greater
62 | }
63 | */
64 | #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
65 |
66 | #define CDV_IsIPad() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] && ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad))
67 |
68 | #define CDV_IsIPhone5() ([[UIScreen mainScreen] bounds].size.height == 568 && [[UIScreen mainScreen] bounds].size.width == 320)
69 |
70 | /* Return the string version of the decimal version */
71 | #define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \
72 | (CORDOVA_VERSION_MIN_REQUIRED / 10000), \
73 | (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \
74 | (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100]
75 |
76 | #ifdef __clang__
77 | #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
78 | #else
79 | #define CDV_DEPRECATED(version, msg) __attribute__((deprecated()))
80 | #endif
81 |
82 | // Enable this to log all exec() calls.
83 | #define CDV_ENABLE_EXEC_LOGGING 0
84 | #if CDV_ENABLE_EXEC_LOGGING
85 | #define CDV_EXEC_LOG NSLog
86 | #else
87 | #define CDV_EXEC_LOG(...) do {} while (NO)
88 | #endif
89 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVBattery.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | @interface CDVBattery : CDVPlugin {
24 | UIDeviceBatteryState state;
25 | float level;
26 | bool isPlugged;
27 | NSString* callbackId;
28 | }
29 |
30 | @property (nonatomic) UIDeviceBatteryState state;
31 | @property (nonatomic) float level;
32 | @property (nonatomic) bool isPlugged;
33 | @property (strong) NSString* callbackId;
34 |
35 | - (void)updateBatteryStatus:(NSNotification*)notification;
36 | - (NSDictionary*)getBatteryStatus;
37 | - (void)start:(CDVInvokedUrlCommand*)command;
38 | - (void)stop:(CDVInvokedUrlCommand*)command;
39 | - (void)dealloc;
40 | @end
41 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVCamera.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | enum CDVDestinationType {
24 | DestinationTypeDataUrl = 0,
25 | DestinationTypeFileUri,
26 | DestinationTypeNativeUri
27 | };
28 | typedef NSUInteger CDVDestinationType;
29 |
30 | enum CDVEncodingType {
31 | EncodingTypeJPEG = 0,
32 | EncodingTypePNG
33 | };
34 | typedef NSUInteger CDVEncodingType;
35 |
36 | enum CDVMediaType {
37 | MediaTypePicture = 0,
38 | MediaTypeVideo,
39 | MediaTypeAll
40 | };
41 | typedef NSUInteger CDVMediaType;
42 |
43 | @interface CDVCameraPicker : UIImagePickerController
44 | {}
45 |
46 | @property (assign) NSInteger quality;
47 | @property (copy) NSString* callbackId;
48 | @property (copy) NSString* postUrl;
49 | @property (nonatomic) enum CDVDestinationType returnType;
50 | @property (nonatomic) enum CDVEncodingType encodingType;
51 | @property (strong) UIPopoverController* popoverController;
52 | @property (assign) CGSize targetSize;
53 | @property (assign) bool correctOrientation;
54 | @property (assign) bool saveToPhotoAlbum;
55 | @property (assign) bool cropToSize;
56 | @property (strong) UIWebView* webView;
57 | @property (assign) BOOL popoverSupported;
58 |
59 | @end
60 |
61 | // ======================================================================= //
62 |
63 | @interface CDVCamera : CDVPlugin
66 | {}
67 |
68 | @property (strong) CDVCameraPicker* pickerController;
69 |
70 | /*
71 | * getPicture
72 | *
73 | * arguments:
74 | * 1: this is the javascript function that will be called with the results, the first parameter passed to the
75 | * javascript function is the picture as a Base64 encoded string
76 | * 2: this is the javascript function to be called if there was an error
77 | * options:
78 | * quality: integer between 1 and 100
79 | */
80 | - (void)takePicture:(CDVInvokedUrlCommand*)command;
81 | - (void)postImage:(UIImage*)anImage withFilename:(NSString*)filename toUrl:(NSURL*)url;
82 | - (void)cleanup:(CDVInvokedUrlCommand*)command;
83 | - (void)repositionPopover:(CDVInvokedUrlCommand*)command;
84 |
85 | - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*)info;
86 | - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingImage:(UIImage*)image editingInfo:(NSDictionary*)editingInfo;
87 | - (void)imagePickerControllerDidCancel:(UIImagePickerController*)picker;
88 | - (UIImage*)imageByScalingAndCroppingForSize:(UIImage*)anImage toSize:(CGSize)targetSize;
89 | - (UIImage*)imageByScalingNotCroppingForSize:(UIImage*)anImage toSize:(CGSize)frameSize;
90 | - (UIImage*)imageCorrectedForCaptureOrientation:(UIImage*)anImage;
91 |
92 | @end
93 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVCommandDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVAvailability.h"
21 | #import "CDVInvokedUrlCommand.h"
22 |
23 | @class CDVPlugin;
24 | @class CDVPluginResult;
25 | @class CDVWhitelist;
26 |
27 | @protocol CDVCommandDelegate
28 |
29 | @property (nonatomic, readonly) NSDictionary* settings;
30 |
31 | - (NSString*)pathForResource:(NSString*)resourcepath;
32 | - (id)getCommandInstance:(NSString*)pluginName;
33 |
34 | // Plugins should not be using this interface to call other plugins since it
35 | // will result in bogus callbacks being made.
36 | - (BOOL)execute:(CDVInvokedUrlCommand*)command CDV_DEPRECATED(2.2, "Use direct method calls instead.");
37 |
38 | // Sends a plugin result to the JS. This is thread-safe.
39 | - (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId;
40 | // Evaluates the given JS. This is thread-safe.
41 | - (void)evalJs:(NSString*)js;
42 | // Can be used to evaluate JS right away instead of scheduling it on the run-loop.
43 | // This is required for dispatch resign and pause events, but should not be used
44 | // without reason. Without the run-loop delay, alerts used in JS callbacks may result
45 | // in dead-lock. This method must be called from the UI thread.
46 | - (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop;
47 | // Runs the given block on a background thread using a shared thread-pool.
48 | - (void)runInBackground:(void (^)())block;
49 | // Returns the User-Agent of the associated UIWebView.
50 | - (NSString*)userAgent;
51 | // Returns whether the given URL passes the white-list.
52 | - (BOOL)URLIsWhitelisted:(NSURL*)url;
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVCommandDelegateImpl.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVCommandDelegate.h"
22 |
23 | @class CDVViewController;
24 | @class CDVCommandQueue;
25 |
26 | @interface CDVCommandDelegateImpl : NSObject {
27 | @private
28 | __weak CDVViewController* _viewController;
29 | @protected
30 | __weak CDVCommandQueue* _commandQueue;
31 | }
32 | - (id)initWithViewController:(CDVViewController*)viewController;
33 | @end
34 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVCommandQueue.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @class CDVInvokedUrlCommand;
23 | @class CDVViewController;
24 |
25 | @interface CDVCommandQueue : NSObject
26 |
27 | @property (nonatomic, readonly) BOOL currentlyExecuting;
28 |
29 | - (id)initWithViewController:(CDVViewController*)viewController;
30 | - (void)dispose;
31 |
32 | - (void)resetRequestId;
33 | - (void)enqueCommandBatch:(NSString*)batchJSON;
34 |
35 | - (void)maybeFetchCommandsFromJs:(NSNumber*)requestId;
36 | - (void)fetchCommandsFromJs;
37 | - (void)executePending;
38 | - (BOOL)execute:(CDVInvokedUrlCommand*)command;
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVConfigParser.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | @interface CDVConfigParser : NSObject {}
21 |
22 | @property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict;
23 | @property (nonatomic, readonly, strong) NSMutableDictionary* settings;
24 | @property (nonatomic, readonly, strong) NSMutableArray* whitelistHosts;
25 | @property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames;
26 | @property (nonatomic, readonly, strong) NSString* startPage;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVConfigParser.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVConfigParser.h"
21 |
22 | @interface CDVConfigParser ()
23 |
24 | @property (nonatomic, readwrite, strong) NSMutableDictionary* pluginsDict;
25 | @property (nonatomic, readwrite, strong) NSMutableDictionary* settings;
26 | @property (nonatomic, readwrite, strong) NSMutableArray* whitelistHosts;
27 | @property (nonatomic, readwrite, strong) NSMutableArray* startupPluginNames;
28 | @property (nonatomic, readwrite, strong) NSString* startPage;
29 |
30 | @end
31 |
32 | @implementation CDVConfigParser
33 |
34 | @synthesize pluginsDict, settings, whitelistHosts, startPage, startupPluginNames;
35 |
36 | - (id)init
37 | {
38 | self = [super init];
39 | if (self != nil) {
40 | self.pluginsDict = [[NSMutableDictionary alloc] initWithCapacity:30];
41 | self.settings = [[NSMutableDictionary alloc] initWithCapacity:30];
42 | self.whitelistHosts = [[NSMutableArray alloc] initWithCapacity:30];
43 | self.startupPluginNames = [[NSMutableArray alloc] initWithCapacity:8];
44 | }
45 | return self;
46 | }
47 |
48 | - (void)parser:(NSXMLParser*)parser didStartElement:(NSString*)elementName namespaceURI:(NSString*)namespaceURI qualifiedName:(NSString*)qualifiedName attributes:(NSDictionary*)attributeDict
49 | {
50 | if ([elementName isEqualToString:@"preference"]) {
51 | settings[attributeDict[@"name"]] = attributeDict[@"value"];
52 | } else if ([elementName isEqualToString:@"plugin"]) {
53 | NSString* name = [attributeDict[@"name"] lowercaseString];
54 | pluginsDict[name] = attributeDict[@"value"];
55 | if ([@"true" isEqualToString : attributeDict[@"onload"]]) {
56 | [self.startupPluginNames addObject:name];
57 | }
58 | } else if ([elementName isEqualToString:@"access"]) {
59 | [whitelistHosts addObject:attributeDict[@"origin"]];
60 | } else if ([elementName isEqualToString:@"content"]) {
61 | self.startPage = attributeDict[@"src"];
62 | }
63 | }
64 |
65 | - (void)parser:(NSXMLParser*)parser parseErrorOccurred:(NSError*)parseError
66 | {
67 | NSAssert(NO, @"config.xml parse error line %d col %d", [parser lineNumber], [parser columnNumber]);
68 | }
69 |
70 | @end
71 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVConnection.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 | #import "CDVReachability.h"
23 |
24 | @interface CDVConnection : CDVPlugin {
25 | NSString* type;
26 | NSString* _callbackId;
27 |
28 | CDVReachability* internetReach;
29 | }
30 |
31 | @property (copy) NSString* connectionType;
32 | @property (strong) CDVReachability* internetReach;
33 |
34 | @end
35 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVDebug.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #ifdef DEBUG
21 | #define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
22 | #else
23 | #define DLog(...)
24 | #endif
25 | #define ALog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
26 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVDevice.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | @interface CDVDevice : CDVPlugin
24 | {}
25 |
26 | + (NSString*)cordovaVersion;
27 |
28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVDevice.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #include
21 | #include
22 |
23 | #import "CDV.h"
24 |
25 | @implementation UIDevice (ModelVersion)
26 |
27 | - (NSString*)modelVersion
28 | {
29 | size_t size;
30 |
31 | sysctlbyname("hw.machine", NULL, &size, NULL, 0);
32 | char* machine = malloc(size);
33 | sysctlbyname("hw.machine", machine, &size, NULL, 0);
34 | NSString* platform = [NSString stringWithUTF8String:machine];
35 | free(machine);
36 |
37 | return platform;
38 | }
39 |
40 | @end
41 |
42 | @interface CDVDevice () {}
43 | @end
44 |
45 | @implementation CDVDevice
46 |
47 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
48 | {
49 | NSDictionary* deviceProperties = [self deviceProperties];
50 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
51 |
52 | /* Settings.plist
53 | * Read the optional Settings.plist file and push these user-defined settings down into the web application.
54 | * This can be useful for supplying build-time configuration variables down to the app to change its behavior,
55 | * such as specifying Full / Lite version, or localization (English vs German, for instance).
56 | */
57 | // TODO: turn this into an iOS only plugin
58 | NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"];
59 |
60 | if ([temp respondsToSelector:@selector(JSONString)]) {
61 | NSLog(@"Deprecation warning: window.Setting will be removed Aug 2013. Refer to https://issues.apache.org/jira/browse/CB-2433");
62 | NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]];
63 | [self.commandDelegate evalJs:js];
64 | }
65 |
66 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
67 | }
68 |
69 | - (NSDictionary*)deviceProperties
70 | {
71 | UIDevice* device = [UIDevice currentDevice];
72 | NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
73 |
74 | [devProps setObject:[device modelVersion] forKey:@"model"];
75 | [devProps setObject:@"iOS" forKey:@"platform"];
76 | [devProps setObject:[device systemVersion] forKey:@"version"];
77 | [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"];
78 | [devProps setObject:[device model] forKey:@"name"];
79 | [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
80 |
81 | NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
82 | return devReturn;
83 | }
84 |
85 | + (NSString*)cordovaVersion
86 | {
87 | return CDV_VERSION;
88 | }
89 |
90 | @end
91 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVEcho.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVPlugin.h"
21 |
22 | @interface CDVEcho : CDVPlugin
23 | @end
24 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVEcho.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVEcho.h"
21 | #import "CDV.h"
22 |
23 | @implementation CDVEcho
24 |
25 | - (void)echo:(CDVInvokedUrlCommand*)command
26 | {
27 | id message = [command.arguments objectAtIndex:0];
28 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
29 |
30 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
31 | }
32 |
33 | - (void)echoAsyncHelper:(NSArray*)args
34 | {
35 | [self.commandDelegate sendPluginResult:[args objectAtIndex:0] callbackId:[args objectAtIndex:1]];
36 | }
37 |
38 | - (void)echoAsync:(CDVInvokedUrlCommand*)command
39 | {
40 | id message = [command.arguments objectAtIndex:0];
41 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message];
42 |
43 | [self performSelector:@selector(echoAsyncHelper:) withObject:[NSArray arrayWithObjects:pluginResult, command.callbackId, nil] afterDelay:0];
44 | }
45 |
46 | - (void)echoArrayBuffer:(CDVInvokedUrlCommand*)command
47 | {
48 | id message = [command.arguments objectAtIndex:0];
49 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsArrayBuffer:message];
50 |
51 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
52 | }
53 |
54 | - (void)echoMultiPart:(CDVInvokedUrlCommand*)command
55 | {
56 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsMultipart:command.arguments];
57 |
58 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
59 | }
60 |
61 | @end
62 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVExif.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #ifndef CordovaLib_ExifData_h
21 | #define CordovaLib_ExifData_h
22 |
23 | // exif data types
24 | typedef enum exifDataTypes {
25 | EDT_UBYTE = 1, // 8 bit unsigned integer
26 | EDT_ASCII_STRING, // 8 bits containing 7 bit ASCII code, null terminated
27 | EDT_USHORT, // 16 bit unsigned integer
28 | EDT_ULONG, // 32 bit unsigned integer
29 | EDT_URATIONAL, // 2 longs, first is numerator and second is denominator
30 | EDT_SBYTE,
31 | EDT_UNDEFINED, // 8 bits
32 | EDT_SSHORT,
33 | EDT_SLONG, // 32bit signed integer (2's complement)
34 | EDT_SRATIONAL, // 2 SLONGS, first long is numerator, second is denominator
35 | EDT_SINGLEFLOAT,
36 | EDT_DOUBLEFLOAT
37 | } ExifDataTypes;
38 |
39 | // maps integer code for exif data types to width in bytes
40 | static const int DataTypeToWidth[] = {1,1,2,4,8,1,1,2,4,8,4,8};
41 |
42 | static const int RECURSE_HORIZON = 8;
43 | #endif
44 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVFileTransfer.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | enum CDVFileTransferError {
24 | FILE_NOT_FOUND_ERR = 1,
25 | INVALID_URL_ERR = 2,
26 | CONNECTION_ERR = 3,
27 | CONNECTION_ABORTED = 4
28 | };
29 | typedef int CDVFileTransferError;
30 |
31 | enum CDVFileTransferDirection {
32 | CDV_TRANSFER_UPLOAD = 1,
33 | CDV_TRANSFER_DOWNLOAD = 2,
34 | };
35 | typedef int CDVFileTransferDirection;
36 |
37 | // Magic value within the options dict used to set a cookie.
38 | extern NSString* const kOptionsKeyCookie;
39 |
40 | @interface CDVFileTransfer : CDVPlugin {}
41 |
42 | - (void)upload:(CDVInvokedUrlCommand*)command;
43 | - (void)download:(CDVInvokedUrlCommand*)command;
44 | - (NSString*)escapePathComponentForUrlString:(NSString*)urlString;
45 |
46 | // Visible for testing.
47 | - (NSURLRequest*)requestForUploadCommand:(CDVInvokedUrlCommand*)command fileData:(NSData*)fileData;
48 | - (NSMutableDictionary*)createFileTransferError:(int)code AndSource:(NSString*)source AndTarget:(NSString*)target;
49 |
50 | - (NSMutableDictionary*)createFileTransferError:(int)code
51 | AndSource:(NSString*)source
52 | AndTarget:(NSString*)target
53 | AndHttpStatus:(int)httpStatus
54 | AndBody:(NSString*)body;
55 | @property (readonly) NSMutableDictionary* activeTransfers;
56 | @property (nonatomic, assign) UIBackgroundTaskIdentifier backgroundTaskID;
57 | @end
58 |
59 | @class CDVFileTransferEntityLengthRequest;
60 |
61 | @interface CDVFileTransferDelegate : NSObject {}
62 |
63 | - (void)updateBytesExpected:(NSInteger)newBytesExpected;
64 |
65 | @property (strong) NSMutableData* responseData; // atomic
66 | @property (nonatomic, strong) CDVFileTransfer* command;
67 | @property (nonatomic, assign) CDVFileTransferDirection direction;
68 | @property (nonatomic, strong) NSURLConnection* connection;
69 | @property (nonatomic, copy) NSString* callbackId;
70 | @property (nonatomic, copy) NSString* objectId;
71 | @property (nonatomic, copy) NSString* source;
72 | @property (nonatomic, copy) NSString* target;
73 | @property (nonatomic, copy) NSString* mimeType;
74 | @property (assign) int responseCode; // atomic
75 | @property (nonatomic, assign) NSInteger bytesTransfered;
76 | @property (nonatomic, assign) NSInteger bytesExpected;
77 | @property (nonatomic, assign) BOOL trustAllHosts;
78 | @property (strong) NSFileHandle* targetFileHandle;
79 | @property (nonatomic, strong) CDVFileTransferEntityLengthRequest* entityLengthRequest;
80 |
81 | @end;
82 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVInAppBrowser.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVPlugin.h"
21 | #import "CDVInvokedUrlCommand.h"
22 | #import "CDVScreenOrientationDelegate.h"
23 | #import "CDVWebViewDelegate.h"
24 |
25 | @class CDVInAppBrowserViewController;
26 |
27 | @interface CDVInAppBrowser : CDVPlugin {
28 | BOOL _injectedIframeBridge;
29 | }
30 |
31 | @property (nonatomic, retain) CDVInAppBrowserViewController* inAppBrowserViewController;
32 | @property (nonatomic, copy) NSString* callbackId;
33 |
34 | - (void)open:(CDVInvokedUrlCommand*)command;
35 | - (void)close:(CDVInvokedUrlCommand*)command;
36 | - (void)injectScriptCode:(CDVInvokedUrlCommand*)command;
37 |
38 | @end
39 |
40 | @interface CDVInAppBrowserViewController : UIViewController {
41 | @private
42 | NSString* _userAgent;
43 | NSString* _prevUserAgent;
44 | NSInteger _userAgentLockToken;
45 | CDVWebViewDelegate* _webViewDelegate;
46 | }
47 |
48 | @property (nonatomic, strong) IBOutlet UIWebView* webView;
49 | @property (nonatomic, strong) IBOutlet UIBarButtonItem* closeButton;
50 | @property (nonatomic, strong) IBOutlet UILabel* addressLabel;
51 | @property (nonatomic, strong) IBOutlet UIBarButtonItem* backButton;
52 | @property (nonatomic, strong) IBOutlet UIBarButtonItem* forwardButton;
53 | @property (nonatomic, strong) IBOutlet UIActivityIndicatorView* spinner;
54 | @property (nonatomic, strong) IBOutlet UIToolbar* toolbar;
55 |
56 | @property (nonatomic, weak) id orientationDelegate;
57 | @property (nonatomic, weak) CDVInAppBrowser* navigationDelegate;
58 | @property (nonatomic) NSURL* currentURL;
59 |
60 | - (void)close;
61 | - (void)navigateTo:(NSURL*)url;
62 | - (void)showLocationBar:(BOOL)show;
63 |
64 | - (id)initWithUserAgent:(NSString*)userAgent prevUserAgent:(NSString*)prevUserAgent;
65 |
66 | @end
67 |
68 | @interface CDVInAppBrowserOptions : NSObject {}
69 |
70 | @property (nonatomic, assign) BOOL location;
71 | @property (nonatomic, copy) NSString* presentationstyle;
72 | @property (nonatomic, copy) NSString* transitionstyle;
73 |
74 | @property (nonatomic, assign) BOOL enableviewportscale;
75 | @property (nonatomic, assign) BOOL mediaplaybackrequiresuseraction;
76 | @property (nonatomic, assign) BOOL allowinlinemediaplayback;
77 | @property (nonatomic, assign) BOOL keyboarddisplayrequiresuseraction;
78 | @property (nonatomic, assign) BOOL suppressesincrementalrendering;
79 |
80 | + (CDVInAppBrowserOptions*)parseOptions:(NSString*)options;
81 |
82 | @end
83 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVInvokedUrlCommand.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVInvokedUrlCommand : NSObject {
23 | NSString* _callbackId;
24 | NSString* _className;
25 | NSString* _methodName;
26 | NSArray* _arguments;
27 | }
28 |
29 | @property (nonatomic, readonly) NSArray* arguments;
30 | @property (nonatomic, readonly) NSString* callbackId;
31 | @property (nonatomic, readonly) NSString* className;
32 | @property (nonatomic, readonly) NSString* methodName;
33 |
34 | + (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry;
35 |
36 | - (id)initWithArguments:(NSArray*)arguments
37 | callbackId:(NSString*)callbackId
38 | className:(NSString*)className
39 | methodName:(NSString*)methodName;
40 |
41 | - (id)initFromJson:(NSArray*)jsonEntry;
42 |
43 | // The first NSDictionary found in the arguments will be returned in legacyDict.
44 | // The arguments array with be prepended with the callbackId and have the first
45 | // dict removed from it.
46 | - (void)legacyArguments:(NSMutableArray**)legacyArguments andDict:(NSMutableDictionary**)legacyDict;
47 |
48 | // Returns the argument at the given index.
49 | // If index >= the number of arguments, returns nil.
50 | // If the argument at the given index is NSNull, returns nil.
51 | - (id)argumentAtIndex:(NSUInteger)index;
52 | // Same as above, but returns defaultValue instead of nil.
53 | - (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue;
54 | // Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue
55 | - (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass;
56 |
57 | @end
58 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVJSON.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | @interface NSArray (CDVJSONSerializing)
21 | - (NSString*)JSONString;
22 | @end
23 |
24 | @interface NSDictionary (CDVJSONSerializing)
25 | - (NSString*)JSONString;
26 | @end
27 |
28 | @interface NSString (CDVJSONSerializing)
29 | - (id)JSONObject;
30 | @end
31 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVJSON.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVJSON.h"
21 | #import
22 |
23 | @implementation NSArray (CDVJSONSerializing)
24 |
25 | - (NSString*)JSONString
26 | {
27 | NSError* error = nil;
28 | NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
29 | options:NSJSONWritingPrettyPrinted
30 | error:&error];
31 |
32 | if (error != nil) {
33 | NSLog(@"NSArray JSONString error: %@", [error localizedDescription]);
34 | return nil;
35 | } else {
36 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
37 | }
38 | }
39 |
40 | @end
41 |
42 | @implementation NSDictionary (CDVJSONSerializing)
43 |
44 | - (NSString*)JSONString
45 | {
46 | NSError* error = nil;
47 | NSData* jsonData = [NSJSONSerialization dataWithJSONObject:self
48 | options:NSJSONWritingPrettyPrinted
49 | error:&error];
50 |
51 | if (error != nil) {
52 | NSLog(@"NSDictionary JSONString error: %@", [error localizedDescription]);
53 | return nil;
54 | } else {
55 | return [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
56 | }
57 | }
58 |
59 | @end
60 |
61 | @implementation NSString (CDVJSONSerializing)
62 |
63 | - (id)JSONObject
64 | {
65 | NSError* error = nil;
66 | id object = [NSJSONSerialization JSONObjectWithData:[self dataUsingEncoding:NSUTF8StringEncoding]
67 | options:kNilOptions
68 | error:&error];
69 |
70 | if (error != nil) {
71 | NSLog(@"NSString JSONObject error: %@", [error localizedDescription]);
72 | }
73 |
74 | return object;
75 | }
76 |
77 | @end
78 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVJpegHeaderWriter.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVJpegHeaderWriter : NSObject {
23 | NSDictionary * SubIFDTagFormatDict;
24 | NSDictionary * IFD0TagFormatDict;
25 | }
26 |
27 | - (NSData*) spliceExifBlockIntoJpeg: (NSData*) jpegdata
28 | withExifBlock: (NSString*) exifstr;
29 | - (NSString*) createExifAPP1 : (NSDictionary*) datadict;
30 | - (NSString*) formattedHexStringFromDecimalNumber: (NSNumber*) numb
31 | withPlaces: (NSNumber*) width;
32 | - (NSString*) formatNumberWithLeadingZeroes: (NSNumber*) numb
33 | withPlaces: (NSNumber*) places;
34 | - (NSString*) decimalToUnsignedRational: (NSNumber*) numb
35 | withResultNumerator: (NSNumber**) numerator
36 | withResultDenominator: (NSNumber**) denominator;
37 | - (void) continuedFraction: (double) val
38 | withFractionList: (NSMutableArray*) fractionlist
39 | withHorizon: (int) horizon;
40 | //- (void) expandContinuedFraction: (NSArray*) fractionlist;
41 | - (void) splitDouble: (double) val
42 | withIntComponent: (int*) rightside
43 | withFloatRemainder: (double*) leftside;
44 | - (NSString*) formatRationalWithNumerator: (NSNumber*) numerator
45 | withDenominator: (NSNumber*) denominator
46 | asSigned: (Boolean) signedFlag;
47 | - (NSString*) hexStringFromData : (NSData*) data;
48 | - (NSNumber*) numericFromHexString : (NSString *) hexstring;
49 |
50 | /*
51 | - (void) readExifMetaData : (NSData*) imgdata;
52 | - (void) spliceImageData : (NSData*) imgdata withExifData: (NSDictionary*) exifdata;
53 | - (void) locateExifMetaData : (NSData*) imgdata;
54 | - (NSString*) createExifAPP1 : (NSDictionary*) datadict;
55 | - (void) createExifDataString : (NSDictionary*) datadict;
56 | - (NSString*) createDataElement : (NSString*) element
57 | withElementData: (NSString*) data
58 | withExternalDataBlock: (NSDictionary*) memblock;
59 | - (NSString*) hexStringFromData : (NSData*) data;
60 | - (NSNumber*) numericFromHexString : (NSString *) hexstring;
61 | */
62 | @end
63 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVLocalStorage.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVPlugin.h"
21 |
22 | #define kCDVLocalStorageErrorDomain @"kCDVLocalStorageErrorDomain"
23 | #define kCDVLocalStorageFileOperationError 1
24 |
25 | @interface CDVLocalStorage : CDVPlugin
26 |
27 | @property (nonatomic, readonly, strong) NSMutableArray* backupInfo;
28 |
29 | - (BOOL)shouldBackup;
30 | - (BOOL)shouldRestore;
31 | - (void)backup:(CDVInvokedUrlCommand*)command;
32 | - (void)restore:(CDVInvokedUrlCommand*)command;
33 |
34 | + (void)__fixupDatabaseLocationsWithBackupType:(NSString*)backupType;
35 | // Visible for testing.
36 | + (BOOL)__verifyAndFixDatabaseLocationsWithAppPlistDict:(NSMutableDictionary*)appPlistDict
37 | bundlePath:(NSString*)bundlePath
38 | fileManager:(NSFileManager*)fileManager;
39 | @end
40 |
41 | @interface CDVBackupInfo : NSObject
42 |
43 | @property (nonatomic, copy) NSString* original;
44 | @property (nonatomic, copy) NSString* backup;
45 | @property (nonatomic, copy) NSString* label;
46 |
47 | - (BOOL)shouldBackup;
48 | - (BOOL)shouldRestore;
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVLocation.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import "CDVPlugin.h"
23 |
24 | enum CDVHeadingStatus {
25 | HEADINGSTOPPED = 0,
26 | HEADINGSTARTING,
27 | HEADINGRUNNING,
28 | HEADINGERROR
29 | };
30 | typedef NSUInteger CDVHeadingStatus;
31 |
32 | enum CDVLocationStatus {
33 | PERMISSIONDENIED = 1,
34 | POSITIONUNAVAILABLE,
35 | TIMEOUT
36 | };
37 | typedef NSUInteger CDVLocationStatus;
38 |
39 | // simple object to keep track of heading information
40 | @interface CDVHeadingData : NSObject {}
41 |
42 | @property (nonatomic, assign) CDVHeadingStatus headingStatus;
43 | @property (nonatomic, strong) CLHeading* headingInfo;
44 | @property (nonatomic, strong) NSMutableArray* headingCallbacks;
45 | @property (nonatomic, copy) NSString* headingFilter;
46 | @property (nonatomic, strong) NSDate* headingTimestamp;
47 | @property (assign) NSInteger timeout;
48 |
49 | @end
50 |
51 | // simple object to keep track of location information
52 | @interface CDVLocationData : NSObject {
53 | CDVLocationStatus locationStatus;
54 | NSMutableArray* locationCallbacks;
55 | NSMutableDictionary* watchCallbacks;
56 | CLLocation* locationInfo;
57 | }
58 |
59 | @property (nonatomic, assign) CDVLocationStatus locationStatus;
60 | @property (nonatomic, strong) CLLocation* locationInfo;
61 | @property (nonatomic, strong) NSMutableArray* locationCallbacks;
62 | @property (nonatomic, strong) NSMutableDictionary* watchCallbacks;
63 |
64 | @end
65 |
66 | @interface CDVLocation : CDVPlugin {
67 | @private BOOL __locationStarted;
68 | @private BOOL __highAccuracyEnabled;
69 | CDVHeadingData* headingData;
70 | CDVLocationData* locationData;
71 | }
72 |
73 | @property (nonatomic, strong) CLLocationManager* locationManager;
74 | @property (strong) CDVHeadingData* headingData;
75 | @property (nonatomic, strong) CDVLocationData* locationData;
76 |
77 | - (BOOL)hasHeadingSupport;
78 | - (void)getLocation:(CDVInvokedUrlCommand*)command;
79 | - (void)addWatch:(CDVInvokedUrlCommand*)command;
80 | - (void)clearWatch:(CDVInvokedUrlCommand*)command;
81 | - (void)returnLocationInfo:(NSString*)callbackId andKeepCallback:(BOOL)keepCallback;
82 | - (void)returnLocationError:(NSUInteger)errorCode withMessage:(NSString*)message;
83 | - (void)startLocation:(BOOL)enableHighAccuracy;
84 |
85 | - (void)locationManager:(CLLocationManager*)manager
86 | didUpdateToLocation:(CLLocation*)newLocation
87 | fromLocation:(CLLocation*)oldLocation;
88 |
89 | - (void)locationManager:(CLLocationManager*)manager
90 | didFailWithError:(NSError*)error;
91 |
92 | - (BOOL)isLocationServicesEnabled;
93 |
94 | - (void)getHeading:(CDVInvokedUrlCommand*)command;
95 | - (void)returnHeadingInfo:(NSString*)callbackId keepCallback:(BOOL)bRetain;
96 | - (void)watchHeadingFilter:(CDVInvokedUrlCommand*)command;
97 | - (void)stopHeading:(CDVInvokedUrlCommand*)command;
98 | - (void)startHeadingWithFilter:(CLLocationDegrees)filter;
99 | - (void)locationManager:(CLLocationManager*)manager
100 | didUpdateHeading:(CLHeading*)heading;
101 |
102 | - (BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager*)manager;
103 |
104 | @end
105 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVLogger.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVPlugin.h"
21 |
22 | @interface CDVLogger : CDVPlugin
23 |
24 | - (void)logLevel:(CDVInvokedUrlCommand*)command;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVLogger.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVLogger.h"
21 | #import "CDV.h"
22 |
23 | @implementation CDVLogger
24 |
25 | /* log a message */
26 | - (void)logLevel:(CDVInvokedUrlCommand*)command
27 | {
28 | id level = [command.arguments objectAtIndex:0];
29 | id message = [command.arguments objectAtIndex:1];
30 |
31 | if ([level isEqualToString:@"LOG"]) {
32 | NSLog(@"%@", message);
33 | } else {
34 | NSLog(@"%@: %@", level, message);
35 | }
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVNotification.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import
23 | #import "CDVPlugin.h"
24 |
25 | @interface CDVNotification : CDVPlugin {}
26 |
27 | - (void)alert:(CDVInvokedUrlCommand*)command;
28 | - (void)confirm:(CDVInvokedUrlCommand*)command;
29 | - (void)prompt:(CDVInvokedUrlCommand*)command;
30 | - (void)vibrate:(CDVInvokedUrlCommand*)command;
31 |
32 | @end
33 |
34 | @interface CDVAlertView : UIAlertView {}
35 | @property (nonatomic, copy) NSString* callbackId;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVPlugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import "CDVPluginResult.h"
23 | #import "NSMutableArray+QueueAdditions.h"
24 | #import "CDVCommandDelegate.h"
25 |
26 | extern NSString* const CDVPageDidLoadNotification;
27 | extern NSString* const CDVPluginHandleOpenURLNotification;
28 | extern NSString* const CDVPluginResetNotification;
29 | extern NSString* const CDVLocalNotification;
30 |
31 | @interface CDVPlugin : NSObject {}
32 |
33 | @property (nonatomic, weak) UIWebView* webView;
34 | @property (nonatomic, weak) UIViewController* viewController;
35 | @property (nonatomic, weak) id commandDelegate;
36 |
37 | @property (readonly, assign) BOOL hasPendingOperation;
38 |
39 | - (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
40 | - (void)pluginInitialize;
41 |
42 | - (void)handleOpenURL:(NSNotification*)notification;
43 | - (void)onAppTerminate;
44 | - (void)onMemoryWarning;
45 | - (void)onReset;
46 | - (void)dispose;
47 |
48 | /*
49 | // see initWithWebView implementation
50 | - (void) onPause {}
51 | - (void) onResume {}
52 | - (void) onOrientationWillChange {}
53 | - (void) onOrientationDidChange {}
54 | - (void)didReceiveLocalNotification:(NSNotification *)notification;
55 | */
56 |
57 | - (id)appDelegate;
58 |
59 | // TODO(agrieve): Deprecate these in favour of using CDVCommandDelegate directly.
60 | - (NSString*)writeJavascript:(NSString*)javascript;
61 | - (NSString*)success:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;
62 | - (NSString*)error:(CDVPluginResult*)pluginResult callbackId:(NSString*)callbackId;
63 |
64 | @end
65 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVPluginResult.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | typedef enum {
23 | CDVCommandStatus_NO_RESULT = 0,
24 | CDVCommandStatus_OK,
25 | CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
26 | CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
27 | CDVCommandStatus_INSTANTIATION_EXCEPTION,
28 | CDVCommandStatus_MALFORMED_URL_EXCEPTION,
29 | CDVCommandStatus_IO_EXCEPTION,
30 | CDVCommandStatus_INVALID_ACTION,
31 | CDVCommandStatus_JSON_EXCEPTION,
32 | CDVCommandStatus_ERROR
33 | } CDVCommandStatus;
34 |
35 | @interface CDVPluginResult : NSObject {}
36 |
37 | @property (nonatomic, strong, readonly) NSNumber* status;
38 | @property (nonatomic, strong, readonly) id message;
39 | @property (nonatomic, strong) NSNumber* keepCallback;
40 | // This property can be used to scope the lifetime of another object. For example,
41 | // Use it to store the associated NSData when `message` is created using initWithBytesNoCopy.
42 | @property (nonatomic, strong) id associatedObject;
43 |
44 | - (CDVPluginResult*)init;
45 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal;
46 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage;
47 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage;
48 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage;
49 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage;
50 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage;
51 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage;
52 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage;
53 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages;
54 | + (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode;
55 |
56 | + (void)setVerbose:(BOOL)verbose;
57 | + (BOOL)isVerbose;
58 |
59 | - (void)setKeepCallbackAsBool:(BOOL)bKeepCallback;
60 |
61 | - (NSString*)argumentsAsJSON;
62 |
63 | // These methods are used by the legacy plugin return result method
64 | - (NSString*)toJSONString;
65 | - (NSString*)toSuccessCallbackString:(NSString*)callbackId;
66 | - (NSString*)toErrorCallbackString:(NSString*)callbackId;
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVReachability.h:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | File: Reachability.h
4 | Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs.
5 | Version: 2.2
6 |
7 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc.
8 | ("Apple") in consideration of your agreement to the following terms, and your
9 | use, installation, modification or redistribution of this Apple software
10 | constitutes acceptance of these terms. If you do not agree with these terms,
11 | please do not use, install, modify or redistribute this Apple software.
12 |
13 | In consideration of your agreement to abide by the following terms, and subject
14 | to these terms, Apple grants you a personal, non-exclusive license, under
15 | Apple's copyrights in this original Apple software (the "Apple Software"), to
16 | use, reproduce, modify and redistribute the Apple Software, with or without
17 | modifications, in source and/or binary forms; provided that if you redistribute
18 | the Apple Software in its entirety and without modifications, you must retain
19 | this notice and the following text and disclaimers in all such redistributions
20 | of the Apple Software.
21 | Neither the name, trademarks, service marks or logos of Apple Inc. may be used
22 | to endorse or promote products derived from the Apple Software without specific
23 | prior written permission from Apple. Except as expressly stated in this notice,
24 | no other rights or licenses, express or implied, are granted by Apple herein,
25 | including but not limited to any patent rights that may be infringed by your
26 | derivative works or by other works in which the Apple Software may be
27 | incorporated.
28 |
29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
30 | WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
31 | WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32 | PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
33 | COMBINATION WITH YOUR PRODUCTS.
34 |
35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
36 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
37 | GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 | ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR
39 | DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF
40 | CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF
41 | APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
42 |
43 | Copyright (C) 2010 Apple Inc. All Rights Reserved.
44 |
45 | */
46 |
47 | #import
48 | #import
49 | #import
50 |
51 | typedef enum {
52 | NotReachable = 0,
53 | ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons
54 | ReachableViaWiFi // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons
55 | } NetworkStatus;
56 | #define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification"
57 |
58 | @interface CDVReachability : NSObject
59 | {
60 | BOOL localWiFiRef;
61 | SCNetworkReachabilityRef reachabilityRef;
62 | }
63 |
64 | // reachabilityWithHostName- Use to check the reachability of a particular host name.
65 | + (CDVReachability*)reachabilityWithHostName:(NSString*)hostName;
66 |
67 | // reachabilityWithAddress- Use to check the reachability of a particular IP address.
68 | + (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress;
69 |
70 | // reachabilityForInternetConnection- checks whether the default route is available.
71 | // Should be used by applications that do not connect to a particular host
72 | + (CDVReachability*)reachabilityForInternetConnection;
73 |
74 | // reachabilityForLocalWiFi- checks whether a local wifi connection is available.
75 | + (CDVReachability*)reachabilityForLocalWiFi;
76 |
77 | // Start listening for reachability notifications on the current run loop
78 | - (BOOL)startNotifier;
79 | - (void)stopNotifier;
80 |
81 | - (NetworkStatus)currentReachabilityStatus;
82 | // WWAN may be available, but not active until a connection has been established.
83 | // WiFi may require a connection for VPN on Demand.
84 | - (BOOL)connectionRequired;
85 | @end
86 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVScreenOrientationDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @protocol CDVScreenOrientationDelegate
23 |
24 | - (NSUInteger)supportedInterfaceOrientations;
25 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation;
26 | - (BOOL)shouldAutorotate;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVSound.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import
23 |
24 | #import "CDVPlugin.h"
25 |
26 | enum CDVMediaError {
27 | MEDIA_ERR_ABORTED = 1,
28 | MEDIA_ERR_NETWORK = 2,
29 | MEDIA_ERR_DECODE = 3,
30 | MEDIA_ERR_NONE_SUPPORTED = 4
31 | };
32 | typedef NSUInteger CDVMediaError;
33 |
34 | enum CDVMediaStates {
35 | MEDIA_NONE = 0,
36 | MEDIA_STARTING = 1,
37 | MEDIA_RUNNING = 2,
38 | MEDIA_PAUSED = 3,
39 | MEDIA_STOPPED = 4
40 | };
41 | typedef NSUInteger CDVMediaStates;
42 |
43 | enum CDVMediaMsg {
44 | MEDIA_STATE = 1,
45 | MEDIA_DURATION = 2,
46 | MEDIA_POSITION = 3,
47 | MEDIA_ERROR = 9
48 | };
49 | typedef NSUInteger CDVMediaMsg;
50 |
51 | @interface CDVAudioPlayer : AVAudioPlayer
52 | {
53 | NSString* mediaId;
54 | }
55 | @property (nonatomic, copy) NSString* mediaId;
56 | @end
57 |
58 | @interface CDVAudioRecorder : AVAudioRecorder
59 | {
60 | NSString* mediaId;
61 | }
62 | @property (nonatomic, copy) NSString* mediaId;
63 | @end
64 |
65 | @interface CDVAudioFile : NSObject
66 | {
67 | NSString* resourcePath;
68 | NSURL* resourceURL;
69 | CDVAudioPlayer* player;
70 | CDVAudioRecorder* recorder;
71 | NSNumber* volume;
72 | }
73 |
74 | @property (nonatomic, strong) NSString* resourcePath;
75 | @property (nonatomic, strong) NSURL* resourceURL;
76 | @property (nonatomic, strong) CDVAudioPlayer* player;
77 | @property (nonatomic, strong) NSNumber* volume;
78 |
79 | @property (nonatomic, strong) CDVAudioRecorder* recorder;
80 |
81 | @end
82 |
83 | @interface CDVSound : CDVPlugin
84 | {
85 | NSMutableDictionary* soundCache;
86 | AVAudioSession* avSession;
87 | }
88 | @property (nonatomic, strong) NSMutableDictionary* soundCache;
89 | @property (nonatomic, strong) AVAudioSession* avSession;
90 |
91 | - (void)startPlayingAudio:(CDVInvokedUrlCommand*)command;
92 | - (void)pausePlayingAudio:(CDVInvokedUrlCommand*)command;
93 | - (void)stopPlayingAudio:(CDVInvokedUrlCommand*)command;
94 | - (void)seekToAudio:(CDVInvokedUrlCommand*)command;
95 | - (void)release:(CDVInvokedUrlCommand*)command;
96 | - (void)getCurrentPositionAudio:(CDVInvokedUrlCommand*)command;
97 |
98 | - (BOOL)hasAudioSession;
99 |
100 | // helper methods
101 | - (NSURL*)urlForRecording:(NSString*)resourcePath;
102 | - (NSURL*)urlForPlaying:(NSString*)resourcePath;
103 | - (NSURL*)urlForResource:(NSString*)resourcePath CDV_DEPRECATED(2.5, "Use specific api for playing or recording");
104 |
105 | - (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId CDV_DEPRECATED(2.5, "Use updated audioFileForResource api");
106 |
107 | - (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId doValidation:(BOOL)bValidate forRecording:(BOOL)bRecord;
108 | - (BOOL)prepareToPlay:(CDVAudioFile*)audioFile withId:(NSString*)mediaId;
109 | - (NSString*)createMediaErrorWithCode:(CDVMediaError)code message:(NSString*)message;
110 |
111 | - (void)startRecordingAudio:(CDVInvokedUrlCommand*)command;
112 | - (void)stopRecordingAudio:(CDVInvokedUrlCommand*)command;
113 |
114 | - (void)setVolume:(CDVInvokedUrlCommand*)command;
115 |
116 | @end
117 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVSplashScreen.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVPlugin.h"
22 |
23 | @interface CDVSplashScreen : CDVPlugin {
24 | UIActivityIndicatorView* _activityView;
25 | UIImageView* _imageView;
26 | NSString* _curImageName;
27 | BOOL _visible;
28 | }
29 |
30 | - (void)show:(CDVInvokedUrlCommand*)command;
31 | - (void)hide:(CDVInvokedUrlCommand*)command;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVTimer.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVTimer : NSObject
23 |
24 | + (void)start:(NSString*)name;
25 | + (void)stop:(NSString*)name;
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVTimer.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "CDVTimer.h"
21 |
22 | #pragma mark CDVTimerItem
23 |
24 | @interface CDVTimerItem : NSObject
25 |
26 | @property (nonatomic, strong) NSString* name;
27 | @property (nonatomic, strong) NSDate* started;
28 | @property (nonatomic, strong) NSDate* ended;
29 |
30 | - (void)log;
31 |
32 | @end
33 |
34 | @implementation CDVTimerItem
35 |
36 | - (void)log
37 | {
38 | NSLog(@"[CDVTimer][%@] %fms", self.name, [self.ended timeIntervalSinceDate:self.started] * 1000.0);
39 | }
40 |
41 | @end
42 |
43 | #pragma mark CDVTimer
44 |
45 | @interface CDVTimer ()
46 |
47 | @property (nonatomic, strong) NSMutableDictionary* items;
48 |
49 | @end
50 |
51 | @implementation CDVTimer
52 |
53 | #pragma mark object methods
54 |
55 | - (id)init
56 | {
57 | if (self = [super init]) {
58 | self.items = [NSMutableDictionary dictionaryWithCapacity:6];
59 | }
60 |
61 | return self;
62 | }
63 |
64 | - (void)add:(NSString*)name
65 | {
66 | if ([self.items objectForKey:[name lowercaseString]] == nil) {
67 | CDVTimerItem* item = [CDVTimerItem new];
68 | item.name = name;
69 | item.started = [NSDate new];
70 | [self.items setObject:item forKey:[name lowercaseString]];
71 | } else {
72 | NSLog(@"Timer called '%@' already exists.", name);
73 | }
74 | }
75 |
76 | - (void)remove:(NSString*)name
77 | {
78 | CDVTimerItem* item = [self.items objectForKey:[name lowercaseString]];
79 |
80 | if (item != nil) {
81 | item.ended = [NSDate new];
82 | [item log];
83 | [self.items removeObjectForKey:[name lowercaseString]];
84 | } else {
85 | NSLog(@"Timer called '%@' does not exist.", name);
86 | }
87 | }
88 |
89 | - (void)removeAll
90 | {
91 | [self.items removeAllObjects];
92 | }
93 |
94 | #pragma mark class methods
95 |
96 | + (void)start:(NSString*)name
97 | {
98 | [[CDVTimer sharedInstance] add:name];
99 | }
100 |
101 | + (void)stop:(NSString*)name
102 | {
103 | [[CDVTimer sharedInstance] remove:name];
104 | }
105 |
106 | + (void)clearAll
107 | {
108 | [[CDVTimer sharedInstance] removeAll];
109 | }
110 |
111 | + (CDVTimer*)sharedInstance
112 | {
113 | static dispatch_once_t pred = 0;
114 | __strong static CDVTimer* _sharedObject = nil;
115 |
116 | dispatch_once(&pred, ^{
117 | _sharedObject = [[self alloc] init];
118 | });
119 |
120 | return _sharedObject;
121 | }
122 |
123 | @end
124 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVURLProtocol.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "CDVAvailability.h"
22 |
23 | @class CDVViewController;
24 |
25 | @interface CDVURLProtocol : NSURLProtocol {}
26 |
27 | + (void)registerViewController:(CDVViewController*)viewController;
28 | + (void)unregisterViewController:(CDVViewController*)viewController;
29 | @end
30 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVUserAgentUtil.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface CDVUserAgentUtil : NSObject
23 | + (NSString*)originalUserAgent;
24 | + (void)acquireLock:(void (^)(NSInteger lockToken))block;
25 | + (void)releaseLock:(NSInteger*)lockToken;
26 | + (void)setUserAgent:(NSString*)value lockToken:(NSInteger)lockToken;
27 | @end
28 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import
22 | #import "CDVAvailability.h"
23 | #import "CDVInvokedUrlCommand.h"
24 | #import "CDVCommandDelegate.h"
25 | #import "CDVCommandQueue.h"
26 | #import "CDVWhitelist.h"
27 | #import "CDVScreenOrientationDelegate.h"
28 | #import "CDVPlugin.h"
29 |
30 | @interface CDVViewController : UIViewController {
31 | @protected
32 | id _commandDelegate;
33 | @protected
34 | CDVCommandQueue* _commandQueue;
35 | NSString* _userAgent;
36 | }
37 |
38 | @property (nonatomic, strong) IBOutlet UIWebView* webView;
39 |
40 | @property (nonatomic, readonly, strong) NSMutableDictionary* pluginObjects;
41 | @property (nonatomic, readonly, strong) NSDictionary* pluginsMap;
42 | @property (nonatomic, readonly, strong) NSMutableDictionary* settings;
43 | @property (nonatomic, readonly, strong) NSXMLParser* configParser;
44 | @property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public
45 | @property (nonatomic, readonly, assign) BOOL loadFromString;
46 | @property (nonatomic, readwrite, assign) BOOL useSplashScreen CDV_DEPRECATED(2.5, "Add/Remove the SplashScreen plugin instead of setting this property.");
47 |
48 | @property (nonatomic, readwrite, copy) NSString* wwwFolderName;
49 | @property (nonatomic, readwrite, copy) NSString* startPage;
50 | @property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue;
51 | @property (nonatomic, readonly, strong) id commandDelegate;
52 | @property (nonatomic, readonly) NSString* userAgent;
53 |
54 | + (NSDictionary*)getBundlePlist:(NSString*)plistName;
55 | + (NSString*)applicationDocumentsDirectory;
56 |
57 | - (void)printMultitaskingInfo;
58 | - (void)createGapView;
59 | - (UIWebView*)newCordovaViewWithFrame:(CGRect)bounds;
60 |
61 | - (void)javascriptAlert:(NSString*)text;
62 | - (NSString*)appURLScheme;
63 |
64 | - (NSArray*)parseInterfaceOrientations:(NSArray*)orientations;
65 | - (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation;
66 |
67 | - (id)getCommandInstance:(NSString*)pluginName;
68 | - (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
69 | - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;
70 |
71 | - (BOOL)URLisAllowed:(NSURL*)url;
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVWebViewDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | /**
23 | * Distinguishes top-level navigations from sub-frame navigations.
24 | * shouldStartLoadWithRequest is called for every request, but didStartLoad
25 | * and didFinishLoad is called only for top-level navigations.
26 | * Relevant bug: CB-2389
27 | */
28 | @interface CDVWebViewDelegate : NSObject {
29 | __weak NSObject * _delegate;
30 | NSInteger _loadCount;
31 | NSInteger _state;
32 | NSInteger _curLoadToken;
33 | NSInteger _loadStartPollCount;
34 | }
35 |
36 | - (id)initWithDelegate:(NSObject *)delegate;
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/CDVWhitelist.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | extern NSString* const kCDVDefaultWhitelistRejectionString;
23 |
24 | @interface CDVWhitelist : NSObject
25 |
26 | @property (nonatomic, copy) NSString* whitelistRejectionFormatString;
27 |
28 | - (id)initWithArray:(NSArray*)array;
29 | - (BOOL)schemeIsAllowed:(NSString*)scheme;
30 | - (BOOL)URLIsAllowed:(NSURL*)url;
31 | - (NSString*)errorStringForURL:(NSURL*)url;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSArray+Comparisons.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSArray (Comparisons)
23 |
24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSArray+Comparisons.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "NSArray+Comparisons.h"
21 |
22 | @implementation NSArray (Comparisons)
23 |
24 | - (id)objectAtIndex:(NSUInteger)index withDefault:(id)aDefault
25 | {
26 | id obj = nil;
27 |
28 | @try {
29 | obj = [self objectAtIndex:index];
30 | if ((obj == [NSNull null]) || (obj == nil)) {
31 | return aDefault;
32 | }
33 | }
34 | @catch(NSException* exception) {
35 | NSLog(@"Exception - Name: %@ Reason: %@", [exception name], [exception reason]);
36 | }
37 |
38 | return obj;
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSData+Base64.h:
--------------------------------------------------------------------------------
1 | //
2 | // NSData+Base64.h
3 | // base64
4 | //
5 | // Created by Matt Gallagher on 2009/06/03.
6 | // Copyright 2009 Matt Gallagher. All rights reserved.
7 | //
8 | // Permission is given to use this source code file, free of charge, in any
9 | // project, commercial or otherwise, entirely at your risk, with the condition
10 | // that any redistribution (in part or whole) of source code must retain
11 | // this copyright and permission notice. Attribution in compiled projects is
12 | // appreciated but not required.
13 | //
14 |
15 | #import
16 |
17 | void *CDVNewBase64Decode(
18 | const char* inputBuffer,
19 | size_t length,
20 | size_t * outputLength);
21 |
22 | char *CDVNewBase64Encode(
23 | const void* inputBuffer,
24 | size_t length,
25 | bool separateLines,
26 | size_t * outputLength);
27 |
28 | @interface NSData (CDVBase64)
29 |
30 | + (NSData*)dataFromBase64String:(NSString*)aString;
31 | - (NSString*)base64EncodedString;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSDictionary+Extensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSDictionary (org_apache_cordova_NSDictionary_Extension)
23 |
24 | - (bool)existsValue:(NSString*)expectedValue forKey:(NSString*)key;
25 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue withRange:(NSRange)range;
26 | - (NSInteger)integerValueForKey:(NSString*)key defaultValue:(NSInteger)defaultValue;
27 | - (BOOL)typeValueForKey:(NSString*)key isArray:(BOOL*)bArray isNull:(BOOL*)bNull isNumber:(BOOL*)bNumber isString:(BOOL*)bString;
28 | - (BOOL)valueForKeyIsArray:(NSString*)key;
29 | - (BOOL)valueForKeyIsNull:(NSString*)key;
30 | - (BOOL)valueForKeyIsString:(NSString*)key;
31 | - (BOOL)valueForKeyIsNumber:(NSString*)key;
32 |
33 | - (NSDictionary*)dictionaryWithLowercaseKeys;
34 |
35 | @end
36 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSMutableArray+QueueAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface NSMutableArray (QueueAdditions)
23 |
24 | - (id)pop;
25 | - (id)queueHead;
26 | - (id)dequeue;
27 | - (void)enqueue:(id)obj;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/NSMutableArray+QueueAdditions.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import "NSMutableArray+QueueAdditions.h"
21 |
22 | @implementation NSMutableArray (QueueAdditions)
23 |
24 | - (id)queueHead
25 | {
26 | if ([self count] == 0) {
27 | return nil;
28 | }
29 |
30 | return [self objectAtIndex:0];
31 | }
32 |
33 | - (__autoreleasing id)dequeue
34 | {
35 | if ([self count] == 0) {
36 | return nil;
37 | }
38 |
39 | id head = [self objectAtIndex:0];
40 | if (head != nil) {
41 | // [[head retain] autorelease]; ARC - the __autoreleasing on the return value should so the same thing
42 | [self removeObjectAtIndex:0];
43 | }
44 |
45 | return head;
46 | }
47 |
48 | - (id)pop
49 | {
50 | return [self dequeue];
51 | }
52 |
53 | - (void)enqueue:(id)object
54 | {
55 | [self addObject:object];
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/UIDevice+Extensions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 |
22 | @interface UIDevice (org_apache_cordova_UIDevice_Extension)
23 |
24 | /*
25 | Get the unique identifier from the app bundle's folder, which is already a GUID
26 | Upgrading and/or deleting the app and re-installing will get you a new GUID, so
27 | this is only unique per install per device.
28 | */
29 | - (NSString*)uniqueAppInstanceIdentifier;
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/UIDevice+Extensions.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #import
21 | #import "UIDevice+Extensions.h"
22 |
23 | @implementation UIDevice (org_apache_cordova_UIDevice_Extension)
24 |
25 | - (NSString*)uniqueAppInstanceIdentifier
26 | {
27 | NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
28 | static NSString* UUID_KEY = @"CDVUUID";
29 |
30 | NSString* app_uuid = [userDefaults stringForKey:UUID_KEY];
31 |
32 | if (app_uuid == nil) {
33 | CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault);
34 | CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
35 |
36 | app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString];
37 | [userDefaults setObject:app_uuid forKey:UUID_KEY];
38 | [userDefaults synchronize];
39 |
40 | CFRelease(uuidString);
41 | CFRelease(uuidRef);
42 | }
43 |
44 | return app_uuid;
45 | }
46 |
47 | @end
48 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/0.9.6/CDV.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // Bridge implementation file for using Cordova plugins in PhoneGap 0.9.6.
21 | //
22 |
23 | /*
24 | Returns YES if it is at least version specified as NSString(X)
25 | Usage:
26 | if (IsAtLeastiOSVersion(@"5.1")) {
27 | // do something for iOS 5.1 or greater
28 | }
29 | */
30 | #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
31 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // Bridge implementation file for using Cordova plugins in PhoneGap 0.9.6.
21 | //
22 |
23 | #ifdef PHONEGAP_FRAMEWORK
24 | #import
25 | #else
26 | #import "PGPlugin.h"
27 | #endif
28 |
29 | typedef enum {
30 | CDVCommandStatus_NO_RESULT = 0,
31 | CDVCommandStatus_OK,
32 | CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION,
33 | CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION,
34 | CDVCommandStatus_INSTANTIATION_EXCEPTION,
35 | CDVCommandStatus_MALFORMED_URL_EXCEPTION,
36 | CDVCommandStatus_IO_EXCEPTION,
37 | CDVCommandStatus_INVALID_ACTION,
38 | CDVCommandStatus_JSON_EXCEPTION,
39 | CDVCommandStatus_ERROR
40 | } CDVCommandStatus;
41 |
42 | @interface CDVPlugin : PGPlugin
43 | @end
44 |
45 | @interface CDVPluginResult : PluginResult
46 | @end
47 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/0.9.6/CDVPlugin.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // Bridge implementation file for using Cordova plugins in PhoneGap 0.9.6.
21 | //
22 |
23 | #import "CDVPlugin.h"
24 |
25 | @implementation CDVPlugin
26 | @end
27 |
28 | @implementation CDVPluginResult
29 | @end
30 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/1.5.0/CDV.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // Bridge implementation file for using Cordova > 1.5 plugins in 1.5.0.
21 | //
22 |
23 | #import
24 |
25 | /*
26 | Returns YES if it is at least version specified as NSString(X)
27 | Usage:
28 | if (IsAtLeastiOSVersion(@"5.1")) {
29 | // do something for iOS 5.1 or greater
30 | }
31 | */
32 | #define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending)
33 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/1.5.0/CDVPlugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // Bridge implementation file for using Cordova > 1.5 plugins in 1.5.0.
21 | //
22 |
23 | #import
24 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/Classes/compatibility/README.txt:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | Include these headers if you are using a bleeding edge plugin in an older version of Cordova.
21 |
22 | 1.5.0 -- only for 1.5.0 projects
23 | 0.9.6 -- for projects between 0.9.6 and 1.4.1
--------------------------------------------------------------------------------
/iOS/CordovaLib/CordovaLib.xcodeproj/xcuserdata/BobbySudekum.xcuserdatad/xcschemes/CordovaLib.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
42 |
43 |
44 |
45 |
51 |
52 |
54 |
55 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/CordovaLib.xcodeproj/xcuserdata/BobbySudekum.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CordovaLib.xcscheme
8 |
9 | orderHint
10 | 1
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | D2AAC07D0554694100DB518D
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/CordovaLib_Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | #ifdef __OBJC__
21 | #import
22 | #endif
23 |
--------------------------------------------------------------------------------
/iOS/CordovaLib/VERSION:
--------------------------------------------------------------------------------
1 | 2.7.0
2 |
--------------------------------------------------------------------------------
/iOS/MapGap.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iOS/MapGap.xcodeproj/project.xcworkspace/xcuserdata/BobbySudekum.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap.xcodeproj/project.xcworkspace/xcuserdata/BobbySudekum.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/iOS/MapGap.xcodeproj/xcuserdata/BobbySudekum.xcuserdatad/xcschemes/MapGap.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
51 |
52 |
58 |
59 |
60 |
61 |
62 |
63 |
69 |
70 |
76 |
77 |
78 |
79 |
81 |
82 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/iOS/MapGap.xcodeproj/xcuserdata/BobbySudekum.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | MapGap.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 1D6058900D05DD3D006BFB54
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/iOS/MapGap/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.perspectivev3
3 | *.pbxuser
4 | .DS_Store
5 | build
6 | www/phonegap.js
7 |
--------------------------------------------------------------------------------
/iOS/MapGap/Classes/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | //
21 | // AppDelegate.h
22 | // MapGap
23 | //
24 | // Created by ___FULLUSERNAME___ on ___DATE___.
25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
26 | //
27 |
28 | #import
29 |
30 | #import
31 |
32 | @interface AppDelegate : NSObject {}
33 |
34 | // invoke string is passed to your app on launch, this is only valid if you
35 | // edit MapGap-Info.plist to add a protocol
36 | // a simple tutorial can be found here :
37 | // http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
38 |
39 | @property (nonatomic, strong) IBOutlet UIWindow* window;
40 | @property (nonatomic, strong) IBOutlet CDVViewController* viewController;
41 |
42 | @end
43 |
--------------------------------------------------------------------------------
/iOS/MapGap/Classes/MainViewController.h:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | //
21 | // MainViewController.h
22 | // MapGap
23 | //
24 | // Created by ___FULLUSERNAME___ on ___DATE___.
25 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
26 | //
27 |
28 | #import
29 | #import
30 | #import
31 |
32 | @interface MainViewController : CDVViewController
33 |
34 | @end
35 |
36 | @interface MainCommandDelegate : CDVCommandDelegateImpl
37 | @end
38 |
39 | @interface MainCommandQueue : CDVCommandQueue
40 | @end
41 |
--------------------------------------------------------------------------------
/iOS/MapGap/MapGap-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
24 |
25 | CFBundleIcons
26 |
27 | CFBundlePrimaryIcon
28 |
29 | CFBundleIconFiles
30 |
31 | icon.png
32 | icon@2x.png
33 | icon-72.png
34 | icon-72@2x.png
35 |
36 | UIPrerenderedIcon
37 |
38 |
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationPortraitUpsideDown
45 | UIInterfaceOrientationLandscapeRight
46 |
47 | UISupportedInterfaceOrientations
48 |
49 | UIInterfaceOrientationPortrait
50 |
51 | CFBundleDevelopmentRegion
52 | English
53 | CFBundleDisplayName
54 | ${PRODUCT_NAME}
55 | CFBundleExecutable
56 | ${EXECUTABLE_NAME}
57 | CFBundleIconFile
58 | icon.png
59 | CFBundleIdentifier
60 | com.MapBox.MapGap
61 | CFBundleInfoDictionaryVersion
62 | 6.0
63 | CFBundleName
64 | ${PRODUCT_NAME}
65 | CFBundlePackageType
66 | APPL
67 | CFBundleSignature
68 | ????
69 | CFBundleVersion
70 | 1.0
71 | LSRequiresIPhoneOS
72 |
73 | NSMainNibFile
74 |
75 | NSMainNibFile~ipad
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/iOS/MapGap/MapGap-Prefix.pch:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 | //
20 | // Prefix header for all source files of the 'MapGap' target in the 'MapGap' project
21 | //
22 |
23 | #ifdef __OBJC__
24 | #import
25 | #import
26 | #endif
27 |
--------------------------------------------------------------------------------
/iOS/MapGap/Plugins/README:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 |
20 | Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder.
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/controls_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/controls_bg.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/controls_bg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/controls_bg@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/controls_bg@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/controls_bg@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/controls_bg~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/controls_bg~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/microphone-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/microphone-568h@2x~iphone.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/microphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/microphone.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/microphone@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/microphone@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/microphone@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/microphone@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/microphone~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/microphone~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/record_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/record_button.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/record_button@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/record_button@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/record_button@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/record_button@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/record_button~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/record_button~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/recording_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/recording_bg.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/recording_bg@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/recording_bg@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/recording_bg@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/recording_bg@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/recording_bg~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/recording_bg~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/stop_button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/stop_button.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/stop_button@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/stop_button@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/stop_button@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/stop_button@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/Capture.bundle/stop_button~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/Capture.bundle/stop_button~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/de.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 |
21 | // accessibility label for recording button
22 | "toggle audio recording" = "starten/beenden der Tonaufnahme";
23 | // notification spoken by VoiceOver when timed recording finishes
24 | "timed recording complete" = "programmierte Aufnahme beendet";
25 | // accessibility hint for display of recorded elapsed time
26 | "recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden";
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // accessibility label for recording button
21 | "toggle audio recording" = "toggle audio recording";
22 | // notification spoken by VoiceOver when timed recording finishes
23 | "timed recording complete" = "timed recording complete";
24 | // accessibility hint for display of recorded elapsed time
25 | "recorded time in minutes and seconds" = "recorded time in minutes and seconds";
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/es.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 | // accessibility label for recording button
21 | "toggle audio recording" = "grabación de audio cambiar";
22 | // notification spoken by VoiceOver when timed recording finishes
23 | "timed recording complete" = "tiempo de grabación completo";
24 | // accessibility hint for display of recorded elapsed time
25 | "recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos";
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/icons/icon-72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/icons/icon-72.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/icons/icon-72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/icons/icon-72@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/icons/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/icons/icon.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/icons/icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/icons/icon@2x.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/se.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 |
20 |
21 | // accessibility label for recording button
22 | "toggle audio recording" = "börja/avsluta inspelning";
23 | // notification spoken by VoiceOver when timed recording finishes
24 | "timed recording complete" = "inspelning har avslutad";
25 | // accessibility hint for display of recorded elapsed time
26 | "recorded time in minutes and seconds" = "inspelad tid in minuter och sekund";
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default-568h@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default-568h@2x~iphone.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default-Landscape@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default-Landscape@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default-Landscape~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default-Landscape~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default-Portrait@2x~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default-Portrait@2x~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default-Portrait~ipad.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default-Portrait~ipad.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default@2x~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default@2x~iphone.png
--------------------------------------------------------------------------------
/iOS/MapGap/Resources/splash/Default~iphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/MapGap/Resources/splash/Default~iphone.png
--------------------------------------------------------------------------------
/iOS/MapGap/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/iOS/MapGap/main.m:
--------------------------------------------------------------------------------
1 | /*
2 | Licensed to the Apache Software Foundation (ASF) under one
3 | or more contributor license agreements. See the NOTICE file
4 | distributed with this work for additional information
5 | regarding copyright ownership. The ASF licenses this file
6 | to you under the Apache License, Version 2.0 (the
7 | "License"); you may not use this file except in compliance
8 | with the License. You may obtain a copy of the License at
9 |
10 | http://www.apache.org/licenses/LICENSE-2.0
11 |
12 | Unless required by applicable law or agreed to in writing,
13 | software distributed under the License is distributed on an
14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | KIND, either express or implied. See the License for the
16 | specific language governing permissions and limitations
17 | under the License.
18 | */
19 | //
20 | // main.m
21 | // MapGap
22 | //
23 | // Created by ___FULLUSERNAME___ on ___DATE___.
24 | // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved.
25 | //
26 |
27 | #import
28 |
29 | int main(int argc, char* argv[])
30 | {
31 | @autoreleasepool {
32 | int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
33 | return retVal;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/iOS/cordova/build:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | #
23 | # compile and launch a Cordova/iOS project to the simulator
24 | #
25 |
26 | set -e
27 |
28 | XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
29 | XCODE_MIN_VERSION="4.5"
30 |
31 | if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
32 | echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
33 | exit 1
34 | fi
35 |
36 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
37 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
38 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
39 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
40 |
41 | cd "$PROJECT_PATH"
42 |
43 | APP=build/$PROJECT_NAME.app
44 | SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
45 |
46 | xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration Debug -sdk $SDK clean build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/iOS/cordova/emulate:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | set -e
22 |
23 | XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
24 | XCODE_MIN_VERSION="4.5"
25 |
26 | if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
27 | echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
28 | exit 1
29 | fi
30 |
31 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
32 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
33 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
34 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
35 |
36 | APP_PATH=${1:-$PROJECT_PATH/build/$PROJECT_NAME.app}
37 | DEVICE_FAMILY=${2:-${DEVICE_FAMILY:-iphone}}
38 |
39 | if [ ! -d "$APP_PATH" ]; then
40 | echo "Project '$APP_PATH' is not built. Building."
41 | $CORDOVA_PATH/build || exit $?
42 | fi
43 |
44 | if [ ! -d "$APP_PATH" ]; then
45 | echo "$APP_PATH not found to emulate."
46 | exit 1
47 | fi
48 |
49 | # launch using ios-sim
50 | if which ios-sim >/dev/null; then
51 | ios-sim launch "$APP_PATH" --family "$DEVICE_FAMILY" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" &
52 | else
53 | echo -e '\033[31mError: ios-sim was not found. Please download, build and install version 1.4 or greater from https://github.com/phonegap/ios-sim into your path. Or "brew install ios-sim" using homebrew: http://mxcl.github.com/homebrew/\033[m'; exit 1;
54 | fi
55 |
56 |
--------------------------------------------------------------------------------
/iOS/cordova/log:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
22 |
23 | tail -f "$CORDOVA_PATH/console.log"
24 |
--------------------------------------------------------------------------------
/iOS/cordova/release:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | #
4 | # Licensed to the Apache Software Foundation (ASF) under one
5 | # or more contributor license agreements. See the NOTICE file
6 | # distributed with this work for additional information
7 | # regarding copyright ownership. The ASF licenses this file
8 | # to you under the Apache License, Version 2.0 (the
9 | # "License"); you may not use this file except in compliance
10 | # with the License. You may obtain a copy of the License at
11 | #
12 | # http://www.apache.org/licenses/LICENSE-2.0
13 | #
14 | # Unless required by applicable law or agreed to in writing,
15 | # software distributed under the License is distributed on an
16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 | # KIND, either express or implied. See the License for the
18 | # specific language governing permissions and limitations
19 | # under the License.
20 | #
21 |
22 | #
23 | # compile and launch a Cordova/iOS project to the simulator
24 | #
25 |
26 | set -e
27 |
28 | XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
29 | XCODE_MIN_VERSION="4.5"
30 |
31 | if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
32 | echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
33 | exit 1
34 | fi
35 |
36 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
37 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
38 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
39 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
40 |
41 | cd "$PROJECT_PATH"
42 |
43 | APP=build/$PROJECT_NAME.app
44 | SDK=`xcodebuild -showsdks | grep Sim | tail -1 | awk '{print $6}'`
45 |
46 | xcodebuild -project $PROJECT_NAME.xcodeproj -arch i386 -target $PROJECT_NAME -configuration Release -sdk $SDK clean build VALID_ARCHS="i386" CONFIGURATION_BUILD_DIR="$PROJECT_PATH/build"
47 |
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/iOS/cordova/run:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | #
3 | # Licensed to the Apache Software Foundation (ASF) under one
4 | # or more contributor license agreements. See the NOTICE file
5 | # distributed with this work for additional information
6 | # regarding copyright ownership. The ASF licenses this file
7 | # to you under the Apache License, Version 2.0 (the
8 | # "License"); you may not use this file except in compliance
9 | # with the License. You may obtain a copy of the License at
10 | #
11 | # http://www.apache.org/licenses/LICENSE-2.0
12 | #
13 | # Unless required by applicable law or agreed to in writing,
14 | # software distributed under the License is distributed on an
15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | # KIND, either express or implied. See the License for the
17 | # specific language governing permissions and limitations
18 | # under the License.
19 | #
20 |
21 | set -e
22 |
23 | XCODE_VER=$(xcodebuild -version | head -n 1 | sed -e 's/Xcode //')
24 | XCODE_MIN_VERSION="4.5"
25 |
26 | if [[ "$XCODE_VER" < "$XCODE_MIN_VERSION" ]]; then
27 | echo "Cordova can only run in Xcode version $XCODE_MIN_VERSION or greater."
28 | exit 1
29 | fi
30 |
31 | CORDOVA_PATH=$( cd "$( dirname "$0" )" && pwd -P)
32 | PROJECT_PATH="$(dirname "$CORDOVA_PATH")"
33 | XCODEPROJ=$( ls "$PROJECT_PATH" | grep .xcodeproj )
34 | PROJECT_NAME=$(basename "$XCODEPROJ" .xcodeproj)
35 |
36 | APP_PATH=$1
37 |
38 | if [ $# -lt 1 ]; then
39 | APP_PATH="$PROJECT_PATH/build/$PROJECT_NAME.app"
40 | fi
41 |
42 | if [ ! -d "$APP_PATH" ]; then
43 | echo "Project '$APP_PATH' is not built. Building."
44 | $CORDOVA_PATH/build || exit $?
45 | fi
46 |
47 | if [ ! -d "$APP_PATH" ]; then
48 | echo "$APP_PATH not found to emulate."
49 | exit 1
50 | fi
51 |
52 | # launch using ios-sim
53 | if which ios-sim >/dev/null; then
54 | ios-sim launch "$APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" &
55 | else
56 | echo -e '\033[31mError: ios-sim was not found. Please download, build and install version 1.4 or greater from https://github.com/phonegap/ios-sim into your path. Or "brew install ios-sim" using homebrew: http://mxcl.github.com/homebrew/\033[m'; exit 1;
57 | fi
58 |
59 |
--------------------------------------------------------------------------------
/iOS/www/cordova_plugins.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/www/cordova_plugins.json
--------------------------------------------------------------------------------
/iOS/www/css/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
--------------------------------------------------------------------------------
/iOS/www/css/images/layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/www/css/images/layers.png
--------------------------------------------------------------------------------
/iOS/www/css/images/marker-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/www/css/images/marker-icon.png
--------------------------------------------------------------------------------
/iOS/www/css/images/marker-icon@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/www/css/images/marker-icon@2x.png
--------------------------------------------------------------------------------
/iOS/www/css/images/marker-shadow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bsudekum/MapGap/8f79441cb438c093abd93a0a4aff749801917204/iOS/www/css/images/marker-shadow.png
--------------------------------------------------------------------------------
/iOS/www/css/index.css:
--------------------------------------------------------------------------------
1 | * {
2 | /* prevent callout when holding tap on links (the native dialog that comes up) */
3 | -webkit-touch-callout: none;
4 |
5 | /* prevent webkit from resizing text to fit */
6 | -webkit-text-size-adjust: none;
7 |
8 | /* make transparent link selection, adjust last value opacity 0 to 1.0 */
9 | -webkit-tap-highlight-color: rgba(0,0,0,0);
10 |
11 | /* prevent copy paste, to allow, change 'none' to 'text' */
12 | -webkit-user-select: none;
13 | }
14 |
15 | .leaflet-map-pane{
16 | -webkit-transform: translate3d(0px,0px,0px);
17 | }
18 |
19 | /*turn off webkit checkbox style, works for other inputs too*/
20 | input[type="checkbox"] { -webkit-appearance: none; }
21 |
22 | /*placeholder text opacity*/
23 | input::-webkit-input-placeholder { opacity: .8; }
24 |
25 | html,
26 | body {
27 | height:100%;
28 | width:100%;
29 | padding: 0px;
30 | margin:0px;
31 | font-family:'Helvetica', arial;
32 | }
33 |
34 | #map{
35 | position: absolute;
36 | top:0px;
37 | left:0px;
38 | height: 100%;
39 | width: 100%
40 | }
41 |
42 | #arrow {
43 | width: 0;
44 | height: 0;
45 | border-left: 18px solid rgba(0, 0, 0, 0);
46 | border-right: 18px solid rgba(0, 0, 0, 0);
47 | border-bottom: 60px solid rgba(39, 39, 39, 0.82);
48 | z-index: 10;
49 | position: absolute;
50 | top: 8px;
51 | left: 30px;
52 | color:white;
53 | }
54 | #arrow-text{
55 | position: absolute;
56 | left: 32px;
57 | top: 76px;
58 | color: #3C3C3C;
59 | z-index: 11;
60 | }
--------------------------------------------------------------------------------
/iOS/www/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | MapGap
10 |
11 |
12 |
13 |
14 |
15 |
16 |