{"action":"created","comment":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/208065282","pull_request_review_id":143802257,"id":208065282,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODA2NTI4Mg==","diff_hunk":"@@ -163,19 +154,58 @@ - (FUICountryCodeInfo *)countryCodeInfoForPhoneNumber:(NSString *)phoneNumber {\n   return nil;\n }\n \n-- (FUICountryCodes *)searchCountriesByName:(NSString *)countryName {\n-  if ([countryName length] == 0) {\n-    return nil;\n-  } else {\n-    NSArray *results =\n-        [self.countryCodesArray filteredArrayUsingPredicate:\n-            [NSPredicate predicateWithFormat:FUI_JSON_COUNTRY_NAME_PREDICATE, countryName]];\n-    return [[FUICountryCodes alloc] initWithCountriesArray:results];\n+- (void)blackListCountries:(NSSet<NSString *> *)countries {\n+  NSMutableArray<NSDictionary *> *array =\n+      [[NSMutableArray alloc] initWithCapacity:_countryCodesArray.count];\n+  for (NSDictionary *dict in self.countryCodesArray) {\n+    NSString *countryCode = dict[FUI_JSON_COUNTRY_CODE_KEY];\n+    NSString *dialCode = dict[FUI_JSON_DIALCODE_KEY];\n+    if ([countries containsObject:countryCode] || [countries containsObject:dialCode]) {\n+      continue;\n+    }\n+    [array addObject:dict];\n   }\n+  _countryCodesArray = array.mutableCopy;\n+}\n+\n+- (void)whiteListCountries:(NSSet<NSString *> *)countries {\n+  NSMutableArray *array = [[NSMutableArray alloc] initWithCapacity:_countryCodesArray.count];\n+  for (NSDictionary *dict in self.countryCodesArray) {\n+    NSString *countryCode = dict[FUI_JSON_COUNTRY_CODE_KEY];\n+    NSString *dialCode = dict[FUI_JSON_DIALCODE_KEY];\n+    if ([countries containsObject:countryCode] || [countries containsObject:dialCode]) {\n+      [array addObject:dict];\n+    }\n+  }\n+  _countryCodesArray = array.mutableCopy;","path":"FirebasePhoneAuthUI/CountryCode/FUICountryCodes.m","position":119,"original_position":119,"commit_id":"5dfa88b3082e408766f3c351995c0dc55cac33f2","original_commit_id":"5dfa88b3082e408766f3c351995c0dc55cac33f2","user":{"login":"Yue-Wang-Google","id":20689178,"node_id":"MDQ6VXNlcjIwNjg5MTc4","avatar_url":"https://avatars2.githubusercontent.com/u/20689178?v=4","gravatar_id":"","url":"https://api.github.com/users/Yue-Wang-Google","html_url":"https://github.com/Yue-Wang-Google","followers_url":"https://api.github.com/users/Yue-Wang-Google/followers","following_url":"https://api.github.com/users/Yue-Wang-Google/following{/other_user}","gists_url":"https://api.github.com/users/Yue-Wang-Google/gists{/gist_id}","starred_url":"https://api.github.com/users/Yue-Wang-Google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yue-Wang-Google/subscriptions","organizations_url":"https://api.github.com/users/Yue-Wang-Google/orgs","repos_url":"https://api.github.com/users/Yue-Wang-Google/repos","events_url":"https://api.github.com/users/Yue-Wang-Google/events{/privacy}","received_events_url":"https://api.github.com/users/Yue-Wang-Google/received_events","type":"User","site_admin":false},"body":"Acknowledge.","created_at":"2018-08-07T00:18:10Z","updated_at":"2018-08-07T00:18:10Z","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/497#discussion_r208065282","pull_request_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/208065282"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/497#discussion_r208065282"},"pull_request":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497"}},"in_reply_to_id":208051003},"pull_request":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497","id":206485358,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NDg1MzU4","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/497","diff_url":"https://github.com/firebase/FirebaseUI-iOS/pull/497.diff","patch_url":"https://github.com/firebase/FirebaseUI-iOS/pull/497.patch","issue_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/497","number":497,"state":"open","locked":false,"title":"Implement Country Selection Limitation in Phone Authentication.","user":{"login":"Yue-Wang-Google","id":20689178,"node_id":"MDQ6VXNlcjIwNjg5MTc4","avatar_url":"https://avatars2.githubusercontent.com/u/20689178?v=4","gravatar_id":"","url":"https://api.github.com/users/Yue-Wang-Google","html_url":"https://github.com/Yue-Wang-Google","followers_url":"https://api.github.com/users/Yue-Wang-Google/followers","following_url":"https://api.github.com/users/Yue-Wang-Google/following{/other_user}","gists_url":"https://api.github.com/users/Yue-Wang-Google/gists{/gist_id}","starred_url":"https://api.github.com/users/Yue-Wang-Google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yue-Wang-Google/subscriptions","organizations_url":"https://api.github.com/users/Yue-Wang-Google/orgs","repos_url":"https://api.github.com/users/Yue-Wang-Google/repos","events_url":"https://api.github.com/users/Yue-Wang-Google/events{/privacy}","received_events_url":"https://api.github.com/users/Yue-Wang-Google/received_events","type":"User","site_admin":false},"body":"Also include a bunch of type/API fixes to FUIPhoneNumber and FUICountryCodes.","created_at":"2018-08-06T18:50:39Z","updated_at":"2018-08-07T00:18:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9844fe182477f7548b88ac2901b8f9837604be5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497/commits","review_comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497/comments","review_comment_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/497/comments","statuses_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/5dfa88b3082e408766f3c351995c0dc55cac33f2","head":{"label":"Yue-Wang-Google:master","ref":"master","sha":"5dfa88b3082e408766f3c351995c0dc55cac33f2","user":{"login":"Yue-Wang-Google","id":20689178,"node_id":"MDQ6VXNlcjIwNjg5MTc4","avatar_url":"https://avatars2.githubusercontent.com/u/20689178?v=4","gravatar_id":"","url":"https://api.github.com/users/Yue-Wang-Google","html_url":"https://github.com/Yue-Wang-Google","followers_url":"https://api.github.com/users/Yue-Wang-Google/followers","following_url":"https://api.github.com/users/Yue-Wang-Google/following{/other_user}","gists_url":"https://api.github.com/users/Yue-Wang-Google/gists{/gist_id}","starred_url":"https://api.github.com/users/Yue-Wang-Google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yue-Wang-Google/subscriptions","organizations_url":"https://api.github.com/users/Yue-Wang-Google/orgs","repos_url":"https://api.github.com/users/Yue-Wang-Google/repos","events_url":"https://api.github.com/users/Yue-Wang-Google/events{/privacy}","received_events_url":"https://api.github.com/users/Yue-Wang-Google/received_events","type":"User","site_admin":false},"repo":{"id":140755712,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA3NTU3MTI=","name":"FirebaseUI-iOS","full_name":"Yue-Wang-Google/FirebaseUI-iOS","owner":{"login":"Yue-Wang-Google","id":20689178,"node_id":"MDQ6VXNlcjIwNjg5MTc4","avatar_url":"https://avatars2.githubusercontent.com/u/20689178?v=4","gravatar_id":"","url":"https://api.github.com/users/Yue-Wang-Google","html_url":"https://github.com/Yue-Wang-Google","followers_url":"https://api.github.com/users/Yue-Wang-Google/followers","following_url":"https://api.github.com/users/Yue-Wang-Google/following{/other_user}","gists_url":"https://api.github.com/users/Yue-Wang-Google/gists{/gist_id}","starred_url":"https://api.github.com/users/Yue-Wang-Google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yue-Wang-Google/subscriptions","organizations_url":"https://api.github.com/users/Yue-Wang-Google/orgs","repos_url":"https://api.github.com/users/Yue-Wang-Google/repos","events_url":"https://api.github.com/users/Yue-Wang-Google/events{/privacy}","received_events_url":"https://api.github.com/users/Yue-Wang-Google/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yue-Wang-Google/FirebaseUI-iOS","description":"iOS UI bindings for Firebase.","fork":true,"url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS","forks_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/forks","keys_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/teams","hooks_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/hooks","issue_events_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/events","assignees_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/tags","blobs_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/languages","stargazers_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/stargazers","contributors_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/contributors","subscribers_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/subscribers","subscription_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/subscription","commits_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/merges","archive_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/downloads","issues_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/labels{/name}","releases_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/Yue-Wang-Google/FirebaseUI-iOS/deployments","created_at":"2018-07-12T19:23:21Z","updated_at":"2018-08-06T18:48:38Z","pushed_at":"2018-08-06T18:48:37Z","git_url":"git://github.com/Yue-Wang-Google/FirebaseUI-iOS.git","ssh_url":"git@github.com:Yue-Wang-Google/FirebaseUI-iOS.git","clone_url":"https://github.com/Yue-Wang-Google/FirebaseUI-iOS.git","svn_url":"https://github.com/Yue-Wang-Google/FirebaseUI-iOS","homepage":"","size":363484,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"firebase:master","ref":"master","sha":"ca7d4c9dae03dfc8338185f318a1d2bbf9853e24","user":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"repo":{"id":38835282,"node_id":"MDEwOlJlcG9zaXRvcnkzODgzNTI4Mg==","name":"FirebaseUI-iOS","full_name":"firebase/FirebaseUI-iOS","owner":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firebase/FirebaseUI-iOS","description":"iOS UI bindings for Firebase.","fork":false,"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS","forks_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/forks","keys_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/teams","hooks_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/hooks","issue_events_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/events","assignees_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/tags","blobs_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/languages","stargazers_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/stargazers","contributors_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/contributors","subscribers_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/subscribers","subscription_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/subscription","commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/merges","archive_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/downloads","issues_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/labels{/name}","releases_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/deployments","created_at":"2015-07-09T17:32:23Z","updated_at":"2018-08-06T18:30:24Z","pushed_at":"2018-08-06T18:50:39Z","git_url":"git://github.com/firebase/FirebaseUI-iOS.git","ssh_url":"git@github.com:firebase/FirebaseUI-iOS.git","clone_url":"https://github.com/firebase/FirebaseUI-iOS.git","svn_url":"https://github.com/firebase/FirebaseUI-iOS","homepage":"","size":363485,"stargazers_count":919,"watchers_count":919,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":286,"mirror_url":null,"archived":false,"open_issues_count":40,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":286,"open_issues":40,"watchers":919,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/497"},"issue":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/497"},"comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/497/comments"},"review_comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497/comments"},"review_comment":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/497/commits"},"statuses":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/5dfa88b3082e408766f3c351995c0dc55cac33f2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Yue-Wang-Google"}}