File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 1515#import < React/RCTEventEmitter.h>
1616
1717@interface RNCallKeep : RCTEventEmitter <CXProviderDelegate >
18-
1918@property (nonatomic , strong ) CXCallController *callKeepCallController;
2019@property (nonatomic , strong ) CXProvider *callKeepProvider;
2120
@@ -37,4 +36,7 @@ continueUserActivity:(NSUserActivity *)userActivity
3736
3837+ (void )endCallWithUUID : (NSString *)uuidString
3938 reason : (int )reason ;
39+
40+ + (BOOL )checkIfActiveCall : (NSString *)uuidString ;
41+
4042@end
Original file line number Diff line number Diff line change @@ -304,6 +304,20 @@ - (void)requestTransaction:(CXTransaction *)transaction
304304 }];
305305}
306306
307+ + (BOOL )checkIfActiveCall : (NSString *)uuidString
308+ {
309+ CXCallObserver *callObserver = [[CXCallObserver alloc ] init ];
310+ NSUUID *uuid = [[NSUUID alloc ] initWithUUIDString: uuidString];
311+
312+ for (CXCall *call in callObserver.calls ){
313+ NSLog (@" Connected: %d " , [call.UUID isEqual: uuid]);
314+ if ([call.UUID isEqual: [[NSUUID alloc ] initWithUUIDString: uuidString]] && !call.hasConnected ){
315+ return true ;
316+ }
317+ }
318+ return false ;
319+ }
320+
307321+ (void )endCallWithUUID : (NSString *)uuidString
308322 reason : (int )reason
309323{
You can’t perform that action at this time.
0 commit comments