質問編集履歴
2
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
```Swift
|
28
28
|
|
29
|
-
checkRef = Database.database().reference().child(Const.UpdatePath)
|
29
|
+
let checkRef = Database.database().reference().child(Const.UpdatePath)
|
30
30
|
|
31
31
|
checkRef.observeSingleEvent(of: DataEventType.value, with: { snapshot in
|
32
32
|
|
1
情報の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -15,3 +15,25 @@
|
|
15
15
|
```
|
16
16
|
|
17
17
|
のように書けばいいかと思うのですが、10秒後にある処理を**やめたい**場合にはどのように書けばいいのでしょうか?
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
(追記) 2018.2.28
|
22
|
+
|
23
|
+
追記します。タイムアウトしたい処理は、Google Firebase Realtime Databaseの**observeSingleEvent**です。コードは、以下のようになっています。
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
```Swift
|
28
|
+
|
29
|
+
checkRef = Database.database().reference().child(Const.UpdatePath)
|
30
|
+
|
31
|
+
checkRef.observeSingleEvent(of: DataEventType.value, with: { snapshot in
|
32
|
+
|
33
|
+
(snapshotを使った処理)
|
34
|
+
|
35
|
+
}
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
よろしくお願いします。
|