Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SidVoraDeveloper
Copy link

  • Change dictionary type and validation for add outgoing params add

- Change dictionary type and validation for add outgoing params add
@@ -161,11 +161,22 @@ - (void) initializeWithAccessToken:(CDVInvokedUrlCommand*)command {

- (void) call:(CDVInvokedUrlCommand*)command {
if ([command.arguments count] > 0) {

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the blank lines?

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 = @{
Copy link

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)

NSDictionary *inventory = @{
@"" : command.arguments[1]
};
self.outgoingCallParams = inventory; //command.arguments[1];
Copy link

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];
Copy link

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 {
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants