File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
43
43
}
44
44
45
45
func applicationWillTerminate( _ application: UIApplication ) {
46
- // End all ongoing calls when application is going to terminate
46
+ // This method will be called when the app is forcefully terminated.
47
+ // End all ongoing calls in this method.
47
48
let callManager = CXCallManager . shared
48
49
let ongoingCalls = callManager. currentCalls. compactMap { SendBirdCall . getCall ( forUUID: $0. uuid) }
49
50
@@ -59,6 +60,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
59
60
callManager. endCall ( for: uuid, endedAt: Date ( ) , reason: . none)
60
61
}
61
62
}
63
+ // However, because iOS gives a limited time to perform remaining tasks,
64
+ // There might be some calls failed to be ended
65
+ // In this case, I recommend that you register local notification to notify the unterminated calls.
62
66
}
63
67
}
64
68
You can’t perform that action at this time.
0 commit comments