{"id":290,"date":"2016-07-19T09:50:22","date_gmt":"2016-07-19T01:50:22","guid":{"rendered":"https:\/\/antijava.prjlife.com\/?p=290"},"modified":"2016-07-19T09:52:57","modified_gmt":"2016-07-19T01:52:57","slug":"google-signin-ios-practice-log","status":"publish","type":"post","link":"https:\/\/antijava.prjlife.com\/?p=290","title":{"rendered":"Google SignIn iOS practice log"},"content":{"rendered":"<p>Google Sign-in for iOS<\/p>\n<p>1.Download GoogleSignIn SDK<br \/>\nhttps:\/\/developers.google.com\/identity\/sign-in\/ios\/sdk\/<br \/>\nThere are two ways to get the SDK, CocoaPod or direct download,<br \/>\nPersonally I preferred the download way.<br \/>\n<a href=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-291\" src=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK-300x150.png\" alt=\"0.Download SDK\" width=\"300\" height=\"150\" srcset=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK-300x150.png 300w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK-768x383.png 768w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK-1024x511.png 1024w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/0.Download-SDK.png 1047w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nFollow the official document procedure<br \/>\nhttps:\/\/developers.google.com\/identity\/sign-in\/ios\/start<\/p>\n<p>2.Get configuration file<br \/>\nhttps:\/\/developers.google.com\/mobile\/add?platform=ios&#038;cntapi=signin&#038;cntapp=Default%20Demo%20App&#038;cntpkg=com.google.samples.quickstart.SignInExample&#038;cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fios%2Fstart%3Fconfigured%3Dtrue&#038;cntlbl=Continue%20with%20Try%20Sign-In<\/p>\n<p><a href=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/2.EnableSignin.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-293\" src=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/2.EnableSignin-300x178.png\" alt=\"2.EnableSignin\" width=\"300\" height=\"178\" srcset=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/2.EnableSignin-300x178.png 300w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/2.EnableSignin-768x455.png 768w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/2.EnableSignin.png 1009w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>3.Copy to project directory first then &#8220;pull&#8221; into xcode project<br \/>\nBasically just pull the configuration file into the xcode project\u00a0 and it is OK.<br \/>\nBut you will gonna thank me for this lousy procedure when there are multiple configuration files in one xcode project.<br \/>\n<a href=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/3.Download-plist.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-294\" src=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/3.Download-plist-300x184.png\" alt=\"3.Download plist\" width=\"300\" height=\"184\" srcset=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/3.Download-plist-300x184.png 300w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/3.Download-plist-768x471.png 768w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/3.Download-plist.png 981w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n4.Configure xcode project-level parameters<br \/>\nhttps:\/\/developers.google.com\/identity\/sign-in\/ios\/sign-in?configured=true<\/p>\n<p>Put REVERSED_CLIENT_ID into Project -&gt; Target -&gt; Info -&gt; URL Types<br \/>\nPut bundle id into Project -&gt; Target -&gt; Info -&gt; URL Types<\/p>\n<p><a href=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/4.URLTypes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-295\" src=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/4.URLTypes-300x184.png\" alt=\"4.URLTypes\" width=\"300\" height=\"184\" srcset=\"https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/4.URLTypes-300x184.png 300w, https:\/\/antijava.prjlife.com\/wp-content\/uploads\/2016\/07\/4.URLTypes.png 692w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>5.Modify source code<br \/>\nThere will be only one file to be modified &#8211; AppDelegate<\/p>\n<p>The most important statement is to set [GIDSignIn sharedInstance].clientID = CLIENT_ID(in configuration)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Sign-in for iOS 1.Download GoogleSignIn SDK https:\/\/developers.google.com\/identity\/sign-in\/ios\/sdk\/ There are two ways to get the SDK, CocoaPod or direct download, Personally I preferred the download way. Follow the official document procedure https:\/\/developers.google.com\/identity\/sign-in\/ios\/start 2.Get configuration file https:\/\/developers.google.com\/mobile\/add?platform=ios&#038;cntapi=signin&#038;cntapp=Default%20Demo%20App&#038;cntpkg=com.google.samples.quickstart.SignInExample&#038;cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fios%2Fstart%3Fconfigured%3Dtrue&#038;cntlbl=Continue%20with%20Try%20Sign-In &nbsp; 3.Copy to project &hellip; <a href=\"https:\/\/antijava.prjlife.com\/?p=290\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-290","post","type-post","status-publish","format-standard","hentry","category-ios-development"],"_links":{"self":[{"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=\/wp\/v2\/posts\/290","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=290"}],"version-history":[{"count":0,"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=\/wp\/v2\/posts\/290\/revisions"}],"wp:attachment":[{"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/antijava.prjlife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}