From d14bdc65777a6347c419f29e355fa9f1745de739 Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Mon, 12 Mar 2012 11:20:08 +0000 Subject: rough initial code for iPhone phonegap app --- .../iPhone/FixMyStreet.xcodeproj/project.pbxproj | 557 +++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../UserInterfaceState.xcuserstate | Bin 0 -> 42472 bytes .../xcschemes/FixMyStreet.xcscheme | 84 + .../xcschemes/xcschememanagement.plist | 22 + phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h | 52 + phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m | 191 + .../FixMyStreet/Classes/MainViewController.h | 36 + .../FixMyStreet/Classes/MainViewController.m | 70 + .../FixMyStreet/Classes/MainViewController.xib | 118 + phonegap/iPhone/FixMyStreet/Cordova.plist | 62 + phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist | 51 + phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch | 7 + phonegap/iPhone/FixMyStreet/Plugins/README | 1 + .../Resources/Capture.bundle/controls_bg.png | Bin 0 -> 955 bytes .../Resources/Capture.bundle/controls_bg@2x.png | Bin 0 -> 971 bytes .../Resources/Capture.bundle/controls_bg~ipad.png | Bin 0 -> 969 bytes .../Resources/Capture.bundle/microphone.png | Bin 0 -> 72226 bytes .../Resources/Capture.bundle/microphone@2x.png | Bin 0 -> 282409 bytes .../Resources/Capture.bundle/microphone~ipad.png | Bin 0 -> 393975 bytes .../Resources/Capture.bundle/record_button.png | Bin 0 -> 5852 bytes .../Resources/Capture.bundle/record_button@2x.png | Bin 0 -> 13875 bytes .../Capture.bundle/record_button~ipad.png | Bin 0 -> 7547 bytes .../Resources/Capture.bundle/recording_bg.png | Bin 0 -> 973 bytes .../Resources/Capture.bundle/recording_bg@2x.png | Bin 0 -> 990 bytes .../Resources/Capture.bundle/recording_bg~ipad.png | Bin 0 -> 996 bytes .../Resources/Capture.bundle/stop_button.png | Bin 0 -> 5514 bytes .../Resources/Capture.bundle/stop_button@2x.png | Bin 0 -> 12965 bytes .../Resources/Capture.bundle/stop_button~ipad.png | Bin 0 -> 7119 bytes .../Resources/de.lproj/Localizable.strings | 26 + .../Resources/en.lproj/Localizable.strings | 25 + .../Resources/es.lproj/Localizable.strings | 25 + .../iPhone/FixMyStreet/Resources/icons/icon-72.png | Bin 0 -> 4944 bytes .../iPhone/FixMyStreet/Resources/icons/icon.png | Bin 0 -> 3902 bytes .../iPhone/FixMyStreet/Resources/icons/icon@2x.png | Bin 0 -> 7869 bytes .../Resources/se.lproj/Localizable.strings | 26 + .../FixMyStreet/Resources/splash/Default.png | Bin 0 -> 9537 bytes .../FixMyStreet/Resources/splash/Default@2x.png | Bin 0 -> 22029 bytes .../iPhone/FixMyStreet/en.lproj/InfoPlist.strings | 2 + phonegap/iPhone/FixMyStreet/main.m | 35 + phonegap/iPhone/FixMyStreet/verify.sh | 12 + phonegap/www/around.html | 338 ++ phonegap/www/cordova-1.5.0.js | 4135 ++++++++++++++++++++ phonegap/www/css/base.css | 2130 ++++++++++ phonegap/www/css/layout.css | 1012 +++++ phonegap/www/email_sent.html | 137 + phonegap/www/fonts/Museo300-Regular-webfont.eot | Bin 0 -> 25034 bytes phonegap/www/fonts/Museo300-Regular-webfont.svg | 229 ++ phonegap/www/fonts/Museo300-Regular-webfont.ttf | Bin 0 -> 57284 bytes phonegap/www/fonts/Museo300-Regular-webfont.woff | Bin 0 -> 27800 bytes phonegap/www/fonts/MuseoSans_300-webfont.eot | Bin 0 -> 21394 bytes phonegap/www/fonts/MuseoSans_300-webfont.svg | 227 ++ phonegap/www/fonts/MuseoSans_300-webfont.ttf | Bin 0 -> 46872 bytes phonegap/www/fonts/MuseoSans_300-webfont.woff | Bin 0 -> 24796 bytes .../www/fonts/MuseoSans_300_Italic-webfont.eot | Bin 0 -> 24673 bytes .../www/fonts/MuseoSans_300_Italic-webfont.svg | 227 ++ .../www/fonts/MuseoSans_300_Italic-webfont.ttf | Bin 0 -> 56332 bytes .../www/fonts/MuseoSans_300_Italic-webfont.woff | Bin 0 -> 28188 bytes phonegap/www/fonts/MuseoSans_500-webfont.eot | Bin 0 -> 21871 bytes phonegap/www/fonts/MuseoSans_500-webfont.svg | 227 ++ phonegap/www/fonts/MuseoSans_500-webfont.ttf | Bin 0 -> 47500 bytes phonegap/www/fonts/MuseoSans_500-webfont.woff | Bin 0 -> 25248 bytes .../www/fonts/MuseoSans_500_Italic-webfont.eot | Bin 0 -> 24415 bytes .../www/fonts/MuseoSans_500_Italic-webfont.svg | 227 ++ .../www/fonts/MuseoSans_500_Italic-webfont.ttf | Bin 0 -> 55672 bytes .../www/fonts/MuseoSans_500_Italic-webfont.woff | Bin 0 -> 27864 bytes phonegap/www/i/SEHPlogo-bwS.png | Bin 0 -> 17954 bytes phonegap/www/i/Sheltercymru47.gif | Bin 0 -> 960 bytes phonegap/www/i/Sheltercymru47s.png | Bin 0 -> 9702 bytes phonegap/www/i/appstore.png | Bin 0 -> 6680 bytes phonegap/www/i/arrow-east.gif | Bin 0 -> 65 bytes phonegap/www/i/arrow-north.gif | Bin 0 -> 61 bytes phonegap/www/i/arrow-northeast.gif | Bin 0 -> 61 bytes phonegap/www/i/arrow-northwest.gif | Bin 0 -> 61 bytes phonegap/www/i/arrow-south.gif | Bin 0 -> 60 bytes phonegap/www/i/arrow-southeast.gif | Bin 0 -> 61 bytes phonegap/www/i/arrow-southwest.gif | Bin 0 -> 61 bytes phonegap/www/i/arrow-west.gif | Bin 0 -> 64 bytes phonegap/www/i/eha-logo.jpeg | Bin 0 -> 14680 bytes phonegap/www/i/eha-logo.png | Bin 0 -> 12522 bytes phonegap/www/i/eha.jpg | Bin 0 -> 15204 bytes phonegap/www/i/eha.png | Bin 0 -> 35399 bytes phonegap/www/i/email.png | Bin 0 -> 593 bytes phonegap/www/i/feed.png | Bin 0 -> 764 bytes phonegap/www/i/flower.gif | Bin 0 -> 1644 bytes phonegap/www/i/fms-badge.jpeg | Bin 0 -> 31402 bytes phonegap/www/i/grey.gif | Bin 0 -> 34 bytes phonegap/www/i/moj.png | Bin 0 -> 2067 bytes phonegap/www/i/mysociety-dark.png | Bin 0 -> 4688 bytes phonegap/www/i/mysociety-on-white.gif | Bin 0 -> 1132 bytes phonegap/www/i/new.png | Bin 0 -> 989 bytes phonegap/www/i/pin-green.png | Bin 0 -> 1806 bytes phonegap/www/i/pin-red.png | Bin 0 -> 1841 bytes phonegap/www/i/pin-shadow-big.png | Bin 0 -> 1202 bytes phonegap/www/i/pin-shadow.png | Bin 0 -> 720 bytes phonegap/www/i/pin-yellow-big.png | Bin 0 -> 2364 bytes phonegap/www/i/pin-yellow.png | Bin 0 -> 1475 bytes phonegap/www/i/promo-fb4tf.gif | Bin 0 -> 1213 bytes phonegap/www/i/promo-icicles.gif | Bin 0 -> 2518 bytes phonegap/www/i/rose.gif | Bin 0 -> 1421 bytes phonegap/www/i/zoomin.gif | Bin 0 -> 1090 bytes phonegap/www/i/zoomout.gif | Bin 0 -> 1082 bytes phonegap/www/images/ie_fixed.gif | Bin 0 -> 321 bytes phonegap/www/images/ie_front_logo.gif | Bin 0 -> 4225 bytes phonegap/www/images/ie_green_chevron.gif | Bin 0 -> 237 bytes phonegap/www/images/ie_key_tools_sprite.gif | Bin 0 -> 375 bytes phonegap/www/images/ie_key_tools_sprite_dark.gif | Bin 0 -> 373 bytes phonegap/www/images/ie_logo.gif | Bin 0 -> 2349 bytes phonegap/www/images/ie_mobileapps.gif | Bin 0 -> 2668 bytes phonegap/www/images/ie_mysoc_logo.gif | Bin 0 -> 599 bytes phonegap/www/images/ie_sub_map_links_sprite.gif | Bin 0 -> 461 bytes phonegap/www/images/spinner-black-333.gif | Bin 0 -> 1849 bytes phonegap/www/images/spinner-black.gif | Bin 0 -> 1849 bytes phonegap/www/images/spinner-yellow.gif | Bin 0 -> 1849 bytes phonegap/www/images/sprite.png | Bin 0 -> 124999 bytes phonegap/www/images/temp-map.jpg | Bin 0 -> 794142 bytes phonegap/www/images/temp-map.png | Bin 0 -> 2733022 bytes phonegap/www/images/tile.jpg | Bin 0 -> 21980 bytes phonegap/www/index.html | 136 + .../www/js/OpenLayers.Projection.OrdnanceSurvey.js | 489 +++ phonegap/www/js/OpenLayers.fixmystreet.js | 1269 ++++++ phonegap/www/js/fixmystreet.js | 463 +++ phonegap/www/js/geo.min.js | 85 + phonegap/www/js/jquery-1.7.0.min.js | 4 + phonegap/www/js/jquery.ba-hashchange.min.js | 9 + phonegap/www/js/jquery.validate.js | 1188 ++++++ phonegap/www/js/jquery.validate.min.js | 51 + phonegap/www/js/map-OpenLayers.js | 500 +++ phonegap/www/js/map-OpenStreetMap.js | 140 + phonegap/www/js/map-bing-ol.js | 122 + phonegap/www/js/map-bing.js | 22 + phonegap/www/js/map-google.js | 22 + phonegap/www/js/map-streetview.js | 76 + phonegap/www/js/mobile.js | 242 ++ phonegap/www/js/modernizr.custom.61367.js | 4 + phonegap/www/js/southampton.js | 50 + phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js | 2553 ++++++++++++ phonegap/www/jslib/OpenLayers-2.10/img/blank.gif | Bin 0 -> 42 bytes .../OpenLayers-2.10/img/cloud-popup-relative.png | Bin 0 -> 3177 bytes .../OpenLayers-2.10/img/drag-rectangle-off.png | Bin 0 -> 1202 bytes .../OpenLayers-2.10/img/drag-rectangle-on.png | Bin 0 -> 1218 bytes .../www/jslib/OpenLayers-2.10/img/east-mini.png | Bin 0 -> 451 bytes .../img/layer-switcher-maximize.png | Bin 0 -> 451 bytes .../img/layer-switcher-minimize.png | Bin 0 -> 249 bytes .../www/jslib/OpenLayers-2.10/img/marker-blue.png | Bin 0 -> 992 bytes .../www/jslib/OpenLayers-2.10/img/marker-gold.png | Bin 0 -> 831 bytes .../www/jslib/OpenLayers-2.10/img/marker-green.png | Bin 0 -> 967 bytes phonegap/www/jslib/OpenLayers-2.10/img/marker.png | Bin 0 -> 606 bytes .../OpenLayers-2.10/img/measuring-stick-off.png | Bin 0 -> 3343 bytes .../OpenLayers-2.10/img/measuring-stick-on.png | Bin 0 -> 3816 bytes .../www/jslib/OpenLayers-2.10/img/north-mini.png | Bin 0 -> 484 bytes .../jslib/OpenLayers-2.10/img/panning-hand-off.png | Bin 0 -> 3875 bytes .../jslib/OpenLayers-2.10/img/panning-hand-on.png | Bin 0 -> 3977 bytes phonegap/www/jslib/OpenLayers-2.10/img/slider.png | Bin 0 -> 285 bytes .../www/jslib/OpenLayers-2.10/img/south-mini.png | Bin 0 -> 481 bytes .../www/jslib/OpenLayers-2.10/img/west-mini.png | Bin 0 -> 453 bytes .../jslib/OpenLayers-2.10/img/zoom-minus-mini.png | Bin 0 -> 359 bytes .../jslib/OpenLayers-2.10/img/zoom-plus-mini.png | Bin 0 -> 489 bytes .../jslib/OpenLayers-2.10/img/zoom-world-mini.png | Bin 0 -> 1072 bytes phonegap/www/jslib/OpenLayers-2.10/img/zoombar.png | Bin 0 -> 463 bytes phonegap/www/jslib/OpenLayers-2.10/license.txt | 38 + .../OpenLayers-2.10/theme/default/framedCloud.css | 0 .../jslib/OpenLayers-2.10/theme/default/google.css | 10 + .../OpenLayers-2.10/theme/default/ie6-style.css | 7 + .../theme/default/img/add_point_off.png | Bin 0 -> 1616 bytes .../theme/default/img/add_point_on.png | Bin 0 -> 1464 bytes .../OpenLayers-2.10/theme/default/img/blank.gif | Bin 0 -> 42 bytes .../OpenLayers-2.10/theme/default/img/close.gif | Bin 0 -> 1078 bytes .../theme/default/img/drag-rectangle-off.png | Bin 0 -> 1202 bytes .../theme/default/img/drag-rectangle-on.png | Bin 0 -> 1218 bytes .../theme/default/img/draw_line_off.png | Bin 0 -> 1567 bytes .../theme/default/img/draw_line_on.png | Bin 0 -> 1399 bytes .../theme/default/img/draw_point_off.png | Bin 0 -> 1612 bytes .../theme/default/img/draw_point_on.png | Bin 0 -> 1460 bytes .../theme/default/img/draw_polygon_off.png | Bin 0 -> 1546 bytes .../theme/default/img/draw_polygon_on.png | Bin 0 -> 1407 bytes .../theme/default/img/editing_tool_bar.png | Bin 0 -> 3901 bytes .../theme/default/img/move_feature_off.png | Bin 0 -> 1543 bytes .../theme/default/img/move_feature_on.png | Bin 0 -> 1379 bytes .../theme/default/img/navigation_history.png | Bin 0 -> 7021 bytes .../theme/default/img/overview_replacement.gif | Bin 0 -> 79 bytes .../theme/default/img/pan-panel-NOALPHA.png | Bin 0 -> 566 bytes .../theme/default/img/pan-panel.png | Bin 0 -> 1287 bytes .../OpenLayers-2.10/theme/default/img/pan_off.png | Bin 0 -> 1696 bytes .../OpenLayers-2.10/theme/default/img/pan_on.png | Bin 0 -> 1568 bytes .../theme/default/img/panning-hand-off.png | Bin 0 -> 3875 bytes .../theme/default/img/panning-hand-on.png | Bin 0 -> 3977 bytes .../theme/default/img/remove_point_off.png | Bin 0 -> 1612 bytes .../theme/default/img/remove_point_on.png | Bin 0 -> 1464 bytes .../OpenLayers-2.10/theme/default/img/ruler.png | Bin 0 -> 1211 bytes .../theme/default/img/save_features_off.png | Bin 0 -> 357 bytes .../theme/default/img/save_features_on.png | Bin 0 -> 364 bytes .../theme/default/img/view_next_off.png | Bin 0 -> 1644 bytes .../theme/default/img/view_next_on.png | Bin 0 -> 1686 bytes .../theme/default/img/view_previous_off.png | Bin 0 -> 1553 bytes .../theme/default/img/view_previous_on.png | Bin 0 -> 1592 bytes .../theme/default/img/zoom-panel-NOALPHA.png | Bin 0 -> 1173 bytes .../theme/default/img/zoom-panel.png | Bin 0 -> 1624 bytes .../jslib/OpenLayers-2.10/theme/default/style.css | 397 ++ phonegap/www/jslib/utils.js | 50 + 200 files changed, 18225 insertions(+) create mode 100644 phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj create mode 100644 phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/xcuserdata/struan.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme create mode 100644 phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h create mode 100644 phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m create mode 100644 phonegap/iPhone/FixMyStreet/Classes/MainViewController.h create mode 100644 phonegap/iPhone/FixMyStreet/Classes/MainViewController.m create mode 100644 phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib create mode 100644 phonegap/iPhone/FixMyStreet/Cordova.plist create mode 100644 phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist create mode 100644 phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch create mode 100644 phonegap/iPhone/FixMyStreet/Plugins/README create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings create mode 100644 phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings create mode 100644 phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings create mode 100644 phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/icons/icon.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings create mode 100644 phonegap/iPhone/FixMyStreet/Resources/splash/Default.png create mode 100644 phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png create mode 100644 phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings create mode 100644 phonegap/iPhone/FixMyStreet/main.m create mode 100755 phonegap/iPhone/FixMyStreet/verify.sh create mode 100644 phonegap/www/around.html create mode 100644 phonegap/www/cordova-1.5.0.js create mode 100644 phonegap/www/css/base.css create mode 100644 phonegap/www/css/layout.css create mode 100644 phonegap/www/email_sent.html create mode 100755 phonegap/www/fonts/Museo300-Regular-webfont.eot create mode 100755 phonegap/www/fonts/Museo300-Regular-webfont.svg create mode 100755 phonegap/www/fonts/Museo300-Regular-webfont.ttf create mode 100755 phonegap/www/fonts/Museo300-Regular-webfont.woff create mode 100755 phonegap/www/fonts/MuseoSans_300-webfont.eot create mode 100755 phonegap/www/fonts/MuseoSans_300-webfont.svg create mode 100755 phonegap/www/fonts/MuseoSans_300-webfont.ttf create mode 100755 phonegap/www/fonts/MuseoSans_300-webfont.woff create mode 100755 phonegap/www/fonts/MuseoSans_300_Italic-webfont.eot create mode 100755 phonegap/www/fonts/MuseoSans_300_Italic-webfont.svg create mode 100755 phonegap/www/fonts/MuseoSans_300_Italic-webfont.ttf create mode 100755 phonegap/www/fonts/MuseoSans_300_Italic-webfont.woff create mode 100755 phonegap/www/fonts/MuseoSans_500-webfont.eot create mode 100755 phonegap/www/fonts/MuseoSans_500-webfont.svg create mode 100755 phonegap/www/fonts/MuseoSans_500-webfont.ttf create mode 100755 phonegap/www/fonts/MuseoSans_500-webfont.woff create mode 100755 phonegap/www/fonts/MuseoSans_500_Italic-webfont.eot create mode 100755 phonegap/www/fonts/MuseoSans_500_Italic-webfont.svg create mode 100755 phonegap/www/fonts/MuseoSans_500_Italic-webfont.ttf create mode 100755 phonegap/www/fonts/MuseoSans_500_Italic-webfont.woff create mode 100644 phonegap/www/i/SEHPlogo-bwS.png create mode 100644 phonegap/www/i/Sheltercymru47.gif create mode 100644 phonegap/www/i/Sheltercymru47s.png create mode 100644 phonegap/www/i/appstore.png create mode 100644 phonegap/www/i/arrow-east.gif create mode 100644 phonegap/www/i/arrow-north.gif create mode 100644 phonegap/www/i/arrow-northeast.gif create mode 100644 phonegap/www/i/arrow-northwest.gif create mode 100644 phonegap/www/i/arrow-south.gif create mode 100644 phonegap/www/i/arrow-southeast.gif create mode 100644 phonegap/www/i/arrow-southwest.gif create mode 100644 phonegap/www/i/arrow-west.gif create mode 100644 phonegap/www/i/eha-logo.jpeg create mode 100644 phonegap/www/i/eha-logo.png create mode 100644 phonegap/www/i/eha.jpg create mode 100644 phonegap/www/i/eha.png create mode 100644 phonegap/www/i/email.png create mode 100644 phonegap/www/i/feed.png create mode 100644 phonegap/www/i/flower.gif create mode 100644 phonegap/www/i/fms-badge.jpeg create mode 100644 phonegap/www/i/grey.gif create mode 100644 phonegap/www/i/moj.png create mode 100644 phonegap/www/i/mysociety-dark.png create mode 100644 phonegap/www/i/mysociety-on-white.gif create mode 100644 phonegap/www/i/new.png create mode 100644 phonegap/www/i/pin-green.png create mode 100644 phonegap/www/i/pin-red.png create mode 100644 phonegap/www/i/pin-shadow-big.png create mode 100644 phonegap/www/i/pin-shadow.png create mode 100644 phonegap/www/i/pin-yellow-big.png create mode 100644 phonegap/www/i/pin-yellow.png create mode 100644 phonegap/www/i/promo-fb4tf.gif create mode 100644 phonegap/www/i/promo-icicles.gif create mode 100644 phonegap/www/i/rose.gif create mode 100644 phonegap/www/i/zoomin.gif create mode 100644 phonegap/www/i/zoomout.gif create mode 100644 phonegap/www/images/ie_fixed.gif create mode 100644 phonegap/www/images/ie_front_logo.gif create mode 100644 phonegap/www/images/ie_green_chevron.gif create mode 100644 phonegap/www/images/ie_key_tools_sprite.gif create mode 100644 phonegap/www/images/ie_key_tools_sprite_dark.gif create mode 100644 phonegap/www/images/ie_logo.gif create mode 100644 phonegap/www/images/ie_mobileapps.gif create mode 100644 phonegap/www/images/ie_mysoc_logo.gif create mode 100644 phonegap/www/images/ie_sub_map_links_sprite.gif create mode 100644 phonegap/www/images/spinner-black-333.gif create mode 100644 phonegap/www/images/spinner-black.gif create mode 100644 phonegap/www/images/spinner-yellow.gif create mode 100644 phonegap/www/images/sprite.png create mode 100644 phonegap/www/images/temp-map.jpg create mode 100644 phonegap/www/images/temp-map.png create mode 100644 phonegap/www/images/tile.jpg create mode 100644 phonegap/www/index.html create mode 100644 phonegap/www/js/OpenLayers.Projection.OrdnanceSurvey.js create mode 100644 phonegap/www/js/OpenLayers.fixmystreet.js create mode 100644 phonegap/www/js/fixmystreet.js create mode 100644 phonegap/www/js/geo.min.js create mode 100644 phonegap/www/js/jquery-1.7.0.min.js create mode 100644 phonegap/www/js/jquery.ba-hashchange.min.js create mode 100644 phonegap/www/js/jquery.validate.js create mode 100644 phonegap/www/js/jquery.validate.min.js create mode 100644 phonegap/www/js/map-OpenLayers.js create mode 100644 phonegap/www/js/map-OpenStreetMap.js create mode 100644 phonegap/www/js/map-bing-ol.js create mode 100644 phonegap/www/js/map-bing.js create mode 100644 phonegap/www/js/map-google.js create mode 100644 phonegap/www/js/map-streetview.js create mode 100644 phonegap/www/js/mobile.js create mode 100644 phonegap/www/js/modernizr.custom.61367.js create mode 100644 phonegap/www/js/southampton.js create mode 100644 phonegap/www/jslib/OpenLayers-2.10/OpenLayers.js create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/blank.gif create mode 100755 phonegap/www/jslib/OpenLayers-2.10/img/cloud-popup-relative.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/drag-rectangle-on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/east-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-maximize.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/layer-switcher-minimize.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/marker-blue.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/marker-gold.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/marker-green.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/marker.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/measuring-stick-on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/north-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/panning-hand-on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/slider.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/south-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/west-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/zoom-minus-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/zoom-plus-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/zoom-world-mini.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/img/zoombar.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/license.txt create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/framedCloud.css create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/google.css create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/ie6-style.css create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/add_point_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/blank.gif create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/close.gif create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/drag-rectangle-on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_line_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_point_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/draw_polygon_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/editing_tool_bar.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/move_feature_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/navigation_history.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/overview_replacement.gif create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel-NOALPHA.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan-panel.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/pan_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/panning-hand-on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/remove_point_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/ruler.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/save_features_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_next_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_off.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/view_previous_on.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel-NOALPHA.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/img/zoom-panel.png create mode 100644 phonegap/www/jslib/OpenLayers-2.10/theme/default/style.css create mode 100644 phonegap/www/jslib/utils.js diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj b/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj new file mode 100644 index 000000000..9dea27891 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet.xcodeproj/project.pbxproj @@ -0,0 +1,557 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4B1508D60F005923FE /* Foundation.framework */; }; + 24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4D1508D60F005923FE /* UIKit.framework */; }; + 24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */; }; + 24D3BF521508D60F005923FE /* AddressBook.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF511508D60F005923FE /* AddressBook.framework */; }; + 24D3BF541508D60F005923FE /* AddressBookUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF531508D60F005923FE /* AddressBookUI.framework */; }; + 24D3BF561508D60F005923FE /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF551508D60F005923FE /* AudioToolbox.framework */; }; + 24D3BF581508D60F005923FE /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF571508D60F005923FE /* AVFoundation.framework */; }; + 24D3BF5A1508D60F005923FE /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF591508D60F005923FE /* CoreLocation.framework */; }; + 24D3BF5C1508D60F005923FE /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */; }; + 24D3BF5E1508D60F005923FE /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5D1508D60F005923FE /* QuartzCore.framework */; }; + 24D3BF601508D60F005923FE /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */; }; + 24D3BF621508D60F005923FE /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF611508D60F005923FE /* MobileCoreServices.framework */; }; + 24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF631508D60F005923FE /* CoreMedia.framework */; }; + 24D3BF6A1508D60F005923FE /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF681508D60F005923FE /* InfoPlist.strings */; }; + 24D3BF6C1508D60F005923FE /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF6B1508D60F005923FE /* main.m */; }; + 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 24D3BF6E1508D60F005923FE /* Cordova.framework */; }; + 24D3BF741508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF721508D60F005923FE /* Localizable.strings */; }; + 24D3BF781508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF761508D60F005923FE /* Localizable.strings */; }; + 24D3BF7C1508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF7A1508D60F005923FE /* Localizable.strings */; }; + 24D3BF801508D60F005923FE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF7E1508D60F005923FE /* Localizable.strings */; }; + 24D3BF831508D60F005923FE /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF821508D60F005923FE /* icon.png */; }; + 24D3BF851508D60F005923FE /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF841508D60F005923FE /* icon@2x.png */; }; + 24D3BF871508D60F005923FE /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF861508D60F005923FE /* icon-72.png */; }; + 24D3BF8A1508D60F005923FE /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF891508D60F005923FE /* Default.png */; }; + 24D3BF8C1508D60F005923FE /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8B1508D60F005923FE /* Default@2x.png */; }; + 24D3BF8E1508D60F005923FE /* Capture.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8D1508D60F005923FE /* Capture.bundle */; }; + 24D3BF901508D60F005923FE /* Cordova.plist in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF8F1508D60F005923FE /* Cordova.plist */; }; + 24D3BF941508D60F005923FE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF931508D60F005923FE /* AppDelegate.m */; }; + 24D3BF971508D60F005923FE /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24D3BF961508D60F005923FE /* MainViewController.m */; }; + 24D3BF991508D60F005923FE /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF981508D60F005923FE /* MainViewController.xib */; }; + 24D3BF9D1508D60F005923FE /* verify.sh in Resources */ = {isa = PBXBuildFile; fileRef = 24D3BF9C1508D60F005923FE /* verify.sh */; }; + 24E16541150E0F9600F31308 /* www in Resources */ = {isa = PBXBuildFile; fileRef = 24E16540150E0F9600F31308 /* www */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 24D3BF471508D60F005923FE /* FixMyStreet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FixMyStreet.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 24D3BF4B1508D60F005923FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 24D3BF4D1508D60F005923FE /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 24D3BF511508D60F005923FE /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; }; + 24D3BF531508D60F005923FE /* AddressBookUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBookUI.framework; path = System/Library/Frameworks/AddressBookUI.framework; sourceTree = SDKROOT; }; + 24D3BF551508D60F005923FE /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 24D3BF571508D60F005923FE /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; + 24D3BF591508D60F005923FE /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; + 24D3BF5D1508D60F005923FE /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; + 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + 24D3BF611508D60F005923FE /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + 24D3BF631508D60F005923FE /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; }; + 24D3BF671508D60F005923FE /* FixMyStreet-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "FixMyStreet-Info.plist"; sourceTree = ""; }; + 24D3BF691508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 24D3BF6B1508D60F005923FE /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FixMyStreet-Prefix.pch"; sourceTree = ""; }; + 24D3BF6E1508D60F005923FE /* Cordova.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cordova.framework; path = /Users/Shared/Cordova/Frameworks/Cordova.framework; sourceTree = ""; }; + 24D3BF731508D60F005923FE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = ""; }; + 24D3BF771508D60F005923FE /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Resources/es.lproj/Localizable.strings; sourceTree = ""; }; + 24D3BF7B1508D60F005923FE /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = Resources/de.lproj/Localizable.strings; sourceTree = ""; }; + 24D3BF7F1508D60F005923FE /* se */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = se; path = Resources/se.lproj/Localizable.strings; sourceTree = ""; }; + 24D3BF821508D60F005923FE /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = Resources/icons/icon.png; sourceTree = ""; }; + 24D3BF841508D60F005923FE /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "Resources/icons/icon@2x.png"; sourceTree = ""; }; + 24D3BF861508D60F005923FE /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon-72.png"; path = "Resources/icons/icon-72.png"; sourceTree = ""; }; + 24D3BF891508D60F005923FE /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/splash/Default.png; sourceTree = ""; }; + 24D3BF8B1508D60F005923FE /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "Resources/splash/Default@2x.png"; sourceTree = ""; }; + 24D3BF8D1508D60F005923FE /* Capture.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = Capture.bundle; path = Resources/Capture.bundle; sourceTree = ""; }; + 24D3BF8F1508D60F005923FE /* Cordova.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Cordova.plist; sourceTree = ""; }; + 24D3BF921508D60F005923FE /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = Classes/AppDelegate.h; sourceTree = ""; }; + 24D3BF931508D60F005923FE /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = Classes/AppDelegate.m; sourceTree = ""; }; + 24D3BF951508D60F005923FE /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = Classes/MainViewController.h; sourceTree = ""; }; + 24D3BF961508D60F005923FE /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = Classes/MainViewController.m; sourceTree = ""; }; + 24D3BF981508D60F005923FE /* MainViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainViewController.xib; path = Classes/MainViewController.xib; sourceTree = ""; }; + 24D3BF9B1508D60F005923FE /* README */ = {isa = PBXFileReference; lastKnownFileType = text; name = README; path = Plugins/README; sourceTree = ""; }; + 24D3BF9C1508D60F005923FE /* verify.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = verify.sh; sourceTree = ""; }; + 24E16540150E0F9600F31308 /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../www; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 24D3BF411508D60F005923FE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 24D3BF4C1508D60F005923FE /* Foundation.framework in Frameworks */, + 24D3BF4E1508D60F005923FE /* UIKit.framework in Frameworks */, + 24D3BF501508D60F005923FE /* CoreGraphics.framework in Frameworks */, + 24D3BF521508D60F005923FE /* AddressBook.framework in Frameworks */, + 24D3BF541508D60F005923FE /* AddressBookUI.framework in Frameworks */, + 24D3BF561508D60F005923FE /* AudioToolbox.framework in Frameworks */, + 24D3BF581508D60F005923FE /* AVFoundation.framework in Frameworks */, + 24D3BF5A1508D60F005923FE /* CoreLocation.framework in Frameworks */, + 24D3BF5C1508D60F005923FE /* MediaPlayer.framework in Frameworks */, + 24D3BF5E1508D60F005923FE /* QuartzCore.framework in Frameworks */, + 24D3BF601508D60F005923FE /* SystemConfiguration.framework in Frameworks */, + 24D3BF621508D60F005923FE /* MobileCoreServices.framework in Frameworks */, + 24D3BF641508D60F005923FE /* CoreMedia.framework in Frameworks */, + 24D3BF6F1508D60F005923FE /* Cordova.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 24D3BF441508D60F005923FE /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 24D3BF391508D60E005923FE = { + isa = PBXGroup; + children = ( + 24E16540150E0F9600F31308 /* www */, + 24D3BF651508D60F005923FE /* FixMyStreet */, + 24D3BF4A1508D60F005923FE /* Frameworks */, + 24D3BF481508D60F005923FE /* Products */, + ); + sourceTree = ""; + }; + 24D3BF481508D60F005923FE /* Products */ = { + isa = PBXGroup; + children = ( + 24D3BF471508D60F005923FE /* FixMyStreet.app */, + ); + name = Products; + sourceTree = ""; + }; + 24D3BF4A1508D60F005923FE /* Frameworks */ = { + isa = PBXGroup; + children = ( + 24D3BF4B1508D60F005923FE /* Foundation.framework */, + 24D3BF4D1508D60F005923FE /* UIKit.framework */, + 24D3BF4F1508D60F005923FE /* CoreGraphics.framework */, + 24D3BF511508D60F005923FE /* AddressBook.framework */, + 24D3BF531508D60F005923FE /* AddressBookUI.framework */, + 24D3BF551508D60F005923FE /* AudioToolbox.framework */, + 24D3BF571508D60F005923FE /* AVFoundation.framework */, + 24D3BF591508D60F005923FE /* CoreLocation.framework */, + 24D3BF5B1508D60F005923FE /* MediaPlayer.framework */, + 24D3BF5D1508D60F005923FE /* QuartzCore.framework */, + 24D3BF5F1508D60F005923FE /* SystemConfiguration.framework */, + 24D3BF611508D60F005923FE /* MobileCoreServices.framework */, + 24D3BF631508D60F005923FE /* CoreMedia.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 24D3BF651508D60F005923FE /* FixMyStreet */ = { + isa = PBXGroup; + children = ( + 24D3BF6E1508D60F005923FE /* Cordova.framework */, + 24D3BF701508D60F005923FE /* Resources */, + 24D3BF911508D60F005923FE /* Classes */, + 24D3BF9A1508D60F005923FE /* Plugins */, + 24D3BF661508D60F005923FE /* Supporting Files */, + ); + path = FixMyStreet; + sourceTree = ""; + }; + 24D3BF661508D60F005923FE /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 24D3BF671508D60F005923FE /* FixMyStreet-Info.plist */, + 24D3BF681508D60F005923FE /* InfoPlist.strings */, + 24D3BF6B1508D60F005923FE /* main.m */, + 24D3BF6D1508D60F005923FE /* FixMyStreet-Prefix.pch */, + 24D3BF8F1508D60F005923FE /* Cordova.plist */, + 24D3BF981508D60F005923FE /* MainViewController.xib */, + 24D3BF9C1508D60F005923FE /* verify.sh */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 24D3BF701508D60F005923FE /* Resources */ = { + isa = PBXGroup; + children = ( + 24D3BF8D1508D60F005923FE /* Capture.bundle */, + 24D3BF711508D60F005923FE /* en.lproj */, + 24D3BF751508D60F005923FE /* es.lproj */, + 24D3BF791508D60F005923FE /* de.lproj */, + 24D3BF7D1508D60F005923FE /* se.lproj */, + 24D3BF811508D60F005923FE /* icons */, + 24D3BF881508D60F005923FE /* splash */, + ); + name = Resources; + sourceTree = ""; + }; + 24D3BF711508D60F005923FE /* en.lproj */ = { + isa = PBXGroup; + children = ( + 24D3BF721508D60F005923FE /* Localizable.strings */, + ); + name = en.lproj; + sourceTree = ""; + }; + 24D3BF751508D60F005923FE /* es.lproj */ = { + isa = PBXGroup; + children = ( + 24D3BF761508D60F005923FE /* Localizable.strings */, + ); + name = es.lproj; + sourceTree = ""; + }; + 24D3BF791508D60F005923FE /* de.lproj */ = { + isa = PBXGroup; + children = ( + 24D3BF7A1508D60F005923FE /* Localizable.strings */, + ); + name = de.lproj; + sourceTree = ""; + }; + 24D3BF7D1508D60F005923FE /* se.lproj */ = { + isa = PBXGroup; + children = ( + 24D3BF7E1508D60F005923FE /* Localizable.strings */, + ); + name = se.lproj; + sourceTree = ""; + }; + 24D3BF811508D60F005923FE /* icons */ = { + isa = PBXGroup; + children = ( + 24D3BF821508D60F005923FE /* icon.png */, + 24D3BF841508D60F005923FE /* icon@2x.png */, + 24D3BF861508D60F005923FE /* icon-72.png */, + ); + name = icons; + sourceTree = ""; + }; + 24D3BF881508D60F005923FE /* splash */ = { + isa = PBXGroup; + children = ( + 24D3BF891508D60F005923FE /* Default.png */, + 24D3BF8B1508D60F005923FE /* Default@2x.png */, + ); + name = splash; + sourceTree = ""; + }; + 24D3BF911508D60F005923FE /* Classes */ = { + isa = PBXGroup; + children = ( + 24D3BF921508D60F005923FE /* AppDelegate.h */, + 24D3BF931508D60F005923FE /* AppDelegate.m */, + 24D3BF951508D60F005923FE /* MainViewController.h */, + 24D3BF961508D60F005923FE /* MainViewController.m */, + ); + name = Classes; + sourceTree = ""; + }; + 24D3BF9A1508D60F005923FE /* Plugins */ = { + isa = PBXGroup; + children = ( + 24D3BF9B1508D60F005923FE /* README */, + ); + name = Plugins; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 24D3BF461508D60F005923FE /* FixMyStreet */ = { + isa = PBXNativeTarget; + buildConfigurationList = 24D3BFA01508D60F005923FE /* Build configuration list for PBXNativeTarget "FixMyStreet" */; + buildPhases = ( + 24D3BF401508D60F005923FE /* Sources */, + 24D3BF411508D60F005923FE /* Frameworks */, + 24D3BF421508D60F005923FE /* Resources */, + 24D3BF431508D60F005923FE /* Sources */, + 24D3BF441508D60F005923FE /* Frameworks */, + 24D3BF451508D60F005923FE /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FixMyStreet; + productName = FixMyStreet; + productReference = 24D3BF471508D60F005923FE /* FixMyStreet.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 24D3BF3B1508D60E005923FE /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0420; + }; + buildConfigurationList = 24D3BF3E1508D60E005923FE /* Build configuration list for PBXProject "FixMyStreet" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + es, + de, + se, + ); + mainGroup = 24D3BF391508D60E005923FE; + productRefGroup = 24D3BF481508D60F005923FE /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 24D3BF461508D60F005923FE /* FixMyStreet */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 24D3BF421508D60F005923FE /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24D3BF6A1508D60F005923FE /* InfoPlist.strings in Resources */, + 24D3BF741508D60F005923FE /* Localizable.strings in Resources */, + 24D3BF781508D60F005923FE /* Localizable.strings in Resources */, + 24D3BF7C1508D60F005923FE /* Localizable.strings in Resources */, + 24D3BF801508D60F005923FE /* Localizable.strings in Resources */, + 24D3BF831508D60F005923FE /* icon.png in Resources */, + 24D3BF851508D60F005923FE /* icon@2x.png in Resources */, + 24D3BF871508D60F005923FE /* icon-72.png in Resources */, + 24D3BF8A1508D60F005923FE /* Default.png in Resources */, + 24D3BF8C1508D60F005923FE /* Default@2x.png in Resources */, + 24D3BF8E1508D60F005923FE /* Capture.bundle in Resources */, + 24D3BF901508D60F005923FE /* Cordova.plist in Resources */, + 24D3BF991508D60F005923FE /* MainViewController.xib in Resources */, + 24D3BF9D1508D60F005923FE /* verify.sh in Resources */, + 24E16541150E0F9600F31308 /* www in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 24D3BF451508D60F005923FE /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/bash; + shellScript = "\n\t\t\t\t\t\t\t\tchmod 755 $PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t\t\t\t$PROJECT_DIR/$PROJECT_NAME/verify.sh\n\t\t\t\t\t"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 24D3BF401508D60F005923FE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 24D3BF6C1508D60F005923FE /* main.m in Sources */, + 24D3BF941508D60F005923FE /* AppDelegate.m in Sources */, + 24D3BF971508D60F005923FE /* MainViewController.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 24D3BF431508D60F005923FE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 24D3BF681508D60F005923FE /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 24D3BF691508D60F005923FE /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 24D3BF721508D60F005923FE /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 24D3BF731508D60F005923FE /* en */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 24D3BF761508D60F005923FE /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 24D3BF771508D60F005923FE /* es */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 24D3BF7A1508D60F005923FE /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 24D3BF7B1508D60F005923FE /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; + 24D3BF7E1508D60F005923FE /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 24D3BF7F1508D60F005923FE /* se */, + ); + name = Localizable.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 24D3BF9E1508D60F005923FE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + armv6, + "$(ARCHS_STANDARD_32_BIT)", + ); + CLANG_ENABLE_OBJC_ARC = NO; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.0; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 24D3BF9F1508D60F005923FE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + armv6, + "$(ARCHS_STANDARD_32_BIT)", + ); + CLANG_ENABLE_OBJC_ARC = NO; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 3.0; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 24D3BFA11508D60F005923FE /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = NO; + FRAMEWORK_SEARCH_PATHS = /Users/Shared/Cordova/Frameworks; + GCC_DYNAMIC_NO_PIC = NO; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "FixMyStreet/FixMyStreet-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1,", + "CORDOVA_FRAMEWORK=1", + ); + INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist"; + OTHER_LDFLAGS = ( + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak_library", + /usr/lib/libSystem.B.dylib, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; + VALIDATE_PRODUCT = YES; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 24D3BFA21508D60F005923FE /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + FRAMEWORK_SEARCH_PATHS = /Users/Shared/Cordova/Frameworks; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "FixMyStreet/FixMyStreet-Prefix.pch"; + GCC_PREPROCESSOR_DEFINITIONS = ( + "NDEBUG=1,", + "CORDOVA_FRAMEWORK=1", + ); + INFOPLIST_FILE = "FixMyStreet/FixMyStreet-Info.plist"; + OTHER_LDFLAGS = ( + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak_library", + /usr/lib/libSystem.B.dylib, + ); + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = 1; + VALIDATE_PRODUCT = NO; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 24D3BF3E1508D60E005923FE /* Build configuration list for PBXProject "FixMyStreet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24D3BF9E1508D60F005923FE /* Debug */, + 24D3BF9F1508D60F005923FE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 24D3BFA01508D60F005923FE /* Build configuration list for PBXNativeTarget "FixMyStreet" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 24D3BFA11508D60F005923FE /* Debug */, + 24D3BFA21508D60F005923FE /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 24D3BF3B1508D60E005923FE /* Project object */; +} diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..f65be0eea --- /dev/null +++ b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/xcuserdata/struan.xcuserdatad/UserInterfaceState.xcuserstate b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/xcuserdata/struan.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 000000000..6988f3dc1 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet.xcodeproj/project.xcworkspace/xcuserdata/struan.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme new file mode 100644 index 000000000..1bd90c562 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/FixMyStreet.xcscheme @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 000000000..0d3188478 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet.xcodeproj/xcuserdata/struan.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + FixMyStreet.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 24D3BF461508D60F005923FE + + primary + + + + + diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h new file mode 100644 index 000000000..f583369ad --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.h @@ -0,0 +1,52 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// AppDelegate.h +// FixMyStreet +// +// Created by Struan Donald on 08/03/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#import + +#ifdef CORDOVA_FRAMEWORK + #import +#else + #import "CDVViewController.h" +#endif + + +@interface AppDelegate : NSObject < UIApplicationDelegate, UIWebViewDelegate, CDVCommandDelegate > { + + NSString* invokeString; +} + +// invoke string is passed to your app on launch, this is only valid if you +// edit FooBar.plist to add a protocol +// a simple tutorial can be found here : +// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html + +@property (nonatomic, copy) NSString* invokeString; +@property (nonatomic, retain) IBOutlet UIWindow* window; +@property (nonatomic, retain) IBOutlet CDVViewController* viewController; + +@end + diff --git a/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m new file mode 100644 index 000000000..8faa38ca6 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Classes/AppDelegate.m @@ -0,0 +1,191 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// AppDelegate.m +// FixMyStreet +// +// Created by Struan Donald on 08/03/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#import "AppDelegate.h" +#import "MainViewController.h" + +#ifdef CORDOVA_FRAMEWORK + #import + #import +#else + #import "CDVPlugin.h" + #import "CDVURLProtocol.h" +#endif + + +@implementation AppDelegate + +@synthesize invokeString, window, viewController; + +- (id) init +{ + /** If you need to do any extra app-specific initialization, you can do it here + * -jm + **/ + NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; + + [CDVURLProtocol registerPGHttpURLProtocol]; + + return [super init]; +} + +#pragma UIApplicationDelegate implementation + +/** + * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up) + */ +- (BOOL) application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions +{ + NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey]; + if (url && [url isKindOfClass:[NSURL class]]) { + self.invokeString = [url absoluteString]; + NSLog(@"FixMyStreet launchOptions = %@", url); + } + + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; + self.window.autoresizesSubviews = YES; + + CGRect viewBounds = [[UIScreen mainScreen] applicationFrame]; + + self.viewController = [[[MainViewController alloc] init] autorelease]; + self.viewController.useSplashScreen = YES; + self.viewController.wwwFolderName = @"www"; + self.viewController.startPage = @"index.html"; + self.viewController.view.frame = viewBounds; + + // over-ride delegates + self.viewController.webView.delegate = self; + self.viewController.commandDelegate = self; + + // check whether the current orientation is supported: if it is, keep it, rather than forcing a rotation + BOOL forceStartupRotation = YES; + UIDeviceOrientation curDevOrientation = [[UIDevice currentDevice] orientation]; + + if (UIDeviceOrientationUnknown == curDevOrientation) { + // UIDevice isn't firing orientation notifications yet… go look at the status bar + curDevOrientation = (UIDeviceOrientation)[[UIApplication sharedApplication] statusBarOrientation]; + } + + if (UIDeviceOrientationIsValidInterfaceOrientation(curDevOrientation)) { + for (NSNumber *orient in self.viewController.supportedOrientations) { + if ([orient intValue] == curDevOrientation) { + forceStartupRotation = NO; + break; + } + } + } + + if (forceStartupRotation) { + NSLog(@"supportedOrientations: %@", self.viewController.supportedOrientations); + // The first item in the supportedOrientations array is the start orientation (guaranteed to be at least Portrait) + UIInterfaceOrientation newOrient = [[self.viewController.supportedOrientations objectAtIndex:0] intValue]; + NSLog(@"AppDelegate forcing status bar to: %d from: %d", newOrient, curDevOrientation); + [[UIApplication sharedApplication] setStatusBarOrientation:newOrient]; + } + + [self.window addSubview:self.viewController.view]; + [self.window makeKeyAndVisible]; + + return YES; +} + +// this happens while we are running ( in the background, or from within our own app ) +// only valid if FooBar.plist specifies a protocol to handle +- (BOOL) application:(UIApplication*)application handleOpenURL:(NSURL*)url +{ + if (!url) { + return NO; + } + + // calls into javascript global function 'handleOpenURL' + NSString* jsString = [NSString stringWithFormat:@"handleOpenURL(\"%@\");", url]; + [self.viewController.webView stringByEvaluatingJavaScriptFromString:jsString]; + + // all plugins will get the notification, and their handlers will be called + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + + return YES; +} + +#pragma PGCommandDelegate implementation + +- (id) getCommandInstance:(NSString*)className +{ + return [self.viewController getCommandInstance:className]; +} + +- (BOOL) execute:(CDVInvokedUrlCommand*)command +{ + return [self.viewController execute:command]; +} + +- (NSString*) pathForResource:(NSString*)resourcepath; +{ + return [self.viewController pathForResource:resourcepath]; +} + +#pragma UIWebDelegate implementation + +- (void) webViewDidFinishLoad:(UIWebView*) theWebView +{ + // only valid if FooBar.plist specifies a protocol to handle + if (self.invokeString) + { + // this is passed before the deviceready event is fired, so you can access it in js when you receive deviceready + NSString* jsString = [NSString stringWithFormat:@"var invokeString = \"%@\";", self.invokeString]; + [theWebView stringByEvaluatingJavaScriptFromString:jsString]; + } + + // Black base color for background matches the native apps + theWebView.backgroundColor = [UIColor blackColor]; + + return [self.viewController webViewDidFinishLoad:theWebView]; +} + +- (void) webViewDidStartLoad:(UIWebView*)theWebView +{ + return [self.viewController webViewDidStartLoad:theWebView]; +} + +- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + return [self.viewController webView:theWebView didFailLoadWithError:error]; +} + +- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + return [self.viewController webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; +} + +- (void) dealloc +{ + [super dealloc]; +} + +@end diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h new file mode 100644 index 000000000..3222496ce --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.h @@ -0,0 +1,36 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// MainViewController.h +// FixMyStreet +// +// Created by Struan Donald on 08/03/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#ifdef CORDOVA_FRAMEWORK + #import +#else + #import "CDVViewController.h" +#endif + +@interface MainViewController : CDVViewController + +@end diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m new file mode 100644 index 000000000..ef5d1c0be --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.m @@ -0,0 +1,70 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// MainViewController.h +// FixMyStreet +// +// Created by Struan Donald on 08/03/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#import "MainViewController.h" + +@implementation MainViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +#pragma mark - View lifecycle + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. +} + +- (void)viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + // Return YES for supported orientations + return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; +} + +@end diff --git a/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib new file mode 100644 index 000000000..9837f578c --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Classes/MainViewController.xib @@ -0,0 +1,118 @@ + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + + + MainViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + MainViewController + UIViewController + + IBProjectSource + ./Classes/MainViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 916 + + diff --git a/phonegap/iPhone/FixMyStreet/Cordova.plist b/phonegap/iPhone/FixMyStreet/Cordova.plist new file mode 100644 index 000000000..dd600894d --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Cordova.plist @@ -0,0 +1,62 @@ + + + + + UIWebViewBounce + + TopActivityIndicator + gray + EnableLocation + + EnableViewportScale + + AutoHideSplashScreen + + ShowSplashScreenSpinner + + MediaPlaybackRequiresUserAction + + AllowInlineMediaPlayback + + OpenAllWhitelistURLsInWebView + + ExternalHosts + + photek.local + mapit.mysociety.org + matthew.fixmystreet.dev.mysociety.org + *.tile.openstreetmap.org + struan.fixmystreet.com + *.virtualearth.net + + Plugins + + org.apache.cordova.accelerometer + CDVAccelerometer + org.apache.cordova.camera + CDVCamera + org.apache.cordova.connection + CDVConnection + org.apache.cordova.contacts + CDVContacts + org.apache.cordova.debugconsole + CDVDebugConsole + org.apache.cordova.file + CDVFile + org.apache.cordova.filetransfer + CDVFileTransfer + org.apache.cordova.geolocation + CDVLocation + org.apache.cordova.notification + CDVNotification + org.apache.cordova.media + CDVSound + org.apache.cordova.mediacapture + CDVCapture + org.apache.cordova.splashscreen + CDVSplashScreen + org.apache.cordova.battery + CDVBattery + + + diff --git a/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist b/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist new file mode 100644 index 000000000..2bc039db3 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/FixMyStreet-Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + icon.png + CFBundleIconFiles + + icon.png + icon@2x.png + icon-72.png + + CFBundleIdentifier + org.mysociety.FixMyStreet + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 2.0 + CFBundleSignature + ???? + CFBundleVersion + 2.0 + LSRequiresIPhoneOS + + NSMainNibFile + + NSMainNibFile~ipad + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeRight + + + diff --git a/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch b/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch new file mode 100644 index 000000000..b74079015 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/FixMyStreet-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'FixMyStreet' target in the 'FixMyStreet' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/phonegap/iPhone/FixMyStreet/Plugins/README b/phonegap/iPhone/FixMyStreet/Plugins/README new file mode 100644 index 000000000..438840dbc --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Plugins/README @@ -0,0 +1 @@ +Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. \ No newline at end of file diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png new file mode 100644 index 000000000..784e9c7dd Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png new file mode 100644 index 000000000..1e28c6dbc Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png new file mode 100644 index 000000000..efbef8aaa Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/controls_bg~ipad.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png new file mode 100644 index 000000000..155b88cae Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png new file mode 100644 index 000000000..79ef16bac Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png new file mode 100644 index 000000000..ef1c472bf Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/microphone~ipad.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png new file mode 100644 index 000000000..ceb95898f Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png new file mode 100644 index 000000000..d6ce30281 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png new file mode 100644 index 000000000..d8e24a4d0 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/record_button~ipad.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png new file mode 100644 index 000000000..bafc087e2 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png new file mode 100644 index 000000000..798490b0f Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png new file mode 100644 index 000000000..3b467f632 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/recording_bg~ipad.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png new file mode 100644 index 000000000..9c31838a4 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png new file mode 100644 index 000000000..8cf657eaa Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png new file mode 100644 index 000000000..59bb7a573 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/Capture.bundle/stop_button~ipad.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings new file mode 100644 index 000000000..f1cdb42d1 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Resources/de.lproj/Localizable.strings @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + + +// accessibility label for recording button +"toggle audio recording" = "starten/beenden der Tonaufnahme"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "programmierte Aufnahme beendet"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "aufgenommene Zeit in Minuten und Sekunden"; \ No newline at end of file diff --git a/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings new file mode 100644 index 000000000..897268443 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Resources/en.lproj/Localizable.strings @@ -0,0 +1,25 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// accessibility label for recording button +"toggle audio recording" = "toggle audio recording"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "timed recording complete"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "recorded time in minutes and seconds"; \ No newline at end of file diff --git a/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings new file mode 100644 index 000000000..23831e662 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Resources/es.lproj/Localizable.strings @@ -0,0 +1,25 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// accessibility label for recording button +"toggle audio recording" = "grabación de audio cambiar"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "tiempo de grabación completo"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "tiempo registrado en minutos y segundos"; \ No newline at end of file diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png new file mode 100644 index 000000000..8c6e5df34 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/icons/icon-72.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png new file mode 100644 index 000000000..b2571a719 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/icons/icon.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png b/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png new file mode 100644 index 000000000..d75098f5a Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/icons/icon@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings b/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings new file mode 100644 index 000000000..0af964685 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/Resources/se.lproj/Localizable.strings @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + + +// accessibility label for recording button +"toggle audio recording" = "börja/avsluta inspelning"; +// notification spoken by VoiceOver when timed recording finishes +"timed recording complete" = "inspelning har avslutad"; +// accessibility hint for display of recorded elapsed time +"recorded time in minutes and seconds" = "inspelad tid in minuter och sekund"; \ No newline at end of file diff --git a/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png b/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png new file mode 100644 index 000000000..644f3804c Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/splash/Default.png differ diff --git a/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png b/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png new file mode 100644 index 000000000..02d6e3593 Binary files /dev/null and b/phonegap/iPhone/FixMyStreet/Resources/splash/Default@2x.png differ diff --git a/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings b/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/phonegap/iPhone/FixMyStreet/main.m b/phonegap/iPhone/FixMyStreet/main.m new file mode 100644 index 000000000..b6fba52b1 --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/main.m @@ -0,0 +1,35 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ +// +// main.m +// FixMyStreet +// +// Created by Struan Donald on 08/03/2012. +// Copyright __MyCompanyName__ 2012. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) { + + NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; + int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); + [pool release]; + return retVal; +} diff --git a/phonegap/iPhone/FixMyStreet/verify.sh b/phonegap/iPhone/FixMyStreet/verify.sh new file mode 100755 index 000000000..0f6f0373c --- /dev/null +++ b/phonegap/iPhone/FixMyStreet/verify.sh @@ -0,0 +1,12 @@ +#!/bin/sh + + +if [ ! -d "$PROJECT_DIR/www" ] ; then + cp -R /Users/Shared/Cordova/Frameworks/Cordova.framework/www "$PROJECT_DIR" +fi +# detect www folder reference in project, if missing, print warning +grep "{isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = \"\"; };" "$PROJECT_DIR/$PROJECT_NAME.xcodeproj/project.pbxproj" +rc=$? +if [ $rc != 0 ] ; then +echo -e "warning: Missing - Add $PROJECT_DIR/www as a folder reference in your project. Just drag and drop the folder into your project, into the Project Navigator of Xcode 4. Make sure you select the second radio-button: 'Create folder references for any added folders' (which will create a blue folder)" 1>&2 +fi \ No newline at end of file diff --git a/phonegap/www/around.html b/phonegap/www/around.html new file mode 100644 index 000000000..6c379b898 --- /dev/null +++ b/phonegap/www/around.html @@ -0,0 +1,338 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Viewing a location :: FixMyStreet + + + + + + + +
+
+ + +
+ +
+ +
+
+ + +
+ + + + + + + + + + + + + +
+ +
+ + + +
+ + + + +
+ +

Click map to report a problem

+ +

+ Can't see the map? Skip this step +

+ +
+ +
+ +
+ + + + +
    + +
  • No problems have been reported yet.

  • + + +
+ +
    + +
  • No problems found.

  • + + +
+
+
+ + +
+ + +
+
+
+ + + + +
+ + diff --git a/phonegap/www/cordova-1.5.0.js b/phonegap/www/cordova-1.5.0.js new file mode 100644 index 000000000..36c2383e1 --- /dev/null +++ b/phonegap/www/cordova-1.5.0.js @@ -0,0 +1,4135 @@ +/* Cordova v1.5.0 */ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + + +/* + * Some base contributions + * Copyright (c) 2011, Proyectos Equis Ka, S.L. + */ + +if (typeof Cordova === "undefined") { + +if (typeof(DeviceInfo) !== 'object'){ + DeviceInfo = {}; +} +/** + * This represents the Cordova API itself, and provides a global namespace for accessing + * information about the state of Cordova. + * @class + */ +Cordova = { + // This queue holds the currently executing command and all pending + // commands executed with Cordova.exec(). + commandQueue: [], + // Indicates if we're currently in the middle of flushing the command + // queue on the native side. + commandQueueFlushing: false, + _constructors: [], + documentEventHandler: {}, // Collection of custom document event handlers + windowEventHandler: {} +}; + +/** + * List of resource files loaded by Cordova. + * This is used to ensure JS and other files are loaded only once. + */ +Cordova.resources = {base: true}; + +/** + * Determine if resource has been loaded by Cordova + * + * @param name + * @return + */ +Cordova.hasResource = function(name) { + return Cordova.resources[name]; +}; + +/** + * Add a resource to list of loaded resources by Cordova + * + * @param name + */ +Cordova.addResource = function(name) { + Cordova.resources[name] = true; +}; + +/** + * Boolean flag indicating if the Cordova API is available and initialized. + */ // TODO: Remove this, it is unused here ... -jm +Cordova.available = DeviceInfo.uuid != undefined; + +/** + * Add an initialization function to a queue that ensures it will run and initialize + * application constructors only once Cordova has been initialized. + * @param {Function} func The function callback you want run once Cordova is initialized + */ +Cordova.addConstructor = function(func) { + var state = document.readyState; + if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null ) + { + func(); + } + else + { + Cordova._constructors.push(func); + } +}; + +(function() + { + var timer = setInterval(function() + { + + var state = document.readyState; + + if ( ( state == 'loaded' || state == 'complete' ) && DeviceInfo.uuid != null ) + { + clearInterval(timer); // stop looking + // run our constructors list + while (Cordova._constructors.length > 0) + { + var constructor = Cordova._constructors.shift(); + try + { + constructor(); + } + catch(e) + { + if (typeof(console['log']) == 'function') + { + console.log("Failed to run constructor: " + console.processMessage(e)); + } + else + { + alert("Failed to run constructor: " + e.message); + } + } + } + // all constructors run, now fire the deviceready event + var e = document.createEvent('Events'); + e.initEvent('deviceready'); + document.dispatchEvent(e); + } + }, 1); +})(); + +// session id for calls +Cordova.sessionKey = 0; + +// centralized callbacks +Cordova.callbackId = 0; +Cordova.callbacks = {}; +Cordova.callbackStatus = { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9 + }; + +/** + * Creates a gap bridge iframe used to notify the native code about queued + * commands. + * + * @private + */ +Cordova.createGapBridge = function() { + gapBridge = document.createElement("iframe"); + gapBridge.setAttribute("style", "display:none;"); + gapBridge.setAttribute("height","0px"); + gapBridge.setAttribute("width","0px"); + gapBridge.setAttribute("frameborder","0"); + document.documentElement.appendChild(gapBridge); + return gapBridge; +} + +/** + * Execute a Cordova command by queuing it and letting the native side know + * there are queued commands. The native side will then request all of the + * queued commands and execute them. + * + * Arguments may be in one of two formats: + * + * FORMAT ONE (preferable) + * The native side will call Cordova.callbackSuccess or + * Cordova.callbackError, depending upon the result of the action. + * + * @param {Function} success The success callback + * @param {Function} fail The fail callback + * @param {String} service The name of the service to use + * @param {String} action The name of the action to use + * @param {String[]} [args] Zero or more arguments to pass to the method + * + * FORMAT TWO + * @param {String} command Command to be run in Cordova, e.g. + * "ClassName.method" + * @param {String[]} [args] Zero or more arguments to pass to the method + * object parameters are passed as an array object + * [object1, object2] each object will be passed as + * JSON strings + */ +Cordova.exec = function() { + if (!Cordova.available) { + alert("ERROR: Attempting to call Cordova.exec()" + +" before 'deviceready'. Ignoring."); + return; + } + + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== "string") { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + // FORMAT TWO + splitCommand = arguments[0].split("."); + action = splitCommand.pop(); + service = splitCommand.join("."); + actionArgs = Array.prototype.splice.call(arguments, 1); + } + + // Start building the command object. + var command = { + className: service, + methodName: action, + arguments: [] + }; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + Cordova.callbackId++; + Cordova.callbacks[callbackId] = + {success:successCallback, fail:failCallback}; + } + if (callbackId != null) { + command.arguments.push(callbackId); + } + + for (var i = 0; i < actionArgs.length; ++i) { + var arg = actionArgs[i]; + if (arg == undefined || arg == null) { + continue; + } else if (typeof(arg) == 'object') { + command.options = arg; + } else { + command.arguments.push(arg); + } + } + + // Stringify and queue the command. We stringify to command now to + // effectively clone the command arguments in case they are mutated before + // the command is executed. + Cordova.commandQueue.push(JSON.stringify(command)); + + // If the queue length is 1, then that means it was empty before we queued + // the given command, so let the native side know that we have some + // commands to execute, unless the queue is currently being flushed, in + // which case the command will be picked up without notification. + if (Cordova.commandQueue.length == 1 && !Cordova.commandQueueFlushing) { + if (!Cordova.gapBridge) { + Cordova.gapBridge = Cordova.createGapBridge(); + } + + Cordova.gapBridge.src = "gap://ready"; + } +} + +/** + * Called by native code to retrieve all queued commands and clear the queue. + */ +Cordova.getAndClearQueuedCommands = function() { + json = JSON.stringify(Cordova.commandQueue); + Cordova.commandQueue = []; + return json; +} + +/** + * Called by native code when returning successful result from an action. + * + * @param callbackId + * @param args + * args.status - Cordova.callbackStatus + * args.message - return value + * args.keepCallback - 0 to remove callback, 1 to keep callback in Cordova.callbacks[] + */ +Cordova.callbackSuccess = function(callbackId, args) { + if (Cordova.callbacks[callbackId]) { + + // If result is to be sent to callback + if (args.status == Cordova.callbackStatus.OK) { + try { + if (Cordova.callbacks[callbackId].success) { + Cordova.callbacks[callbackId].success(args.message); + } + } + catch (e) { + console.log("Error in success callback: "+callbackId+" = "+e); + } + } + + // Clear callback if not expecting any more results + if (!args.keepCallback) { + delete Cordova.callbacks[callbackId]; + } + } +}; + +/** + * Called by native code when returning error result from an action. + * + * @param callbackId + * @param args + */ +Cordova.callbackError = function(callbackId, args) { + if (Cordova.callbacks[callbackId]) { + try { + if (Cordova.callbacks[callbackId].fail) { + Cordova.callbacks[callbackId].fail(args.message); + } + } + catch (e) { + console.log("Error in error callback: "+callbackId+" = "+e); + } + + // Clear callback if not expecting any more results + if (!args.keepCallback) { + delete Cordova.callbacks[callbackId]; + } + } +}; + + +/** + * Does a deep clone of the object. + * + * @param obj + * @return + */ +Cordova.clone = function(obj) { + if(!obj) { + return obj; + } + + if(obj instanceof Array){ + var retVal = new Array(); + for(var i = 0; i < obj.length; ++i){ + retVal.push(Cordova.clone(obj[i])); + } + return retVal; + } + + if (obj instanceof Function) { + return obj; + } + + if(!(obj instanceof Object)){ + return obj; + } + + if (obj instanceof Date) { + return obj; + } + + retVal = new Object(); + for(i in obj){ + if(!(i in retVal) || retVal[i] != obj[i]) { + retVal[i] = Cordova.clone(obj[i]); + } + } + return retVal; +}; + +// Intercept calls to document.addEventListener +Cordova.m_document_addEventListener = document.addEventListener; + +// Intercept calls to window.addEventListener +Cordova.m_window_addEventListener = window.addEventListener; + +/** + * Add a custom window event handler. + * + * @param {String} event The event name that callback handles + * @param {Function} callback The event handler + */ +Cordova.addWindowEventHandler = function(event, callback) { + Cordova.windowEventHandler[event] = callback; +} + +/** + * Add a custom document event handler. + * + * @param {String} event The event name that callback handles + * @param {Function} callback The event handler + */ +Cordova.addDocumentEventHandler = function(event, callback) { + Cordova.documentEventHandler[event] = callback; +} + +/** + * Intercept adding document event listeners and handle our own + * + * @param {Object} evt + * @param {Function} handler + * @param capture + */ +document.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + + // If subscribing to an event that is handled by a plugin + if (typeof Cordova.documentEventHandler[e] !== "undefined") { + if (Cordova.documentEventHandler[e](e, handler, true)) { + return; // Stop default behavior + } + } + + Cordova.m_document_addEventListener.call(document, evt, handler, capture); +}; + +/** + * Intercept adding window event listeners and handle our own + * + * @param {Object} evt + * @param {Function} handler + * @param capture + */ +window.addEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + + // If subscribing to an event that is handled by a plugin + if (typeof Cordova.windowEventHandler[e] !== "undefined") { + if (Cordova.windowEventHandler[e](e, handler, true)) { + return; // Stop default behavior + } + } + + Cordova.m_window_addEventListener.call(window, evt, handler, capture); +}; + +// Intercept calls to document.removeEventListener and watch for events that +// are generated by Cordova native code +Cordova.m_document_removeEventListener = document.removeEventListener; + +// Intercept calls to window.removeEventListener +Cordova.m_window_removeEventListener = window.removeEventListener; + +/** + * Intercept removing document event listeners and handle our own + * + * @param {Object} evt + * @param {Function} handler + * @param capture + */ +document.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + + // If unsubcribing from an event that is handled by a plugin + if (typeof Cordova.documentEventHandler[e] !== "undefined") { + if (Cordova.documentEventHandler[e](e, handler, false)) { + return; // Stop default behavior + } + } + + Cordova.m_document_removeEventListener.call(document, evt, handler, capture); +}; + +/** + * Intercept removing window event listeners and handle our own + * + * @param {Object} evt + * @param {Function} handler + * @param capture + */ +window.removeEventListener = function(evt, handler, capture) { + var e = evt.toLowerCase(); + + // If unsubcribing from an event that is handled by a plugin + if (typeof Cordova.windowEventHandler[e] !== "undefined") { + if (Cordova.windowEventHandler[e](e, handler, false)) { + return; // Stop default behavior + } + } + + Cordova.m_window_removeEventListener.call(window, evt, handler, capture); +}; + +/** + * Method to fire document event + * + * @param {String} type The event type to fire + * @param {Object} data Data to send with event + */ +Cordova.fireDocumentEvent = function(type, data) { + var e = document.createEvent('Events'); + e.initEvent(type); + if (data) { + for (var i in data) { + e[i] = data[i]; + } + } + document.dispatchEvent(e); +}; + +/** + * Method to fire window event + * + * @param {String} type The event type to fire + * @param {Object} data Data to send with event + */ +Cordova.fireWindowEvent = function(type, data) { + var e = document.createEvent('Events'); + e.initEvent(type); + if (data) { + for (var i in data) { + e[i] = data[i]; + } + } + window.dispatchEvent(e); +}; + +/** + * Method to fire event from native code + * Leaving this generic version to handle problems with iOS 3.x. Is currently used by orientation and battery events + * Remove when iOS 3.x no longer supported and call fireWindowEvent or fireDocumentEvent directly + */ +Cordova.fireEvent = function(type, target, data) { + var e = document.createEvent('Events'); + e.initEvent(type); + if (data) { + for (var i in data) { + e[i] = data[i]; + } + } + target = target || document; + if (target.dispatchEvent === undefined) { // ie window.dispatchEvent is undefined in iOS 3.x + target = document; + } + + target.dispatchEvent(e); +}; +/** + * Create a UUID + * + * @return + */ +Cordova.createUUID = function() { + return Cordova.UUIDcreatePart(4) + '-' + + Cordova.UUIDcreatePart(2) + '-' + + Cordova.UUIDcreatePart(2) + '-' + + Cordova.UUIDcreatePart(2) + '-' + + Cordova.UUIDcreatePart(6); +}; + +Cordova.UUIDcreatePart = function(length) { + var uuidpart = ""; + for (var i=0; i -1) { + me._batteryListener.splice(pos, 1); + } + } else if (eventType === "batterylow") { + var pos = me._lowListener.indexOf(handler); + if (pos > -1) { + me._lowListener.splice(pos, 1); + } + } else if (eventType === "batterycritical") { + var pos = me._criticalListener.indexOf(handler); + if (pos > -1) { + me._criticalListener.splice(pos, 1); + } + } + + // If there are no more registered event listeners stop the battery listener on native side. + if (me._batteryListener.length === 0 && me._lowListener.length === 0 && me._criticalListener.length === 0) { + Cordova.exec(null, null, "org.apache.cordova.battery", "stop", []); + } + } +}; + +/** + * Callback for battery status + * + * @param {Object} info keys: level, isPlugged + */ +Battery.prototype._status = function(info) { + if (info) { + var me = this; + if (me._level != info.level || me._isPlugged != info.isPlugged) { + // Fire batterystatus event + //Cordova.fireWindowEvent("batterystatus", info); + // use this workaround since iOS 3.x does have window.dispatchEvent + Cordova.fireEvent("batterystatus", window, info); + + // Fire low battery event + if (info.level == 20 || info.level == 5) { + if (info.level == 20) { + //Cordova.fireWindowEvent("batterylow", info); + // use this workaround since iOS 3.x does not have window.dispatchEvent + Cordova.fireEvent("batterylow", window, info); + } + else { + //Cordova.fireWindowEvent("batterycritical", info); + // use this workaround since iOS 3.x does not have window.dispatchEvent + Cordova.fireEvent("batterycritical", window, info); + } + } + } + me._level = info.level; + me._isPlugged = info.isPlugged; + } +}; + +/** + * Error callback for battery start + */ +Battery.prototype._error = function(e) { + console.log("Error initializing Battery: " + e); +}; + +Cordova.addConstructor(function() { + if (typeof navigator.battery === "undefined") { + navigator.battery = new Battery(); + Cordova.addWindowEventHandler("batterystatus", navigator.battery.eventHandler); + Cordova.addWindowEventHandler("batterylow", navigator.battery.eventHandler); + Cordova.addWindowEventHandler("batterycritical", navigator.battery.eventHandler); + } +}); +}if (!Cordova.hasResource("camera")) { + Cordova.addResource("camera"); + + +/** + * This class provides access to the device camera. + * @constructor + */ +Camera = function() { + +} +/** + * Available Camera Options + * {boolean} allowEdit - true to allow editing image, default = false + * {number} quality 0-100 (low to high) default = 100 + * {Camera.DestinationType} destinationType default = DATA_URL + * {Camera.PictureSourceType} sourceType default = CAMERA + * {number} targetWidth - width in pixels to scale image default = 0 (no scaling) + * {number} targetHeight - height in pixels to scale image default = 0 (no scaling) + * {Camera.EncodingType} - encodingType default = JPEG + * {boolean} correctOrientation - Rotate the image to correct for the orientation of the device during capture (iOS only) + * {boolean} saveToPhotoAlbum - Save the image to the photo album on the device after capture (iOS only) + */ +/** + * Format of image that is returned from getPicture. + * + * Example: navigator.camera.getPicture(success, fail, + * { quality: 80, + * destinationType: Camera.DestinationType.DATA_URL, + * sourceType: Camera.PictureSourceType.PHOTOLIBRARY}) + */ +Camera.DestinationType = { + DATA_URL: 0, // Return base64 encoded string + FILE_URI: 1 // Return file uri +}; +Camera.prototype.DestinationType = Camera.DestinationType; + +/** + * Source to getPicture from. + * + * Example: navigator.camera.getPicture(success, fail, + * { quality: 80, + * destinationType: Camera.DestinationType.DATA_URL, + * sourceType: Camera.PictureSourceType.PHOTOLIBRARY}) + */ +Camera.PictureSourceType = { + PHOTOLIBRARY : 0, // Choose image from picture library + CAMERA : 1, // Take picture from camera + SAVEDPHOTOALBUM : 2 // Choose image from picture library +}; +Camera.prototype.PictureSourceType = Camera.PictureSourceType; + +/** + * Encoding of image returned from getPicture. + * + * Example: navigator.camera.getPicture(success, fail, + * { quality: 80, + * destinationType: Camera.DestinationType.DATA_URL, + * sourceType: Camera.PictureSourceType.CAMERA, + * encodingType: Camera.EncodingType.PNG}) + */ +Camera.EncodingType = { + JPEG: 0, // Return JPEG encoded image + PNG: 1 // Return PNG encoded image +}; +Camera.prototype.EncodingType = Camera.EncodingType; + +/** + * Type of pictures to select from. Only applicable when + * PictureSourceType is PHOTOLIBRARY or SAVEDPHOTOALBUM + * + * Example: navigator.camera.getPicture(success, fail, + * { quality: 80, + * destinationType: Camera.DestinationType.DATA_URL, + * sourceType: Camera.PictureSourceType.PHOTOLIBRARY, + * mediaType: Camera.MediaType.PICTURE}) + */ +Camera.MediaType = { + PICTURE: 0, // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType + VIDEO: 1, // allow selection of video only, ONLY RETURNS URL + ALLMEDIA : 2 // allow selection from all media types +}; +Camera.prototype.MediaType = Camera.MediaType; + +/** + * Gets a picture from source defined by "options.sourceType", and returns the + * image as defined by the "options.destinationType" option. + + * The defaults are sourceType=CAMERA and destinationType=DATA_URL. + * + * @param {Function} successCallback + * @param {Function} errorCallback + * @param {Object} options + */ +Camera.prototype.getPicture = function(successCallback, errorCallback, options) { + // successCallback required + if (typeof successCallback != "function") { + console.log("Camera Error: successCallback is not a function"); + return; + } + + // errorCallback optional + if (errorCallback && (typeof errorCallback != "function")) { + console.log("Camera Error: errorCallback is not a function"); + return; + } + + Cordova.exec(successCallback, errorCallback, "org.apache.cordova.camera","getPicture",[options]); +}; + + + +Cordova.addConstructor(function() { + if (typeof navigator.camera == "undefined") navigator.camera = new Camera(); +}); +}; + +if (!Cordova.hasResource("device")) { + Cordova.addResource("device"); + +/** + * this represents the mobile device, and provides properties for inspecting the model, version, UUID of the + * phone, etc. + * @constructor + */ +Device = function() +{ + this.platform = null; + this.version = null; + this.name = null; + this.cordova = null; + this.uuid = null; + try + { + this.platform = DeviceInfo.platform; + this.version = DeviceInfo.version; + this.name = DeviceInfo.name; + this.cordova = DeviceInfo.gap; + this.uuid = DeviceInfo.uuid; + + } + catch(e) + { + // TODO: + } + this.available = Cordova.available = this.uuid != null; +} + +Cordova.addConstructor(function() { + if (typeof navigator.device === "undefined") { + navigator.device = window.device = new Device(); + } +}); +}; +if (!Cordova.hasResource("capture")) { + Cordova.addResource("capture"); +/** + * The CaptureError interface encapsulates all errors in the Capture API. + */ +function CaptureError() { + this.code = null; +}; + +// Capture error codes +CaptureError.CAPTURE_INTERNAL_ERR = 0; +CaptureError.CAPTURE_APPLICATION_BUSY = 1; +CaptureError.CAPTURE_INVALID_ARGUMENT = 2; +CaptureError.CAPTURE_NO_MEDIA_FILES = 3; +CaptureError.CAPTURE_NOT_SUPPORTED = 20; + +/** + * The Capture interface exposes an interface to the camera and microphone of the hosting device. + */ +function Capture() { + this.supportedAudioModes = []; + this.supportedImageModes = []; + this.supportedVideoModes = []; +}; + +/** + * Launch audio recorder application for recording audio clip(s). + * + * @param {Function} successCB + * @param {Function} errorCB + * @param {CaptureAudioOptions} options + * + * No audio recorder to launch for iOS - return CAPTURE_NOT_SUPPORTED + */ +Capture.prototype.captureAudio = function(successCallback, errorCallback, options) { + /*if (errorCallback && typeof errorCallback === "function") { + errorCallback({ + "code": CaptureError.CAPTURE_NOT_SUPPORTED + }); + }*/ + Cordova.exec(successCallback, errorCallback, "org.apache.cordova.mediacapture", "captureAudio", [options]); +}; + +/** + * Launch camera application for taking image(s). + * + * @param {Function} successCB + * @param {Function} errorCB + * @param {CaptureImageOptions} options + */ +Capture.prototype.captureImage = function(successCallback, errorCallback, options) { + Cordova.exec(successCallback, errorCallback, "org.apache.cordova.mediacapture", "captureImage", [options]); +}; + +/** + * Casts a PluginResult message property (array of objects) to an array of MediaFile objects + * (used in Objective-C) + * + * @param {PluginResult} pluginResult + */ +Capture.prototype._castMediaFile = function(pluginResult) { + var mediaFiles = []; + var i; + for (i=0; i} categories +* @param {ContactField[]} urls contact's web sites +*/ +var Contact = function(id, displayName, name, nickname, phoneNumbers, emails, addresses, + ims, organizations, birthday, note, photos, categories, urls) { + this.id = id || null; + this.displayName = displayName || null; + this.name = name || null; // ContactName + this.nickname = nickname || null; + this.phoneNumbers = phoneNumbers || null; // ContactField[] + this.emails = emails || null; // ContactField[] + this.addresses = addresses || null; // ContactAddress[] + this.ims = ims || null; // ContactField[] + this.organizations = organizations || null; // ContactOrganization[] + this.birthday = birthday || null; // JS Date + this.note = note || null; + this.photos = photos || null; // ContactField[] + this.categories = categories || null; + this.urls = urls || null; // ContactField[] +}; + +/** +* Converts Dates to milliseconds before sending to iOS +*/ +Contact.prototype.convertDatesOut = function() +{ + var dates = new Array("birthday"); + for (var i=0; i][;base64], + * + * @param file {File} File object containing file properties + */ +FileReader.prototype.readAsDataURL = function(file) { + this.fileName = ""; + + if (typeof file.fullPath === "undefined") { + this.fileName = file; + } else { + this.fileName = file.fullPath; + } + + // LOADING state + this.readyState = FileReader.LOADING; + + // If loadstart callback + if (typeof this.onloadstart === "function") { + var evt = File._createEvent("loadstart", this); + this.onloadstart(evt); + } + + var me = this; + + // Read file + navigator.fileMgr.readAsDataURL(this.fileName, + + // Success callback + function(r) { + var evt; + + // If DONE (cancelled), then don't do anything + if (me.readyState === FileReader.DONE) { + return; + } + + // Save result + me.result = r; + + // If onload callback + if (typeof me.onload === "function") { + evt = File._createEvent("load", me); + me.onload(evt); + } + + // DONE state + me.readyState = FileReader.DONE; + + // If onloadend callback + if (typeof me.onloadend === "function") { + evt = File._createEvent("loadend", me); + me.onloadend(evt); + } + }, + + // Error callback + function(e) { + var evt; + // If DONE (cancelled), then don't do anything + if (me.readyState === FileReader.DONE) { + return; + } + + // Save error + me.error = e; + + // If onerror callback + if (typeof me.onerror === "function") { + evt = File._createEvent("error", me); + me.onerror(evt); + } + + // DONE state + me.readyState = FileReader.DONE; + + // If onloadend callback + if (typeof me.onloadend === "function") { + evt = File._createEvent("loadend", me); + me.onloadend(evt); + } + } + ); +}; + +/** + * Read file and return data as a binary data. + * + * @param file The name of the file + */ +FileReader.prototype.readAsBinaryString = function(file) { + // TODO - Can't return binary data to browser. + this.fileName = file; +}; + +/** + * Read file and return data as a binary data. + * + * @param file The name of the file + */ +FileReader.prototype.readAsArrayBuffer = function(file) { + // TODO - Can't return binary data to browser. + this.fileName = file; +}; + +//----------------------------------------------------------------------------- +// File Writer +//----------------------------------------------------------------------------- + +/** + * This class writes to the mobile device file system. + * + @param file {File} a File object representing a file on the file system +*/ +FileWriter = function(file) { + this.fileName = ""; + this.length = 0; + if (file) { + this.fileName = file.fullPath || file; + this.length = file.size || 0; + } + + // default is to write at the beginning of the file + this.position = 0; + + this.readyState = 0; // EMPTY + + this.result = null; + + // Error + this.error = null; + + // Event handlers + this.onwritestart = null; // When writing starts + this.onprogress = null; // While writing the file, and reporting partial file data + this.onwrite = null; // When the write has successfully completed. + this.onwriteend = null; // When the request has completed (either in success or failure). + this.onabort = null; // When the write has been aborted. For instance, by invoking the abort() method. + this.onerror = null; // When the write has failed (see errors). +} + +// States +FileWriter.INIT = 0; +FileWriter.WRITING = 1; +FileWriter.DONE = 2; + +/** + * Abort writing file. + */ +FileWriter.prototype.abort = function() { + // check for invalid state + if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) { + throw FileError.INVALID_STATE_ERR; + } + + // set error + var error = new FileError(), evt; + error.code = error.ABORT_ERR; + this.error = error; + + // If error callback + if (typeof this.onerror === "function") { + evt = File._createEvent("error", this); + this.onerror(evt); + } + // If abort callback + if (typeof this.onabort === "function") { + evt = File._createEvent("abort", this); + this.onabort(evt); + } + + this.readyState = FileWriter.DONE; + + // If write end callback + if (typeof this.onwriteend == "function") { + evt = File._createEvent("writeend", this); + this.onwriteend(evt); + } +}; + +/** + * @Deprecated: use write instead + * + * @param file to write the data to + * @param text to be written + * @param bAppend if true write to end of file, otherwise overwrite the file + */ +FileWriter.prototype.writeAsText = function(file, text, bAppend) { + // Throw an exception if we are already writing a file + if (this.readyState === FileWriter.WRITING) { + throw FileError.INVALID_STATE_ERR; + } + + if (bAppend !== true) { + bAppend = false; // for null values + } + + this.fileName = file; + + // WRITING state + this.readyState = FileWriter.WRITING; + + var me = this; + + // If onwritestart callback + if (typeof me.onwritestart === "function") { + var evt = File._createEvent("writestart", me); + me.onwritestart(evt); + } + + + // Write file + navigator.fileMgr.writeAsText(file, text, bAppend, + // Success callback + function(r) { + var evt; + + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + // Save result + me.result = r; + + // If onwrite callback + if (typeof me.onwrite === "function") { + evt = File._createEvent("write", me); + me.onwrite(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + }, + + // Error callback + function(e) { + var evt; + + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + // Save error + me.error = e; + + // If onerror callback + if (typeof me.onerror === "function") { + evt = File._createEvent("error", me); + me.onerror(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + } + ); +}; + +/** + * Writes data to the file + * + * @param text to be written + */ +FileWriter.prototype.write = function(text) { + // Throw an exception if we are already writing a file + if (this.readyState === FileWriter.WRITING) { + throw FileError.INVALID_STATE_ERR; + } + + // WRITING state + this.readyState = FileWriter.WRITING; + + var me = this; + + // If onwritestart callback + if (typeof me.onwritestart === "function") { + var evt = File._createEvent("writestart", me); + me.onwritestart(evt); + } + + // Write file + navigator.fileMgr.write(this.fileName, text, this.position, + + // Success callback + function(r) { + var evt; + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + + // position always increases by bytes written because file would be extended + me.position += r; + // The length of the file is now where we are done writing. + me.length = me.position; + + // If onwrite callback + if (typeof me.onwrite === "function") { + evt = File._createEvent("write", me); + me.onwrite(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + }, + + // Error callback + function(e) { + var evt; + + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + // Save error + me.error = e; + + // If onerror callback + if (typeof me.onerror === "function") { + evt = File._createEvent("error", me); + me.onerror(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + } + ); + +}; + +/** + * Moves the file pointer to the location specified. + * + * If the offset is a negative number the position of the file + * pointer is rewound. If the offset is greater than the file + * size the position is set to the end of the file. + * + * @param offset is the location to move the file pointer to. + */ +FileWriter.prototype.seek = function(offset) { + // Throw an exception if we are already writing a file + if (this.readyState === FileWriter.WRITING) { + throw FileError.INVALID_STATE_ERR; + } + + if (!offset) { + return; + } + + // See back from end of file. + if (offset < 0) { + this.position = Math.max(offset + this.length, 0); + } + // Offset is bigger then file size so set position + // to the end of the file. + else if (offset > this.length) { + this.position = this.length; + } + // Offset is between 0 and file size so set the position + // to start writing. + else { + this.position = offset; + } +}; + +/** + * Truncates the file to the size specified. + * + * @param size to chop the file at. + */ +FileWriter.prototype.truncate = function(size) { + // Throw an exception if we are already writing a file + if (this.readyState === FileWriter.WRITING) { + throw FileError.INVALID_STATE_ERR; + } + // what if no size specified? + + // WRITING state + this.readyState = FileWriter.WRITING; + + var me = this; + + // If onwritestart callback + if (typeof me.onwritestart === "function") { + var evt = File._createEvent("writestart", me); + me.onwritestart(evt); + } + + // Write file + navigator.fileMgr.truncate(this.fileName, size, + + // Success callback + function(r) { + var evt; + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + // Update the length of the file + me.length = r; + me.position = Math.min(me.position, r); + + // If onwrite callback + if (typeof me.onwrite === "function") { + evt = File._createEvent("write", me); + me.onwrite(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + }, + + // Error callback + function(e) { + var evt; + // If DONE (cancelled), then don't do anything + if (me.readyState === FileWriter.DONE) { + return; + } + + // Save error + me.error = e; + + // If onerror callback + if (typeof me.onerror === "function") { + evt = File._createEvent("error", me); + me.onerror(evt); + } + + // DONE state + me.readyState = FileWriter.DONE; + + // If onwriteend callback + if (typeof me.onwriteend === "function") { + evt = File._createEvent("writeend", me); + me.onwriteend(evt); + } + } + ); +}; + +LocalFileSystem = function() { +}; + +// File error codes +LocalFileSystem.TEMPORARY = 0; +LocalFileSystem.PERSISTENT = 1; +LocalFileSystem.RESOURCE = 2; +LocalFileSystem.APPLICATION = 3; + +/** + * Requests a filesystem in which to store application data. + * + * @param {int} type of file system being requested + * @param {Function} successCallback is called with the new FileSystem + * @param {Function} errorCallback is called with a FileError + */ +LocalFileSystem.prototype.requestFileSystem = function(type, size, successCallback, errorCallback) { + if (type < 0 || type > 3) { + if (typeof errorCallback == "function") { + errorCallback({ + "code": FileError.SYNTAX_ERR + }); + } + } + else { + Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "requestFileSystem", [type, size]); + } +}; + +/** + * + * @param {DOMString} uri referring to a local file in a filesystem + * @param {Function} successCallback is called with the new entry + * @param {Function} errorCallback is called with a FileError + */ +LocalFileSystem.prototype.resolveLocalFileSystemURI = function(uri, successCallback, errorCallback) { + Cordova.exec(successCallback, errorCallback, "org.apache.cordova.file", "resolveLocalFileSystemURI", [uri]); +}; + +/** +* This function is required as we need to convert raw +* JSON objects into concrete File and Directory objects. +* +* @param a JSON Objects that need to be converted to DirectoryEntry or FileEntry objects. +* @returns an entry +*/ +LocalFileSystem.prototype._castFS = function(pluginResult) { + var entry = null; + entry = new DirectoryEntry(); + entry.isDirectory = pluginResult.message.root.isDirectory; + entry.isFile = pluginResult.message.root.isFile; + entry.name = pluginResult.message.root.name; + entry.fullPath = pluginResult.message.root.fullPath; + pluginResult.message.root = entry; + return pluginResult; +} + +LocalFileSystem.prototype._castEntry = function(pluginResult) { + var entry = null; + if (pluginResult.message.isDirectory) { + entry = new DirectoryEntry(); + } + else if (pluginResult.message.isFile) { + entry = new FileEntry(); + } + entry.isDirectory = pluginResult.message.isDirectory; + entry.isFile = pluginResult.message.isFile; + entry.name = pluginResult.message.name; + entry.fullPath = pluginResult.message.fullPath; + pluginResult.message = entry; + return pluginResult; +} + +LocalFileSystem.prototype._castEntries = function(pluginResult) { + var entries = pluginResult.message; + var retVal = []; + for (i=0; i