{"action":"created","issue":{"url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/200","repository_url":"https://api.github.com/repos/urbanairship/urbanairship-cordova","labels_url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/200/comments","events_url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/200/events","html_url":"https://github.com/urbanairship/urbanairship-cordova/issues/200","id":276604874,"node_id":"MDU6SXNzdWUyNzY2MDQ4NzQ=","number":200,"title":"Change App/Secret Keys programatically/runtime","user":{"login":"gonzalovinas","id":1702232,"node_id":"MDQ6VXNlcjE3MDIyMzI=","avatar_url":"https://avatars0.githubusercontent.com/u/1702232?v=4","gravatar_id":"","url":"https://api.github.com/users/gonzalovinas","html_url":"https://github.com/gonzalovinas","followers_url":"https://api.github.com/users/gonzalovinas/followers","following_url":"https://api.github.com/users/gonzalovinas/following{/other_user}","gists_url":"https://api.github.com/users/gonzalovinas/gists{/gist_id}","starred_url":"https://api.github.com/users/gonzalovinas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonzalovinas/subscriptions","organizations_url":"https://api.github.com/users/gonzalovinas/orgs","repos_url":"https://api.github.com/users/gonzalovinas/repos","events_url":"https://api.github.com/users/gonzalovinas/events{/privacy}","received_events_url":"https://api.github.com/users/gonzalovinas/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-11-24T12:34:25Z","updated_at":"2018-06-12T16:52:23Z","closed_at":"2018-02-27T18:59:49Z","author_association":"NONE","body":"I 'm developing an APP which at start needs a QR Code scan to know to which server (Customer Backoffice) has to connect to. That works well :-) now I need Push Notifications  work the same way.  I need someway to change the Keys.\r\n\r\nYou think Is possible?\r\n\r\nSolution A: add a cool method exposed to JS interface and make the magic happens. Is that possible at all ?\r\n \r\nSolution B: write file/db row when switching Customer Backoffice, then switching keys, then notify the user the need to restart App/Device ? Any Channel ID issues at sight ? and modify Plugin to read from File/DB row instead from propierties File."},"comment":{"url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/comments/396659493","html_url":"https://github.com/urbanairship/urbanairship-cordova/issues/200#issuecomment-396659493","issue_url":"https://api.github.com/repos/urbanairship/urbanairship-cordova/issues/200","id":396659493,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjY1OTQ5Mw==","user":{"login":"rlepinski","id":3967591,"node_id":"MDQ6VXNlcjM5Njc1OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/3967591?v=4","gravatar_id":"","url":"https://api.github.com/users/rlepinski","html_url":"https://github.com/rlepinski","followers_url":"https://api.github.com/users/rlepinski/followers","following_url":"https://api.github.com/users/rlepinski/following{/other_user}","gists_url":"https://api.github.com/users/rlepinski/gists{/gist_id}","starred_url":"https://api.github.com/users/rlepinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlepinski/subscriptions","organizations_url":"https://api.github.com/users/rlepinski/orgs","repos_url":"https://api.github.com/users/rlepinski/repos","events_url":"https://api.github.com/users/rlepinski/events{/privacy}","received_events_url":"https://api.github.com/users/rlepinski/received_events","type":"User","site_admin":false},"created_at":"2018-06-12T16:52:23Z","updated_at":"2018-06-12T16:52:23Z","author_association":"CONTRIBUTOR","body":"@gonzalovinas are you building a single app that uses both? \r\n\r\nIt wont work with the current plugins, they will have to be modified. Its not super trivial but I can provide some guidance. The general steps would be:\r\n- Enable delaying takeOff with some sort of config flag\r\n- Add takeOff call to the plugin, should take the app key/secret\r\n- Persist the appkey/secret in nsuserdefaults/shared preferences\r\n- Have the plugin call takeOff right away on app start if the config is available\r\n- Make the plugin interface return an empty result/error if takeOff is not called yet\r\n\r\n"}}
{"actor":{"display_login":"rlepinski"}}