feat(ios) add ability to set CallKit options for incoming calls

The implemented options are the call handle and UUID.
This commit is contained in:
Saúl Ibarra Corretgé 2021-04-29 11:38:16 +02:00 committed by Saúl Ibarra Corretgé
parent b83bc50c03
commit 8477ae8daa
2 changed files with 25 additions and 0 deletions

View File

@ -71,6 +71,16 @@
- (void)setFeatureFlag:(NSString *_Nonnull)flag withBoolean:(BOOL)value;
- (void)setFeatureFlag:(NSString *_Nonnull)flag withValue:(id _Nonnull)value;
/**
* CallKit call handle, to be used when implementing incoming calls.
*/
@property (nonatomic, copy, nullable) NSString *callHandle;
/**
* CallKit call UUID, to be used when implementing incoming calls.
*/
@property (nonatomic, copy, nullable) NSUUID *callUUID;
@end
@interface JitsiMeetConferenceOptions : NSObject
@ -92,6 +102,9 @@
@property (nonatomic, nullable) JitsiMeetUserInfo *userInfo;
@property (nonatomic, copy, nullable, readonly) NSString *callHandle;
@property (nonatomic, copy, nullable, readonly) NSUUID *callUUID;
+ (instancetype _Nonnull)fromBuilder:(void (^_Nonnull)(JitsiMeetConferenceOptionsBuilder *_Nonnull))initBlock;
- (instancetype _Nonnull)init NS_UNAVAILABLE;

View File

@ -52,6 +52,9 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
_videoMuted = nil;
_userInfo = nil;
_callHandle = nil;
_callUUID = nil;
}
return self;
@ -168,6 +171,9 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
_featureFlags = [NSDictionary dictionaryWithDictionary:builder.featureFlags];
_userInfo = builder.userInfo;
_callHandle = builder.callHandle;
_callUUID = builder.callUUID;
}
return self;
@ -205,6 +211,12 @@ static NSString *const WelcomePageEnabledFeatureFlag = @"welcomepage.enabled";
if (_subject != nil) {
config[@"subject"] = self.subject;
}
if (_callHandle != nil) {
config[@"callHandle"] = self.callHandle;
}
if (_callUUID != nil) {
config[@"callUUID"] = [self.callUUID UUIDString];
}
NSMutableDictionary *urlProps = [[NSMutableDictionary alloc] init];