{"id":28754310,"url":"https://github.com/zeroasterisk/cordova-phonegap","last_synced_at":"2025-10-09T23:32:25.168Z","repository":{"id":137933419,"uuid":"9503799","full_name":"zeroasterisk/cordova-phonegap","owner":"zeroasterisk","description":"Meteor package that provides support for mobile hardware support via Cordova Phonegap.  ","archived":false,"fork":false,"pushed_at":"2013-04-17T17:44:42.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T21:04:46.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeroasterisk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-17T17:50:40.000Z","updated_at":"2014-11-10T17:12:22.000Z","dependencies_parsed_at":"2023-03-13T10:55:29.036Z","dependency_job_id":null,"html_url":"https://github.com/zeroasterisk/cordova-phonegap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeroasterisk/cordova-phonegap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fcordova-phonegap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fcordova-phonegap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fcordova-phonegap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fcordova-phonegap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroasterisk","download_url":"https://codeload.github.com/zeroasterisk/cordova-phonegap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroasterisk%2Fcordova-phonegap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002312,"owners_count":26083340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-17T01:08:22.457Z","updated_at":"2025-10-09T23:32:25.137Z","avatar_url":"https://github.com/zeroasterisk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"cordova-phonegap\n================\n\nMeteorite package that provides support for mobile hardware support via Cordova Phonegap.  \nhttp://phonegap.com/\n\n\n------------------------\n### Meteorite Package Installation\n\nFirst, install the cordova-phonegap package from the command line, like so:\n\n````\nmrt add cordova-phonegap\n````\n\nAlternatively, if you'd like to bypass Atmosphere, and install directly from GitHub, you could update your application's smart.json file, like so:\n\n````\n{\n  \"meteor\": {\n    \"branch\": \"master\"\n  },\n  \"packages\": {\n    \"cordova-phonegap\": {\n      \"git\": \"https://github.com/awatson1978/cordova-phonegap.git\"\n    }\n  }\n}\n\n````\n\nThis will add the cordova libraries and some initialization code.  You'll need to put the following in your main Meteor index.js file (or equivalent).\n\n````\napp.initialize(window);\n````\n\n------------------------\n### Document Object Model\n\nTo confirm that Cordova Phonegap connects to the device hardware, add this HTML snippet to your app somewhere:\n````html\n\u003cdiv id=\"deviceready\" class=\"blink\"\u003e\n  \u003cp class=\"event listening\"\u003eConnecting to Device\u003c/p\u003e\n  \u003cp class=\"event received\"\u003eDevice is Ready\u003c/p\u003e\n\u003c/div\u003e\n````\n\n------------------------\n### Controllers \u0026 Event Binding\n\n\n````\n// when an app goes into the background\n        document.addEventListener(\"Pause\", function() {\n            Cookie.set('LastPage', Meteor.Router.page());\n        });\n        // when an app drops 'offline'\n        document.addEventListener(\"offline\", function() {\n            if (Meteor.Router.page() != 'offline' \u0026\u0026 Meteor.Router.page() != 'loading') {\n                Cookie.set('LastPage', Meteor.Router.page());\n                Meteor.Router.to('/offline');\n            }\n        });\n        // when an app comes 'online'\n        document.addEventListener(\"online\", function() {\n            Meteor.resume();\n        });\n````\n\nFor more information, take a look at this gist from zeroasterisk for a good example of how to perhaps include routing functionality on pause/reconnection:\nhttps://gist.github.com/zeroasterisk/5405344\n\n\n\n\n\n------------------------\n### iOS App Build\n\nFirst, create a meteor project using the command line utilities found in /phonegap-master/lib/ios/bin:\n````\n./create ~/Documents/Cordova/MyApp org.pentasyllabic.MyApp MyApp\n./update_cordova_subproject ~/Documents/Cordova/MyApp/MyApp.xcodeproj\n````\n\nThen, you're going to need to edit the CDVViewController.m file, and point the MeteorIntegration App towards your Meteor installation.  If you have a development and production environment, you may need to compile two separate apps, one for each environment.  (Best practice is to add different icons to each app, so you can tell them apart.)\n\nMeteorIntegration \u003e CordovaLib.xcodeproj \u003e Classes \u003e Cleaver \u003e CDVViewController.m (line: 171 or so)\n````\nself.wwwFolderName = @\"http://192.168.0.123:3000\";\n````\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroasterisk%2Fcordova-phonegap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroasterisk%2Fcordova-phonegap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroasterisk%2Fcordova-phonegap/lists"}