File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,11 @@ export default class RNCallKit {
8686 _RNCallKit . endCall ( uuid ) ;
8787 }
8888
89+ static endAllCalls ( ) {
90+ if ( Platform . OS !== 'ios' ) return ;
91+ _RNCallKit . endAllCalls ( ) ;
92+ }
93+
8994 /*
9095 static setHeldCall(uuid, onHold) {
9196 if (Platform.OS !== 'ios') return;
Original file line number Diff line number Diff line change @@ -144,6 +144,18 @@ - (void)dealloc
144144 [self requestTransaction: transaction];
145145}
146146
147+ RCT_EXPORT_METHOD (endAllCalls)
148+ {
149+ #ifdef DEBUG
150+ NSLog (@" [RNCallKit][endAllCalls] calls = %@ " , self.callKitCallController .callObserver .calls );
151+ #endif
152+ for (CXCall *call in self.callKitCallController .callObserver .calls ) {
153+ CXEndCallAction *endCallAction = [[CXEndCallAction alloc ] initWithCallUUID: call.UUID];
154+ CXTransaction *transaction = [[CXTransaction alloc ] initWithAction: endCallAction];
155+ [self requestTransaction: transaction];
156+ }
157+ }
158+
147159RCT_EXPORT_METHOD (setHeldCall:(NSString *)uuidString onHold:(BOOL )onHold)
148160{
149161#ifdef DEBUG
You can’t perform that action at this time.
0 commit comments