-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS Crash Issue resolved #95
base: master
Are you sure you want to change the base?
iOS Crash Issue resolved #95
Conversation
SidVoraDeveloper
commented
Jul 15, 2021
- Change dictionary type and validation for add outgoing params add
- Change dictionary type and validation for add outgoing params add
src/ios/TwilioVoicePlugin.m
Outdated
@@ -161,11 +161,22 @@ - (void) initializeWithAccessToken:(CDVInvokedUrlCommand*)command { | |||
|
|||
- (void) call:(CDVInvokedUrlCommand*)command { | |||
if ([command.arguments count] > 0) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the blank lines?
src/ios/TwilioVoicePlugin.m
Outdated
if (command.arguments[0] != [NSNull null]) { | ||
self.accessToken = command.arguments[0]; | ||
} | ||
if ([command.arguments count] > 1) { | ||
self.outgoingCallParams = command.arguments[1]; | ||
if ( [allTrim( command.arguments[1] ) length] == 0 ) { | ||
NSDictionary *inventory = @{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is to handle a string for the number rather than an object right?
Can you add a comment accordingly?
Also improve the variable name (perhaps callParams)
src/ios/TwilioVoicePlugin.m
Outdated
NSDictionary *inventory = @{ | ||
@"" : command.arguments[1] | ||
}; | ||
self.outgoingCallParams = inventory; //command.arguments[1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code
self.outgoingCallParams = inventory; //command.arguments[1]; | ||
|
||
}else { | ||
self.outgoingCallParams = [[NSMutableDictionary alloc] init]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this case? You're creating a blank dictionary? It cannot be blank
}; | ||
self.outgoingCallParams = inventory; //command.arguments[1]; | ||
|
||
}else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inconsistent styling. Elsewhere there is a space on either space of else