Merge pull request #4 from heinerlamprecht/issue/missing-cast-of-port-parameter

Make sure, the parameter "port" is always treated as a number.
This commit is contained in:
Nikita 2020-09-10 11:26:38 +03:00 committed by GitHub
commit 63348cfd13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "cordova-plugin-socket-tcp",
"version": "1.6.0",
"version": "1.6.1",
"description": "This Cordova plugin provides JavaScript API, that allows you to communicate with server through TCP protocol. Currently we support these platforms: iOS, Android, WP8.",
"cordova": {
"platforms": [

View File

@ -26,7 +26,7 @@
NSString *socketKey = [command.arguments objectAtIndex:0];
NSString *host = [command.arguments objectAtIndex:1];
NSNumber *port = [command.arguments objectAtIndex:2];
NSNumber *port = [NSNumber numberWithInteger:[[command.arguments objectAtIndex:2] integerValue]];
NSLog(@"[NATIVE] OPEN socket for port: %@", port);