{"action":"created","issue":{"url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/29","repository_url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy","labels_url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/29/comments","events_url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/29/events","html_url":"https://github.com/an-rahulpandey/cordova-plugin-dbcopy/issues/29","id":171912593,"number":29,"title":"window.plugins.sqlDB not defined in Ionic View on iOS","user":{"login":"freespirit47","id":5697613,"avatar_url":"https://avatars.githubusercontent.com/u/5697613?v=3","gravatar_id":"","url":"https://api.github.com/users/freespirit47","html_url":"https://github.com/freespirit47","followers_url":"https://api.github.com/users/freespirit47/followers","following_url":"https://api.github.com/users/freespirit47/following{/other_user}","gists_url":"https://api.github.com/users/freespirit47/gists{/gist_id}","starred_url":"https://api.github.com/users/freespirit47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freespirit47/subscriptions","organizations_url":"https://api.github.com/users/freespirit47/orgs","repos_url":"https://api.github.com/users/freespirit47/repos","events_url":"https://api.github.com/users/freespirit47/events{/privacy}","received_events_url":"https://api.github.com/users/freespirit47/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-18T14:19:10Z","updated_at":"2016-08-18T14:43:57Z","closed_at":null,"body":"I've been trying to identify the issue for past 8 hours - my code works correctly on Android ionic view, however iOS is throwing \r\n\r\n\"undefined is not an object (evaluating 'window.plugins.sqlDB.copy') \"\r\n\r\nI tried wrapping it in a timeout (as there is an issue of delayed loading of plugins in ionic view) with as much as 5 seconds delay, to no avail.\r\n\r\nI've installed the plugin via :\r\ncordova plugin add https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git\r\n\r\nMy code in app.js\r\n\r\n \r\n```\r\n.run(function($ionicPlatform, $rootScope, $ionicHistory, $state, $mdDialog, $mdBottomSheet, $cordovaPush, $cordovaSQLite, DB, $timeout,$ionicLoading, $window) {\r\n  $ionicPlatform.ready(function(){\r\n    $timeout(function(){\r\n           try{\r\n               window.plugins.sqlDB.copy(\"mydb.db\",0, function () {\r\n                alert('ok')\r\n                console.log(\"copy ok\")\r\n            },function(e){\r\n                alert(e)\r\n                console.log(\"copy fail\")\r\n                console.log(e)\r\n            });\r\n          }catch(e){\r\n                alert(e);\r\n                console.log(e);\r\n                console.log(e.stack);\r\n                console.log(e.line);\r\n            }\r\n            \r\n     }, 5000);\r\n  })\r\n})\r\n```\r\n\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/comments/240745158","html_url":"https://github.com/an-rahulpandey/cordova-plugin-dbcopy/issues/29#issuecomment-240745158","issue_url":"https://api.github.com/repos/an-rahulpandey/cordova-plugin-dbcopy/issues/29","id":240745158,"user":{"login":"freespirit47","id":5697613,"avatar_url":"https://avatars.githubusercontent.com/u/5697613?v=3","gravatar_id":"","url":"https://api.github.com/users/freespirit47","html_url":"https://github.com/freespirit47","followers_url":"https://api.github.com/users/freespirit47/followers","following_url":"https://api.github.com/users/freespirit47/following{/other_user}","gists_url":"https://api.github.com/users/freespirit47/gists{/gist_id}","starred_url":"https://api.github.com/users/freespirit47/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freespirit47/subscriptions","organizations_url":"https://api.github.com/users/freespirit47/orgs","repos_url":"https://api.github.com/users/freespirit47/repos","events_url":"https://api.github.com/users/freespirit47/events{/privacy}","received_events_url":"https://api.github.com/users/freespirit47/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T14:43:57Z","updated_at":"2016-08-18T14:43:57Z","body":"haven't tried with Xcode yet, will do tonight and report back. My main issue is with Ionic View app, as that's the way client wants the preview to be delivered."}}
{"actor":{"display_login":"freespirit47"}}