{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments/53419289","id":53419289,"diff_hunk":"@@ -288,18 +290,24 @@ + (void)downloadPackage:(NSDictionary *)updatePackage\n                     NSArray *deletedFiles = manifestJSON[@\"deletedFiles\"];\n                     for (NSString *deletedFileName in deletedFiles) {\n                         [[NSFileManager defaultManager] removeItemAtPath:[newPackageFolderPath stringByAppendingPathComponent:deletedFileName]\n-                                                                   error:&nonFailingError];\n-                        \n-                        if (nonFailingError) {\n-                            NSLog(@\"Error deleting file from current package: %@\", nonFailingError);\n-                            nonFailingError = nil;\n+                                                                   error:&error];\n+                        if (error) {\n+                            failCallback(error);\n+                            return;\n                         }\n                     }\n+                    \n+                    [[NSFileManager defaultManager] removeItemAtPath:diffManifestFilePath","path":"iOS/CodePushPackage.m","position":27,"original_position":27,"commit_id":"fea52827d15ae5d0f6b5666713f9832be3968bfc","original_commit_id":"fea52827d15ae5d0f6b5666713f9832be3968bfc","user":{"login":"lostintangent","id":116461,"avatar_url":"https://avatars.githubusercontent.com/u/116461?v=3","gravatar_id":"","url":"https://api.github.com/users/lostintangent","html_url":"https://github.com/lostintangent","followers_url":"https://api.github.com/users/lostintangent/followers","following_url":"https://api.github.com/users/lostintangent/following{/other_user}","gists_url":"https://api.github.com/users/lostintangent/gists{/gist_id}","starred_url":"https://api.github.com/users/lostintangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lostintangent/subscriptions","organizations_url":"https://api.github.com/users/lostintangent/orgs","repos_url":"https://api.github.com/users/lostintangent/repos","events_url":"https://api.github.com/users/lostintangent/events{/privacy}","received_events_url":"https://api.github.com/users/lostintangent/received_events","type":"User","site_admin":false},"body":"Is this important now because of the hash validation?","created_at":"2016-02-19T03:31:23Z","updated_at":"2016-02-19T03:31:23Z","html_url":"https://github.com/Microsoft/react-native-code-push/pull/205#discussion_r53419289","pull_request_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments/53419289"},"html":{"href":"https://github.com/Microsoft/react-native-code-push/pull/205#discussion_r53419289"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205","id":59898648,"html_url":"https://github.com/Microsoft/react-native-code-push/pull/205","diff_url":"https://github.com/Microsoft/react-native-code-push/pull/205.diff","patch_url":"https://github.com/Microsoft/react-native-code-push/pull/205.patch","issue_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/205","number":205,"state":"open","locked":false,"title":"Verify hash after download","user":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"body":"As suggested in https://github.com/Microsoft/react-native-code-push/issues/180, This change configures the plugin to calculate and verify the hash of a downloaded update after it is unzipped. This is especially useful in a diff update so that the client can verify that the merged contents from the diff update and the previous update is the same as what the server would send in a full update.\r\n\r\nAlso, some other changes:\r\n\r\n1. Moved all the iOS files out of the project root into an iOS folder.\r\n2. Created a `CodePushUtils.m` file to contain some of the grunt logic originally performed in `CodePushPackage.m` so as to avoid code clutter.","created_at":"2016-02-19T03:04:37Z","updated_at":"2016-02-19T03:31:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"724e03a78882be8c78756060f8cc52146980106b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205/commits","review_comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205/comments","review_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/205/comments","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/fea52827d15ae5d0f6b5666713f9832be3968bfc","head":{"label":"Microsoft:verify-hash-after-download","ref":"verify-hash-after-download","sha":"fea52827d15ae5d0f6b5666713f9832be3968bfc","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":36749153,"name":"react-native-code-push","full_name":"Microsoft/react-native-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/react-native-code-push","description":"React Native plugin for the CodePush service.","fork":false,"url":"https://api.github.com/repos/Microsoft/react-native-code-push","forks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/react-native-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/react-native-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/react-native-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/react-native-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/react-native-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/react-native-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/react-native-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/react-native-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/react-native-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/react-native-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/react-native-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/react-native-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/react-native-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/deployments","created_at":"2015-06-02T17:19:20Z","updated_at":"2016-02-18T20:09:06Z","pushed_at":"2016-02-19T03:04:37Z","git_url":"git://github.com/Microsoft/react-native-code-push.git","ssh_url":"git@github.com:Microsoft/react-native-code-push.git","clone_url":"https://github.com/Microsoft/react-native-code-push.git","svn_url":"https://github.com/Microsoft/react-native-code-push","homepage":"http://codepush.tools","size":3383,"stargazers_count":667,"watchers_count":667,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":7,"forks":64,"open_issues":7,"watchers":667,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"7b0ad29645b440bcaff94e5889ed1359a132cae5","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":36749153,"name":"react-native-code-push","full_name":"Microsoft/react-native-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/react-native-code-push","description":"React Native plugin for the CodePush service.","fork":false,"url":"https://api.github.com/repos/Microsoft/react-native-code-push","forks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/react-native-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/react-native-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/react-native-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/react-native-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/react-native-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/react-native-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/react-native-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/react-native-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/react-native-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/react-native-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/react-native-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/react-native-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/react-native-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/react-native-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/react-native-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/react-native-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/react-native-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/react-native-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/react-native-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/react-native-code-push/deployments","created_at":"2015-06-02T17:19:20Z","updated_at":"2016-02-18T20:09:06Z","pushed_at":"2016-02-19T03:04:37Z","git_url":"git://github.com/Microsoft/react-native-code-push.git","ssh_url":"git@github.com:Microsoft/react-native-code-push.git","clone_url":"https://github.com/Microsoft/react-native-code-push.git","svn_url":"https://github.com/Microsoft/react-native-code-push","homepage":"http://codepush.tools","size":3383,"stargazers_count":667,"watchers_count":667,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"open_issues_count":7,"forks":64,"open_issues":7,"watchers":667,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205"},"html":{"href":"https://github.com/Microsoft/react-native-code-push/pull/205"},"issue":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/205"},"comments":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/issues/205/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/pulls/205/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/react-native-code-push/statuses/fea52827d15ae5d0f6b5666713f9832be3968bfc"}}}}