{"action":"created","comment":{"url":"https://api.github.com/repos/apache/cordova-ios/pulls/comments/24230690","id":24230690,"diff_hunk":"@@ -0,0 +1,82 @@\n+(function () {\n+    var fs = require('fs'),\n+        path = require('path'),\n+        exec = require('child_process').exec,\n+        PUSH_NOTIFICATIONS_ENABLED_HEADER_FILE = 'PushNotificationsEnabled.h',\n+        PUSH_NOTIFICATIONS_ENABLED_HEADER_FILE_CONTENT = '#define PUSH_NOTIFICATIONS_ENABLED ',\n+        EXPANDED_PROVISIONING_PROFILE = process.env.EXPANDED_PROVISIONING_PROFILE,\n+        PATH_TO_MOBILE_PROVISIONS = path.join(process.env.HOME, 'Library', 'MobileDevice', 'Provisioning Profiles'),\n+        PROVISIONING_PROFILE_REQUIRED = process.env.PROVISIONING_PROFILE_REQUIRED,\n+        PROVISIONING_PROFILE_UUID_REGEX = new RegExp('<key>UUID<\\/key>[\\\\s\\\\S]*<string>' + EXPANDED_PROVISIONING_PROFILE + '<\\/string>');\n+\n+    function logErrorIfExists(error) {\n+        if (error !== null) {","path":"bin/templates/scripts/cordova/lib/push-notifications.js","position":13,"original_position":13,"commit_id":"cab0de99007be671f3bf2770a0c20cc59541b2d5","original_commit_id":"cab0de99007be671f3bf2770a0c20cc59541b2d5","user":{"login":"ligaz","id":19437,"avatar_url":"https://avatars.githubusercontent.com/u/19437?v=3","gravatar_id":"","url":"https://api.github.com/users/ligaz","html_url":"https://github.com/ligaz","followers_url":"https://api.github.com/users/ligaz/followers","following_url":"https://api.github.com/users/ligaz/following{/other_user}","gists_url":"https://api.github.com/users/ligaz/gists{/gist_id}","starred_url":"https://api.github.com/users/ligaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ligaz/subscriptions","organizations_url":"https://api.github.com/users/ligaz/orgs","repos_url":"https://api.github.com/users/ligaz/repos","events_url":"https://api.github.com/users/ligaz/events{/privacy}","received_events_url":"https://api.github.com/users/ligaz/received_events","type":"User","site_admin":false},"body":"You can use just `if(error)` here.","created_at":"2015-02-06T09:44:02Z","updated_at":"2015-02-06T09:44:02Z","html_url":"https://github.com/apache/cordova-ios/pull/128#discussion_r24230690","pull_request_url":"https://api.github.com/repos/apache/cordova-ios/pulls/128","_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/comments/24230690"},"html":{"href":"https://github.com/apache/cordova-ios/pull/128#discussion_r24230690"},"pull_request":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/128"}}},"pull_request":{"url":"https://api.github.com/repos/apache/cordova-ios/pulls/128","id":28709318,"html_url":"https://github.com/apache/cordova-ios/pull/128","diff_url":"https://github.com/apache/cordova-ios/pull/128.diff","patch_url":"https://github.com/apache/cordova-ios/pull/128.patch","issue_url":"https://api.github.com/repos/apache/cordova-ios/issues/128","number":128,"state":"open","locked":false,"title":"CB-8084 conform AppDelegate.m with provisioning profile","user":{"login":"Mitko-Kerezov","id":6683316,"avatar_url":"https://avatars.githubusercontent.com/u/6683316?v=3","gravatar_id":"","url":"https://api.github.com/users/Mitko-Kerezov","html_url":"https://github.com/Mitko-Kerezov","followers_url":"https://api.github.com/users/Mitko-Kerezov/followers","following_url":"https://api.github.com/users/Mitko-Kerezov/following{/other_user}","gists_url":"https://api.github.com/users/Mitko-Kerezov/gists{/gist_id}","starred_url":"https://api.github.com/users/Mitko-Kerezov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mitko-Kerezov/subscriptions","organizations_url":"https://api.github.com/users/Mitko-Kerezov/orgs","repos_url":"https://api.github.com/users/Mitko-Kerezov/repos","events_url":"https://api.github.com/users/Mitko-Kerezov/events{/privacy}","received_events_url":"https://api.github.com/users/Mitko-Kerezov/received_events","type":"User","site_admin":false},"body":"Hide the two methods in AppDelegate.m for push notifications\r\nwhen provisioning profile doesn't include the push notifications service\r\nRelated to https://issues.apache.org/jira/browse/CB-8084","created_at":"2015-02-05T09:22:55Z","updated_at":"2015-02-06T09:44:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4a85d9c2119f19e2757e2c9a43435cc1e2fa312","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/cordova-ios/pulls/128/commits","review_comments_url":"https://api.github.com/repos/apache/cordova-ios/pulls/128/comments","review_comment_url":"https://api.github.com/repos/apache/cordova-ios/pulls/comments/{number}","comments_url":"https://api.github.com/repos/apache/cordova-ios/issues/128/comments","statuses_url":"https://api.github.com/repos/apache/cordova-ios/statuses/cab0de99007be671f3bf2770a0c20cc59541b2d5","head":{"label":"Icenium:kerezov/push-notifications-fix","ref":"kerezov/push-notifications-fix","sha":"cab0de99007be671f3bf2770a0c20cc59541b2d5","user":{"login":"Icenium","id":1152554,"avatar_url":"https://avatars.githubusercontent.com/u/1152554?v=3","gravatar_id":"","url":"https://api.github.com/users/Icenium","html_url":"https://github.com/Icenium","followers_url":"https://api.github.com/users/Icenium/followers","following_url":"https://api.github.com/users/Icenium/following{/other_user}","gists_url":"https://api.github.com/users/Icenium/gists{/gist_id}","starred_url":"https://api.github.com/users/Icenium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icenium/subscriptions","organizations_url":"https://api.github.com/users/Icenium/orgs","repos_url":"https://api.github.com/users/Icenium/repos","events_url":"https://api.github.com/users/Icenium/events{/privacy}","received_events_url":"https://api.github.com/users/Icenium/received_events","type":"Organization","site_admin":false},"repo":{"id":22214193,"name":"cordova-ios","full_name":"Icenium/cordova-ios","owner":{"login":"Icenium","id":1152554,"avatar_url":"https://avatars.githubusercontent.com/u/1152554?v=3","gravatar_id":"","url":"https://api.github.com/users/Icenium","html_url":"https://github.com/Icenium","followers_url":"https://api.github.com/users/Icenium/followers","following_url":"https://api.github.com/users/Icenium/following{/other_user}","gists_url":"https://api.github.com/users/Icenium/gists{/gist_id}","starred_url":"https://api.github.com/users/Icenium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Icenium/subscriptions","organizations_url":"https://api.github.com/users/Icenium/orgs","repos_url":"https://api.github.com/users/Icenium/repos","events_url":"https://api.github.com/users/Icenium/events{/privacy}","received_events_url":"https://api.github.com/users/Icenium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Icenium/cordova-ios","description":"Mirror of Apache Cordova iOS","fork":true,"url":"https://api.github.com/repos/Icenium/cordova-ios","forks_url":"https://api.github.com/repos/Icenium/cordova-ios/forks","keys_url":"https://api.github.com/repos/Icenium/cordova-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Icenium/cordova-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Icenium/cordova-ios/teams","hooks_url":"https://api.github.com/repos/Icenium/cordova-ios/hooks","issue_events_url":"https://api.github.com/repos/Icenium/cordova-ios/issues/events{/number}","events_url":"https://api.github.com/repos/Icenium/cordova-ios/events","assignees_url":"https://api.github.com/repos/Icenium/cordova-ios/assignees{/user}","branches_url":"https://api.github.com/repos/Icenium/cordova-ios/branches{/branch}","tags_url":"https://api.github.com/repos/Icenium/cordova-ios/tags","blobs_url":"https://api.github.com/repos/Icenium/cordova-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Icenium/cordova-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Icenium/cordova-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/Icenium/cordova-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Icenium/cordova-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/Icenium/cordova-ios/languages","stargazers_url":"https://api.github.com/repos/Icenium/cordova-ios/stargazers","contributors_url":"https://api.github.com/repos/Icenium/cordova-ios/contributors","subscribers_url":"https://api.github.com/repos/Icenium/cordova-ios/subscribers","subscription_url":"https://api.github.com/repos/Icenium/cordova-ios/subscription","commits_url":"https://api.github.com/repos/Icenium/cordova-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/Icenium/cordova-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/Icenium/cordova-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/Icenium/cordova-ios/issues/comments/{number}","contents_url":"https://api.github.com/repos/Icenium/cordova-ios/contents/{+path}","compare_url":"https://api.github.com/repos/Icenium/cordova-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Icenium/cordova-ios/merges","archive_url":"https://api.github.com/repos/Icenium/cordova-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Icenium/cordova-ios/downloads","issues_url":"https://api.github.com/repos/Icenium/cordova-ios/issues{/number}","pulls_url":"https://api.github.com/repos/Icenium/cordova-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/Icenium/cordova-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/Icenium/cordova-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Icenium/cordova-ios/labels{/name}","releases_url":"https://api.github.com/repos/Icenium/cordova-ios/releases{/id}","created_at":"2014-07-24T13:38:52Z","updated_at":"2014-07-23T20:32:03Z","pushed_at":"2015-02-06T08:15:47Z","git_url":"git://github.com/Icenium/cordova-ios.git","ssh_url":"git@github.com:Icenium/cordova-ios.git","clone_url":"https://github.com/Icenium/cordova-ios.git","svn_url":"https://github.com/Icenium/cordova-ios","homepage":null,"size":24770,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"fd941c3c7bbf7705087be7c2ecc23ca432036a56","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":6898387,"name":"cordova-ios","full_name":"apache/cordova-ios","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/cordova-ios","description":"Mirror of Apache Cordova iOS","fork":false,"url":"https://api.github.com/repos/apache/cordova-ios","forks_url":"https://api.github.com/repos/apache/cordova-ios/forks","keys_url":"https://api.github.com/repos/apache/cordova-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/cordova-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/cordova-ios/teams","hooks_url":"https://api.github.com/repos/apache/cordova-ios/hooks","issue_events_url":"https://api.github.com/repos/apache/cordova-ios/issues/events{/number}","events_url":"https://api.github.com/repos/apache/cordova-ios/events","assignees_url":"https://api.github.com/repos/apache/cordova-ios/assignees{/user}","branches_url":"https://api.github.com/repos/apache/cordova-ios/branches{/branch}","tags_url":"https://api.github.com/repos/apache/cordova-ios/tags","blobs_url":"https://api.github.com/repos/apache/cordova-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/cordova-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/cordova-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/cordova-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/cordova-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/cordova-ios/languages","stargazers_url":"https://api.github.com/repos/apache/cordova-ios/stargazers","contributors_url":"https://api.github.com/repos/apache/cordova-ios/contributors","subscribers_url":"https://api.github.com/repos/apache/cordova-ios/subscribers","subscription_url":"https://api.github.com/repos/apache/cordova-ios/subscription","commits_url":"https://api.github.com/repos/apache/cordova-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/cordova-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/cordova-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/cordova-ios/issues/comments/{number}","contents_url":"https://api.github.com/repos/apache/cordova-ios/contents/{+path}","compare_url":"https://api.github.com/repos/apache/cordova-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/cordova-ios/merges","archive_url":"https://api.github.com/repos/apache/cordova-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/cordova-ios/downloads","issues_url":"https://api.github.com/repos/apache/cordova-ios/issues{/number}","pulls_url":"https://api.github.com/repos/apache/cordova-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/cordova-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/cordova-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/cordova-ios/labels{/name}","releases_url":"https://api.github.com/repos/apache/cordova-ios/releases{/id}","created_at":"2012-11-28T08:00:23Z","updated_at":"2015-02-05T19:58:07Z","pushed_at":"2015-02-05T19:58:06Z","git_url":"git://github.com/apache/cordova-ios.git","ssh_url":"git@github.com:apache/cordova-ios.git","clone_url":"https://github.com/apache/cordova-ios.git","svn_url":"https://github.com/apache/cordova-ios","homepage":null,"size":29619,"stargazers_count":457,"watchers_count":457,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":316,"mirror_url":"git://git.apache.org/cordova-ios.git","open_issues_count":6,"forks":316,"open_issues":6,"watchers":457,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/128"},"html":{"href":"https://github.com/apache/cordova-ios/pull/128"},"issue":{"href":"https://api.github.com/repos/apache/cordova-ios/issues/128"},"comments":{"href":"https://api.github.com/repos/apache/cordova-ios/issues/128/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/128/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/apache/cordova-ios/pulls/128/commits"},"statuses":{"href":"https://api.github.com/repos/apache/cordova-ios/statuses/cab0de99007be671f3bf2770a0c20cc59541b2d5"}}}}