質問編集履歴
6
コンソールの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -216,4 +216,24 @@
|
|
216
216
|
|
217
217
|
![イメージ説明](7a1a16fed4c5f8d0e43bf46e7d72e07c.png)
|
218
218
|
|
219
|
+
|
220
|
+
|
221
|
+
**コンソール**
|
222
|
+
|
223
|
+
アプリを起動してからTwitterログインしてabout:blankに遷移するまで
|
224
|
+
|
225
|
+
```
|
226
|
+
|
227
|
+
2019-11-09 08:18:45.113207+0900 GTchat[7627:2228391] - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
|
228
|
+
|
229
|
+
2019-11-09 08:18:45.156983+0900 GTchat[7627:2228392] 6.11.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60103000 started
|
230
|
+
|
231
|
+
2019-11-09 08:18:45.157294+0900 GTchat[7627:2228392] 6.11.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
|
232
|
+
|
233
|
+
2019-11-09 08:18:45.217640+0900 GTchat[7627:2228392] 6.11.0 - [GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
```
|
238
|
+
|
219
239
|
書いてない部分で解決に必要な要素がありましたら追記します。
|
5
コードなどの更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
|
39
39
|
|
40
40
|
|
41
|
-
### コードや設定など
|
41
|
+
### コードや設定など(最終更新11/9 7:57)
|
42
42
|
|
43
43
|
**LogInViewController.swift**
|
44
44
|
|
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
class LogInViewController: UIViewController {
|
56
56
|
|
57
|
-
|
57
|
+
|
58
58
|
|
59
59
|
override func viewDidLoad() {
|
60
60
|
|
@@ -124,9 +124,7 @@
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
-
|
128
|
-
|
129
|
-
@IBAction func push
|
127
|
+
@IBAction func pushTwitter(_ sender: Any) {
|
130
128
|
|
131
129
|
signInWithTwitter()
|
132
130
|
|
@@ -148,59 +146,37 @@
|
|
148
146
|
|
149
147
|
|
150
148
|
|
151
|
-
|
152
|
-
|
153
149
|
@UIApplicationMain
|
154
150
|
|
155
151
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
156
152
|
|
153
|
+
|
154
|
+
|
157
|
-
|
155
|
+
var window: UIWindow?
|
156
|
+
|
157
|
+
|
158
|
+
|
158
|
-
|
159
|
+
override init() {
|
160
|
+
|
159
|
-
|
161
|
+
super.init()
|
162
|
+
|
163
|
+
FirebaseApp.configure()
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
|
160
168
|
|
161
169
|
|
162
170
|
|
163
171
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
164
172
|
|
165
|
-
// Override point for customization after application launch.
|
166
|
-
|
167
|
-
FirebaseApp.configure()
|
168
|
-
|
169
173
|
return true
|
170
174
|
|
171
175
|
}
|
172
176
|
|
173
|
-
|
174
|
-
|
175
|
-
|
177
|
+
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
178
|
+
|
180
|
-
|
181
|
-
// Called when a new scene session is being created.
|
182
|
-
|
183
|
-
// Use this method to select a configuration to create the new scene with.
|
184
|
-
|
185
|
-
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
186
|
-
|
187
|
-
}
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
|
192
|
-
|
193
|
-
// Called when the user discards a scene session.
|
194
|
-
|
195
|
-
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
196
|
-
|
197
|
-
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
198
|
-
|
199
|
-
}
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
func application(_ app
|
179
|
+
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
204
180
|
|
205
181
|
return true
|
206
182
|
|
@@ -212,6 +188,8 @@
|
|
212
188
|
|
213
189
|
}
|
214
190
|
|
191
|
+
|
192
|
+
|
215
193
|
```
|
216
194
|
|
217
195
|
**TwitterAPI**
|
@@ -224,14 +202,18 @@
|
|
224
202
|
|
225
203
|
**URL Types**
|
226
204
|
|
227
|
-
![
|
205
|
+
![イメージ説明](68f6dc503a3a9e7dfccc206a7290ef5b.png)
|
228
206
|
|
229
207
|
|
230
208
|
|
231
209
|
**Info.plist**
|
232
210
|
|
233
|
-
![イメージ説明](
|
211
|
+
![イメージ説明](8c1e62db8d82537720d496a6fda87b15.png)
|
212
|
+
|
213
|
+
|
214
|
+
|
234
|
-
|
215
|
+
**プロジェクト**
|
216
|
+
|
235
|
-
|
217
|
+
![イメージ説明](7a1a16fed4c5f8d0e43bf46e7d72e07c.png)
|
236
218
|
|
237
219
|
書いてない部分で解決に必要な要素がありましたら追記します。
|
4
AppDelegate,URL Types,Info.plistの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -138,6 +138,82 @@
|
|
138
138
|
|
139
139
|
```
|
140
140
|
|
141
|
+
**AppDelegate.swift**
|
142
|
+
|
143
|
+
```swift
|
144
|
+
|
145
|
+
import UIKit
|
146
|
+
|
147
|
+
import Firebase
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
@UIApplicationMain
|
154
|
+
|
155
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
164
|
+
|
165
|
+
// Override point for customization after application launch.
|
166
|
+
|
167
|
+
FirebaseApp.configure()
|
168
|
+
|
169
|
+
return true
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
// MARK: UISceneSession Lifecycle
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
|
180
|
+
|
181
|
+
// Called when a new scene session is being created.
|
182
|
+
|
183
|
+
// Use this method to select a configuration to create the new scene with.
|
184
|
+
|
185
|
+
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
|
186
|
+
|
187
|
+
}
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
|
192
|
+
|
193
|
+
// Called when the user discards a scene session.
|
194
|
+
|
195
|
+
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
|
196
|
+
|
197
|
+
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
|
198
|
+
|
199
|
+
}
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
func application(_ application: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
|
204
|
+
|
205
|
+
return true
|
206
|
+
|
207
|
+
}
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
}
|
214
|
+
|
215
|
+
```
|
216
|
+
|
141
217
|
**TwitterAPI**
|
142
218
|
|
143
219
|
【Callback URLs】
|
@@ -146,4 +222,16 @@
|
|
146
222
|
|
147
223
|
|
148
224
|
|
225
|
+
**URL Types**
|
226
|
+
|
227
|
+
![URL Types](a4cf2c29d7c5b76eea3b0f4772e2b856.png)
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
**Info.plist**
|
232
|
+
|
233
|
+
![イメージ説明](fc22f4abd6d6f0a09e0bc35fe611685f.png)
|
234
|
+
|
235
|
+
|
236
|
+
|
149
237
|
書いてない部分で解決に必要な要素がありましたら追記します。
|
3
LogInViewControllerのコードを最新版に更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
|
41
41
|
### コードや設定など
|
42
42
|
|
43
|
-
**ViewController.swift**
|
43
|
+
**LogInViewController.swift**
|
44
44
|
|
45
45
|
```swift
|
46
46
|
|
@@ -52,9 +52,9 @@
|
|
52
52
|
|
53
53
|
|
54
54
|
|
55
|
-
class ViewController: UIViewController {
|
55
|
+
class LogInViewController: UIViewController {
|
56
56
|
|
57
|
-
|
57
|
+
|
58
58
|
|
59
59
|
override func viewDidLoad() {
|
60
60
|
|
@@ -96,6 +96,8 @@
|
|
96
96
|
|
97
97
|
print("success")
|
98
98
|
|
99
|
+
self.performSegue(withIdentifier: "toMain", sender: nil)
|
100
|
+
|
99
101
|
// User is signed in.
|
100
102
|
|
101
103
|
// IdP data available in authResult.additionalUserInfo.profile.
|
@@ -124,15 +126,13 @@
|
|
124
126
|
|
125
127
|
|
126
128
|
|
127
|
-
@IBAction func pushLogIn(_ sender: Any) {
|
129
|
+
@IBAction func pushLogInButton(_ sender: Any) {
|
128
130
|
|
129
131
|
signInWithTwitter()
|
130
132
|
|
131
133
|
}
|
132
134
|
|
133
135
|
|
134
|
-
|
135
|
-
|
136
136
|
|
137
137
|
}
|
138
138
|
|
2
文の改善
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
FirebaseでのTwitter
|
1
|
+
FirebaseでのTwitterログインでabout:blankへ遷移してしまう
|
test
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
### 発生してて解決したい問題
|
2
|
+
|
3
|
+
Swiftを用いてSNSログイン制のチャットアプリを製作中です。
|
4
|
+
|
5
|
+
|
2
6
|
|
3
7
|
①Firebaseを用いたTwitter認証でログインした後[連携アプリを認証]ボタンを押す。
|
4
8
|
|
1
誤字の訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -122,7 +122,7 @@
|
|
122
122
|
|
123
123
|
@IBAction func pushLogIn(_ sender: Any) {
|
124
124
|
|
125
|
-
signWithTwitter()
|
125
|
+
signInWithTwitter()
|
126
126
|
|
127
127
|
}
|
128
128
|
|