Skip to content

Commit

Permalink
Merge pull request #58 from voxeet/develop
Browse files Browse the repository at this point in the history
iOS: Fix nullable string in ParticipantInfo and Bump SDK to 3.1.7
  • Loading branch information
codlab authored Jul 9, 2021
2 parents a2328fa + 59eb748 commit 6a2ff44
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 11 deletions.
3 changes: 3 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release Notes

### 1.5.4 (Jul 8th, 2021)
- bump iOS SDK to 3.2.0 and iOS UXKit to 1.5.0

### 1.5.3 (May 19th, 2021)
- bump iOS SDK to 3.1.6 and iOS UXKit to 1.4.8

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-voxeet",
"version": "1.5.3",
"version": "1.5.4",
"description": "Cordova Voxeet Plugin",
"cordova": {
"id": "cordova-plugin-voxeet",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
id="cordova-plugin-voxeet"
version="1.5.3">
version="1.5.4">
<name>Voxeet</name>
<description>Cordova Voxeet Plugin</description>
<license>Apache 2.0 License</license>
Expand Down
20 changes: 15 additions & 5 deletions src/ios/CDVVoxeet.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,14 @@ - (void)dealloc {

- (void)connect:(CDVInvokedUrlCommand *)command {
NSDictionary *participant = [command.arguments objectAtIndex:0];
NSString *externalID = [participant objectForKey:@"externalId"];
NSString *name = [participant objectForKey:@"name"];
NSString *avatarURL = [participant objectForKey:@"avatarUrl"];

VTParticipantInfo *participantInfo = [[VTParticipantInfo alloc]
initWithExternalID:[participant objectForKey:@"externalId"]
name:[participant objectForKey:@"name"]
avatarURL:[participant objectForKey:@"avatarUrl"]];
initWithExternalID:![externalID isEqual:[NSNull null]] ? externalID : nil
name:![name isEqual:[NSNull null]] ? name : nil
avatarURL: ![avatarURL isEqual:[NSNull null]] ? avatarURL : nil];

dispatch_async(dispatch_get_main_queue(), ^{
[VoxeetSDK.shared.session openWithInfo:participantInfo completion:^(NSError *error) {
Expand Down Expand Up @@ -212,7 +216,10 @@ - (void)invite:(CDVInvokedUrlCommand *)command {
NSString *name = [participant objectForKey:@"name"];
NSString *avatarURL = [participant objectForKey:@"avatarUrl"];

VTParticipantInfo *participantInfo = [[VTParticipantInfo alloc] initWithExternalID:externalID name:name avatarURL:avatarURL];
VTParticipantInfo *participantInfo = [[VTParticipantInfo alloc]
initWithExternalID:![externalID isEqual:[NSNull null]] ? externalID : nil
name:![name isEqual:[NSNull null]] ? name : nil
avatarURL: ![avatarURL isEqual:[NSNull null]] ? avatarURL : nil];
[participantInfos addObject:participantInfo];
}

Expand Down Expand Up @@ -505,7 +512,10 @@ - (void)startConference:(CDVInvokedUrlCommand *)command { /* Deprecated */
NSString *name = [participant objectForKey:@"name"];
NSString *avatarURL = [participant objectForKey:@"avatarUrl"];

VTParticipantInfo *participantInfo = [[VTParticipantInfo alloc] initWithExternalID:externalID name:name avatarURL:avatarURL];
VTParticipantInfo *participantInfo = [[VTParticipantInfo alloc]
initWithExternalID:![externalID isEqual:[NSNull null]] ? externalID : nil
name:![name isEqual:[NSNull null]] ? name : nil
avatarURL: ![avatarURL isEqual:[NSNull null]] ? avatarURL : nil];
[participantInfos addObject:participantInfo];
}

Expand Down
4 changes: 2 additions & 2 deletions src/ios/Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "voxeet/voxeet-uxkit-ios" == 1.4.8
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" == 3.1.6
github "voxeet/voxeet-uxkit-ios" == 1.5.0
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" == 3.2.0
4 changes: 2 additions & 2 deletions src/ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" "3.1.6"
binary "https://raw.githubusercontent.com/voxeet/voxeet-sdk-ios/master/VoxeetSDK.json" "3.2.0"
github "SDWebImage/SDWebImage" "5.11.0"
github "voxeet/voxeet-uxkit-ios" "1.4.8"
github "voxeet/voxeet-uxkit-ios" "1.5.0"

0 comments on commit 6a2ff44

Please sign in to comment.