質問編集履歴

9

本文修正

2018/01/09 10:50

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

8

本文修正

2018/01/09 10:50

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

7

本文修正

2018/01/09 07:01

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

6

本文修正

2018/01/09 06:36

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

5

本文修正

2018/01/09 04:28

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -12,6 +12,8 @@
12
12
 
13
13
  デバッグエリアを見る限り成功している様ですが、
14
14
 
15
+ シミュレーター上でGoogleLogInボタンをタップしても、
16
+
15
17
  上記画像の様なgmailアドレスとパスワードを入力する画面が立ち上がってきません。
16
18
 
17
19
 

4

本文修正

2018/01/09 03:18

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -34,9 +34,7 @@
34
34
 
35
35
  ```ここに言語を入力
36
36
 
37
-
38
-
39
- AppDelegateです
37
+ (AppDelegateです)
40
38
 
41
39
 
42
40
 
@@ -50,6 +48,8 @@
50
48
 
51
49
  import FBSDKCoreKit
52
50
 
51
+ import RAMAnimatedTabBarController
52
+
53
53
 
54
54
 
55
55
  @UIApplicationMain
@@ -60,15 +60,15 @@
60
60
 
61
61
 
62
62
 
63
+
64
+
63
65
  var window: UIWindow?
64
66
 
65
67
 
66
68
 
67
69
 
68
70
 
69
-
70
-
71
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch.
71
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
72
72
 
73
73
 
74
74
 
@@ -90,128 +90,74 @@
90
90
 
91
91
 
92
92
 
93
+
94
+
93
- //
95
+ func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!)
96
+
97
+
98
+
94
-
99
+ {
100
+
101
+
102
+
95
- func application(_ application: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any])
103
+ func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
96
-
97
- -> Bool {
104
+
98
-
105
+
106
+
99
- return GIDSignIn.sharedInstance().handle(url,
107
+ return GIDSignIn.sharedInstance().handle(url,
100
-
108
+
101
- sourceApplication:options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String,
109
+ sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String,
102
-
110
+
103
- annotation: [UIApplicationOpenURLOptionsKey.annotation])
111
+ annotation: options[UIApplicationOpenURLOptionsKey.annotation])
112
+
104
-
113
+ }
114
+
115
+
116
+
105
-
117
+ }
118
+
119
+
120
+
121
+
122
+
123
+ func applicationWillResignActive(_ application: UIApplication) {
124
+
125
+ print("アプリ閉じそう")
126
+
127
+ }
128
+
129
+ func applicationDidEnterBackground(_ application: UIApplication) {
130
+
131
+ print("アプリ閉じた")
132
+
133
+ }
134
+
135
+ func applicationWillEnterForeground(_ application: UIApplication) {
136
+
137
+ print("アプリ開きそう")
138
+
139
+ }
140
+
141
+ func applicationDidBecomeActive(_ application: UIApplication) {
142
+
143
+ print("アプリ開いた")
144
+
145
+ FBSDKAppEvents.activateApp()
146
+
147
+ }
148
+
149
+ func applicationWillTerminate(_ application: UIApplication) {
150
+
151
+ print("フリックしてアプリ終了")
152
+
153
+ }
154
+
155
+
156
+
157
+
106
158
 
107
159
  }
108
160
 
109
-
110
-
111
-
112
-
113
-
114
-
115
- //
116
-
117
-
118
-
119
- func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error?) {
120
-
121
- // ...
122
-
123
- if let error = error {
124
-
125
- print(error.localizedDescription)
126
-
127
- return
128
-
129
- }
130
-
131
- print("グーグルでログインしたUser signed into googkle")
132
-
133
-
134
-
135
- guard let authentication = user.authentication else { return }
136
-
137
- let credential = GoogleAuthProvider.credential(withIDToken: authentication.idToken,
138
-
139
- accessToken: authentication.accessToken)
140
-
141
-
142
-
143
- //
144
-
145
- Auth.auth().signIn(with: credential) { (user, error) in
146
-
147
- print("firebaseでログインしたUser signed into googkle")
148
-
149
-
150
-
151
- }
152
-
153
- }
154
-
155
-
156
-
157
-
158
-
159
- func sign(_ signIn: GIDSignIn!, didDisconnectWith user: GIDGoogleUser!, withError error: Error!) {
160
-
161
- // Perform any operations when the user disconnects from app here.
162
-
163
- // ...
164
-
165
- }
166
-
167
-
168
-
169
-
170
-
171
- func applicationWillResignActive(_ application: UIApplication) {
172
-
173
- print("アプリ閉じそう")
174
-
175
- }
176
-
177
- func applicationDidEnterBackground(_ application: UIApplication) {
178
-
179
- print("アプリ閉じた")
180
-
181
- }
182
-
183
- func applicationWillEnterForeground(_ application: UIApplication) {
184
-
185
- print("アプリ開きそう")
186
-
187
- }
188
-
189
- func applicationDidBecomeActive(_ application: UIApplication) {
190
-
191
- print("アプリ開いた")
192
-
193
- FBSDKAppEvents.activateApp()
194
-
195
- }
196
-
197
- func applicationWillTerminate(_ application: UIApplication) {
198
-
199
- print("フリックしてアプリ終了")
200
-
201
- }
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
-
211
- }
212
-
213
-
214
-
215
161
 
216
162
 
217
163
  ```
@@ -222,7 +168,7 @@
222
168
 
223
169
  ```ここに言語を入力
224
170
 
225
- LogInViewControllerです
171
+ (LogInViewControllerです)
226
172
 
227
173
 
228
174
 
@@ -238,15 +184,13 @@
238
184
 
239
185
  import FBSDKLoginKit
240
186
 
187
+ import RAMAnimatedTabBarController
188
+
241
189
 
242
190
 
243
191
  class LogInViewController: UIViewController, GIDSignInUIDelegate {
244
192
 
245
-
246
-
247
- @IBOutlet weak var GIDSignInButton: GIDSignInButton!
193
+
248
-
249
-
250
194
 
251
195
 
252
196
 
@@ -258,21 +202,75 @@
258
202
 
259
203
  GIDSignIn.sharedInstance().uiDelegate = self
260
204
 
261
-
262
-
263
-
264
-
265
-
266
-
267
- //FBボタン作成
205
+ GIDSignIn.sharedInstance().signIn()
206
+
268
-
207
+ }
208
+
209
+
210
+
211
+
212
+
269
- let loginButton:FBSDKLoginButton = FBSDKLoginButton()
213
+ @IBAction func GIDLigInButton(_ sender: Any) {
214
+
215
+
216
+
270
-
217
+ func sign(_ signIn: GIDSignIn!, didSignInFor user: GIDGoogleUser!, withError error: Error!) {
218
+
219
+
220
+
271
- loginButton.center = self.view.center
221
+ if let error = error {
272
-
222
+
273
- self.view.addSubview(loginButton)
223
+ print(error.localizedDescription)
224
+
274
-
225
+ return
226
+
275
-
227
+ }
228
+
229
+ print("User signed into google")
230
+
231
+
232
+
233
+ guard let authentication = user.authentication else { return }
234
+
235
+ let credential = GoogleAuthProvider.credential(withIDToken: (authentication.idToken)!,
236
+
237
+ accessToken: (authentication.accessToken)!)
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+ Auth.auth().signIn(with: credential) { (user, error) in
246
+
247
+ if let error = error {
248
+
249
+ print(error.localizedDescription)
250
+
251
+ return
252
+
253
+ }
254
+
255
+
256
+
257
+
258
+
259
+ print("サクセスFirebase")
260
+
261
+
262
+
263
+
264
+
265
+ let storyboard: UIStoryboard = UIStoryboard(name: "RAMAnimatedTabBar", bundle: nil)
266
+
267
+ let nextView = storyboard.instantiateInitialViewController() as! RAMAnimatedTabBarController
268
+
269
+ self.present(nextView, animated: true, completion: nil)
270
+
271
+ }
272
+
273
+ }
276
274
 
277
275
  }
278
276
 
@@ -286,12 +284,10 @@
286
284
 
287
285
  戻る際の処理が特に必要ないのでメソッドは空です*/
288
286
 
289
- @IBAction func BackLogInView(segue: UIStoryboardSegue) {
287
+ func BackLogInView(segue: UIStoryboardSegue) {
290
288
 
291
289
  }
292
290
 
293
291
  }
294
292
 
295
-
296
-
297
293
  ```

3

本文修正

2018/01/09 03:11

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

2

本文修正

2018/01/06 04:54

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
File without changes

1

本文修正

2018/01/06 02:35

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,11 +4,15 @@
4
4
 
5
5
 
6
6
 
7
+ ![イメージ説明](98a8e133178efca12a19c579aed9972d.png)
8
+
9
+
10
+
7
11
  FirebaseAuthでのGoogleログインは
8
12
 
9
13
  デバッグエリアを見る限り成功している様ですが、
10
14
 
11
- gmailアドレスとパスワードを入力するログイン画面が立ち上がってきません。
15
+ 上記画像の様なgmailアドレスとパスワードを入力する画面が立ち上がってきません。
12
16
 
13
17
 
14
18
 
@@ -20,7 +24,7 @@
20
24
 
21
25
 
22
26
 
23
- どうすればgoogleログインの入力画面を表示できますか?
27
+ どうすればgoogleログイン画面を表示できますか?
24
28
 
25
29
  教えて頂きたいです。
26
30