質問編集履歴
2
コードの修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
追記します。タイムアウトしたい処理は、Google Firebase Realtime Databaseの**observeSingleEvent**です。コードは、以下のようになっています。
|
|
13
13
|
|
|
14
14
|
```Swift
|
|
15
|
-
checkRef = Database.database().reference().child(Const.UpdatePath)
|
|
15
|
+
let checkRef = Database.database().reference().child(Const.UpdatePath)
|
|
16
16
|
checkRef.observeSingleEvent(of: DataEventType.value, with: { snapshot in
|
|
17
17
|
(snapshotを使った処理)
|
|
18
18
|
}
|
1
情報の追記
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -6,4 +6,15 @@
|
|
|
6
6
|
(10秒後にやりたい処理)
|
|
7
7
|
})
|
|
8
8
|
```
|
|
9
|
-
のように書けばいいかと思うのですが、10秒後にある処理を**やめたい**場合にはどのように書けばいいのでしょうか?
|
|
9
|
+
のように書けばいいかと思うのですが、10秒後にある処理を**やめたい**場合にはどのように書けばいいのでしょうか?
|
|
10
|
+
|
|
11
|
+
(追記) 2018.2.28
|
|
12
|
+
追記します。タイムアウトしたい処理は、Google Firebase Realtime Databaseの**observeSingleEvent**です。コードは、以下のようになっています。
|
|
13
|
+
|
|
14
|
+
```Swift
|
|
15
|
+
checkRef = Database.database().reference().child(Const.UpdatePath)
|
|
16
|
+
checkRef.observeSingleEvent(of: DataEventType.value, with: { snapshot in
|
|
17
|
+
(snapshotを使った処理)
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
よろしくお願いします。
|