質問編集履歴
1
バックグラウンドの処理を実装
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,23 +22,27 @@
|
|
22
22
|
|
23
23
|
let semaphore = DispatchSemaphore(value: 0)
|
24
24
|
|
25
|
-
|
25
|
+
DispatchQueue.global(qos: .default).async {
|
26
26
|
|
27
|
-
|
27
|
+
ApiClient.shared.request(CheckTokenTargetType()) { result in
|
28
28
|
|
29
|
-
|
29
|
+
switch result {
|
30
30
|
|
31
|
+
case .success(_):
|
32
|
+
|
31
|
-
isLogin = true
|
33
|
+
isLogin = true
|
32
34
|
|
33
35
|
|
34
36
|
|
35
|
-
default:
|
37
|
+
default:
|
36
38
|
|
37
|
-
break
|
39
|
+
break
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
semaphore.signal()
|
38
44
|
|
39
45
|
}
|
40
|
-
|
41
|
-
semaphore.signal()
|
42
46
|
|
43
47
|
}
|
44
48
|
|