{"action":"created","comment":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/73359981","id":73359981,"diff_hunk":"@@ -15,8 +15,116 @@\n //\n \n import UIKit\n+import Firebase\n+import FirebaseAuthUI\n+import FirebaseGoogleAuthUI\n+import FirebaseFacebookAuthUI\n \n+let kFirebaseTermsOfService = NSURL(string: \"https://firebase.google.com/terms/\")!\n+\n+// Your Google app's client ID, which can be found in the GoogleService-Info.plist file\n+// and is stored in the `clientID` property of your FIRApp options.\n+// Firebase Google auth is built on top of Google sign-in, so you'll have to add a URL\n+// scheme to your project as outlined at the bottom of this reference:\n+// https://developers.google.com/identity/sign-in/ios/start-integrating\n+//\n+// Make sure you don't accidentally check in your client ID in a public repo!\n+let kGoogleAppClientID = (FIRApp.defaultApp()?.options.clientID)!\n+\n+// Your Facebook App ID, which can be found on developers.facebook.com.\n+let kFacebookAppID     = \"your fb app ID here\"\n+\n+/// A view controller displaying a basic sign-in flow using FIRAuthUI.\n class AuthViewController: UIViewController {\n+  // Before running this sample, make sure you've correctly configured\n+  // the appropriate authentication methods in Firebase console. For more\n+  // info, see https://firebase.google.com/docs/auth/\n+  \n+  private var authStateDidChangeHandle: FIRAuthStateDidChangeListenerHandle?\n+  \n+  private(set) var auth: FIRAuth? = FIRAuth.auth()\n+  private(set) var authUI: FIRAuthUI? = FIRAuthUI.authUI()\n+  \n+  @IBOutlet private var signOutButton: UIButton!\n+  @IBOutlet private var startButton: UIButton!\n+  \n+  @IBOutlet private var signedInLabel: UILabel!\n+  @IBOutlet private var nameLabel: UILabel!\n+  @IBOutlet private var emailLabel: UILabel!\n+  @IBOutlet private var uidLabel: UILabel!\n+  \n+  @IBOutlet var topConstraint: NSLayoutConstraint!\n+  \n+  override func viewWillAppear(animated: Bool) {\n+    super.viewWillAppear(animated)\n+    \n+    // If you haven't set up your authentications correctly these buttons\n+    // will still appear in the UI, but they'll crash the app when tapped.\n+    let providers: [FIRAuthProviderUI] = [\n+      FIRGoogleAuthUI(clientID: kGoogleAppClientID)!,\n+      FIRFacebookAuthUI(appID: kFacebookAppID)!,\n+    ]\n+    self.authUI?.signInProviders = providers\n+    \n+    // Strangely this is listed as TOSURL in the objc source and isn't\n+    // given a swift name that would otherwise make it import as termsOfServiceURL.\n+    self.authUI?.termsOfServiceURL = kFirebaseTermsOfService","path":"samples/swift/uidemo/AuthViewController.swift","position":56,"original_position":57,"commit_id":"86c112d9f85d3f38696e50d037e88118cb6fc6b5","original_commit_id":"f69e7d853e1f0fe3c46fdd42264c5f8cb8049986","user":{"login":"iulukaya","id":821349,"avatar_url":"https://avatars.githubusercontent.com/u/821349?v=3","gravatar_id":"","url":"https://api.github.com/users/iulukaya","html_url":"https://github.com/iulukaya","followers_url":"https://api.github.com/users/iulukaya/followers","following_url":"https://api.github.com/users/iulukaya/following{/other_user}","gists_url":"https://api.github.com/users/iulukaya/gists{/gist_id}","starred_url":"https://api.github.com/users/iulukaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulukaya/subscriptions","organizations_url":"https://api.github.com/users/iulukaya/orgs","repos_url":"https://api.github.com/users/iulukaya/repos","events_url":"https://api.github.com/users/iulukaya/events{/privacy}","received_events_url":"https://api.github.com/users/iulukaya/received_events","type":"User","site_admin":false},"body":"It's termsOfServiceURL in pod version of objc source too. Most likely pod version and github versions are not the same.","created_at":"2016-08-03T15:30:14Z","updated_at":"2016-08-03T15:30:14Z","html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/95#discussion_r73359981","pull_request_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/comments/73359981"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/95#discussion_r73359981"},"pull_request":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95"}}},"pull_request":{"url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95","id":79616320,"html_url":"https://github.com/firebase/FirebaseUI-iOS/pull/95","diff_url":"https://github.com/firebase/FirebaseUI-iOS/pull/95.diff","patch_url":"https://github.com/firebase/FirebaseUI-iOS/pull/95.patch","issue_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/95","number":95,"state":"open","locked":false,"title":"Auth sample","user":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"body":"Adds the swift auth sample to the catalogue app.","created_at":"2016-08-01T18:48:05Z","updated_at":"2016-08-03T15:30:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf977d21e5815bfefcbc8bbca2030f79841ffe3f","assignee":{"login":"iulukaya","id":821349,"avatar_url":"https://avatars.githubusercontent.com/u/821349?v=3","gravatar_id":"","url":"https://api.github.com/users/iulukaya","html_url":"https://github.com/iulukaya","followers_url":"https://api.github.com/users/iulukaya/followers","following_url":"https://api.github.com/users/iulukaya/following{/other_user}","gists_url":"https://api.github.com/users/iulukaya/gists{/gist_id}","starred_url":"https://api.github.com/users/iulukaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulukaya/subscriptions","organizations_url":"https://api.github.com/users/iulukaya/orgs","repos_url":"https://api.github.com/users/iulukaya/repos","events_url":"https://api.github.com/users/iulukaya/events{/privacy}","received_events_url":"https://api.github.com/users/iulukaya/received_events","type":"User","site_admin":false},"assignees":[{"login":"iulukaya","id":821349,"avatar_url":"https://avatars.githubusercontent.com/u/821349?v=3","gravatar_id":"","url":"https://api.github.com/users/iulukaya","html_url":"https://github.com/iulukaya","followers_url":"https://api.github.com/users/iulukaya/followers","following_url":"https://api.github.com/users/iulukaya/following{/other_user}","gists_url":"https://api.github.com/users/iulukaya/gists{/gist_id}","starred_url":"https://api.github.com/users/iulukaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iulukaya/subscriptions","organizations_url":"https://api.github.com/users/iulukaya/orgs","repos_url":"https://api.github.com/users/iulukaya/repos","events_url":"https://api.github.com/users/iulukaya/events{/privacy}","received_events_url":"https://api.github.com/users/iulukaya/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95/commits","review_comments_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95/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/95/comments","statuses_url":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/86c112d9f85d3f38696e50d037e88118cb6fc6b5","head":{"label":"morganchen12:auth-sample","ref":"auth-sample","sha":"86c112d9f85d3f38696e50d037e88118cb6fc6b5","user":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"repo":{"id":64167998,"name":"FirebaseUI-iOS","full_name":"morganchen12/FirebaseUI-iOS","owner":{"login":"morganchen12","id":4529021,"avatar_url":"https://avatars.githubusercontent.com/u/4529021?v=3","gravatar_id":"","url":"https://api.github.com/users/morganchen12","html_url":"https://github.com/morganchen12","followers_url":"https://api.github.com/users/morganchen12/followers","following_url":"https://api.github.com/users/morganchen12/following{/other_user}","gists_url":"https://api.github.com/users/morganchen12/gists{/gist_id}","starred_url":"https://api.github.com/users/morganchen12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morganchen12/subscriptions","organizations_url":"https://api.github.com/users/morganchen12/orgs","repos_url":"https://api.github.com/users/morganchen12/repos","events_url":"https://api.github.com/users/morganchen12/events{/privacy}","received_events_url":"https://api.github.com/users/morganchen12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morganchen12/FirebaseUI-iOS","description":null,"fork":true,"url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS","forks_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/forks","keys_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/teams","hooks_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/hooks","issue_events_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/events","assignees_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/tags","blobs_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/languages","stargazers_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/stargazers","contributors_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/contributors","subscribers_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/subscribers","subscription_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/subscription","commits_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/merges","archive_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/downloads","issues_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/labels{/name}","releases_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/morganchen12/FirebaseUI-iOS/deployments","created_at":"2016-07-25T21:06:20Z","updated_at":"2016-07-25T21:06:22Z","pushed_at":"2016-08-02T22:48:54Z","git_url":"git://github.com/morganchen12/FirebaseUI-iOS.git","ssh_url":"git@github.com:morganchen12/FirebaseUI-iOS.git","clone_url":"https://github.com/morganchen12/FirebaseUI-iOS.git","svn_url":"https://github.com/morganchen12/FirebaseUI-iOS","homepage":null,"size":1462,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"firebase:master","ref":"master","sha":"e8751b0f022b58e452503fefebe691db18a3ae07","user":{"login":"firebase","id":1335026,"avatar_url":"https://avatars.githubusercontent.com/u/1335026?v=3","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,"name":"FirebaseUI-iOS","full_name":"firebase/FirebaseUI-iOS","owner":{"login":"firebase","id":1335026,"avatar_url":"https://avatars.githubusercontent.com/u/1335026?v=3","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":"","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":"2016-08-02T07:09:05Z","pushed_at":"2016-08-03T03:12:16Z","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":null,"size":1546,"stargazers_count":246,"watchers_count":246,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":24,"forks":65,"open_issues":24,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95"},"html":{"href":"https://github.com/firebase/FirebaseUI-iOS/pull/95"},"issue":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/95"},"comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/issues/95/comments"},"review_comments":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/pulls/95/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/95/commits"},"statuses":{"href":"https://api.github.com/repos/firebase/FirebaseUI-iOS/statuses/86c112d9f85d3f38696e50d037e88118cb6fc6b5"}}}}
{"actor":{"display_login":"iulukaya"}}