Giter Site home page Giter Site logo

cordova-plugin-chrome-apps-sockets-udp's Introduction

chrome.sockets.tcp Plugin

This plugin provides UDP sockets for Android and iOS.

Status

Beta on Android and iOS.

Reference

The API reference is here.

Release Notes

1.3.0 (Sep 27, 2016)

  • Adds chrome.udp.setBroadcast()

1.2.2 (April 30, 2015)

  • Renamed plugin to pubilsh to NPM

1.2.1 (Mar 17, 2015)

  • Fix multicast socket cannot pause & send receive event synchronously

1.2.0 (November 17, 2014)

  • Remove unnecessary headers for chrome.sockets.* - ios
  • Fix possible blocks leak memory
  • Fixed chrome.sockets.udp socket close with error problem
  • Commented out assert that caused app to crash when no network is available.
  • chrome.sockets: open selector in selector thread
  • Don't modify interest set when key is invalid (fix #388)

1.1.0 (October 24, 2014)

  • Add chrome.sockets.secure.tcp and refactor chrome.sockets.*

1.0.1 (October 23, 2014)

  • Fix a NullPointerException on Android
  • Fix the dependency on iosSocketsCommon so that it works with the Cordova plugin registry.

1.0.0 (October 21, 2014)

  • Initial release

cordova-plugin-chrome-apps-sockets-udp's People

Contributors

agrieve avatar clelland avatar gregvis avatar jpchase avatar kamrik avatar mmocny avatar oahziur avatar techwizeric avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-chrome-apps-sockets-udp's Issues

Permission denied to sendBroadcast

I am using this plugin with several android apps. Just for my Nexus 5x with Android 7 it isn't working. I get the following error:

Permission denied
callbackWithError @ errors.js:31
fail @ sockets.udp.js:75
cordova.callbackFromNative @ cordova.js:295
processMessage @ cordova.js:1081
processMessages @ cordova.js:1104
pollOnce @ cordova.js:973
pollOnceFromOnlineEvent @ cordova.js:960

The error is thrown while I am trying to send a broadcast. This is how my code basically looks like:

function sendBroadcast(data) {
    chrome.sockets.udp.create(function (createInfo) {
        udpSocketId = createInfo.socketId;

        chrome.sockets.udp.setBroadcast(udpSocketId, false, function (result) {
            if (result < 0) {
                console.log("setBroadcast failed");
            }
        });

        chrome.sockets.udp.bind(udpSocketId, '0.0.0.0', udpPORT, function (result) {
            chrome.sockets.udp.send(udpSocketId, data, '255.255.255.255', udpPORT, function (result) {
                if (result < 0) {
                    console.log("sendBroadcast failed");
                } 
            });
        });
    });
}

As I said, for the other android systems this is working perfectly fine.
I checked the AndroidManifest.xml and the INTERNET permission param is set. Furthermore, I checked all permission in the android apps settings. All permissions are set on true.
Meanwhile, I started a listener, which receives other broadcasts. This confuses me, because it shows that the permission is set. Also, I am sure that no broadcasts are send, because my server doesn't receive any.

While debugging I found this:

F09 ChromeSocketsUdp557920677 {"message":"Permission denied","resultCode":-2}

Maybe this part contains some information for you guys.

I am not sure where the problem is coming from.

UDP socket not receiving multicast

I am using the plugin for UDP multicast.

This is my code,

chrome.sockets.udp.create({ bufferSize: MAX_MSG_LENGTH }, function(createInfo) //Create socket entry
{
self.serverSocket = createInfo.socketId;
chrome.sockets.udp.setBroadcast(self.serverSocket, true, function(result) {
if (result < 0) {
console.log("setBroadcast failed");
}
});
chrome.sockets.udp.setMulticastTimeToLive(self.serverSocket, TTL, function(result) {
if (result < 0) {
console.log("MULTICAST FAILED" + result);
} else {
chrome.sockets.udp.bind(self.serverSocket, "0.0.0.0", MCAST_PORT, function(result) {
if (result < 0) {
console.log("BIND FAILED" + result);
chrome.sockets.udp.close(self.serverSocket);
} else {
chrome.sockets.udp.joinGroup(self.serverSocket, MCAST_IP_ADDR, function(result) {
if (result < 0) {
console.log("Couldn't join Group!");
chrome.sockets.udp.close(self.serverSocket);
} else {
chrome.sockets.udp.onReceive.addListener(function(msg) {
console.log(msg.socketId);
}
}
};

I have set Android Permissions




I use cordova 10.0.0 and Framework7 for developing the hybrid app.

I receive a message from my local browser on the UDP.onReceive.addEventListener, but not from the other devices.

Could you help me if I am missing something? Should I add any more permissions?

cannot read property 'sockets' of undefined in ionic

this is my code:
chrome.sockets.udp.create({}, function(socketInfo) {
// The socket is created, now we can send some data
var socketId = socketInfo.socketId;
chrome.sockets.udp.send(socketId, arrayBuffer,
'127.0.0.1', 1337, function(sendInfo) {
console.log("sent " + sendInfo.bytesSent);
});
});

setBroadcast but nothing is received

Dear,

I have installed the 1.3.0 version of this plugin and setBroadcast TRUE in my code, but when I tried to send Broadcast message UDP using 255.255.255.255 or 0.0.0.0 or 192.168.1.255 or 192.168.255.255 I didn't receive on APP this return, so If I send directly to the IP of smartphone I can see the return. Somebody got the same problem? I'm putting the code bellow.

    chrome.sockets.udp.create(function(createInfo) {

        chrome.sockets.udp.setBroadcast(createInfo.socketId, true, function(result) {
            if (result === 0) {
                console.log("Broadcast Listening");
            }

        });

        chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 35000, function(result) {
            console.log(result);
        });
        

        chrome.sockets.udp.getInfo(createInfo.socketId, function(socketInfo) {
            console.log(socketInfo);
        });


        addReceiveListeners();
    });

beta status question

Hallo,

i see that this project is still "beta". Is it stable enought to be used in a productive environment on both platforms for a device companion app ?

`send()` with callback fails

On Cordova 5.0.0 with example code I get:

chrome.sockets.udp.send(socketId, buf, '127.0.0.1', 22137 /*, function (sendInfo) {
    console.log('sent ' + sendInfo.bytesSent);
}*/ );

I/chromium( 4850): [INFO:CONSOLE(307)] "Error in Error callbackId: ChromeSocketsUdp1732631474 : TypeError: Cannot read property 'message' of undefined", source: file:///android_asset/www/cordova.js (307)

It works ok if I comment out the callback.

Unhandled exception if no internet access is active

This issue is happens in the same situation like in the similar issue in cordova-plugin-chrome-apps-sockets-tcp:
MobileChromeApps/cordova-plugin-chrome-apps-sockets-tcp#31

On Android 7 (tested on Geotel A1) in case there is no internet connection on the device, app crashes because of the unhandled exception "java.nio.channels.UnresolvedAddressException".

For me it was solved by adding a corresponding exception handler to the void dequeueSend() method, like:

  void dequeueSend() {
...
    UdpSendPacket sendPacket = null;
    try {
...
    } catch (InterruptedException e) {
    } catch (IOException e) {
      sendPacket.callbackContext.error(buildErrorInfo(-2, e.getMessage()));
    } catch (java.nio.channels.UnresolvedAddressException e) {
      sendPacket.callbackContext.error(buildErrorInfo(-2, "Failed to resolve address"));
    }
  }

How to use this in Intel XDK?

I'm developing an app in the Intel XDK tool and I tried to add this plugin using the documentation from the intel's web page but it doesn't work

receive udp packet data field is null

My code is shown as below, I create udp socket, set broadcast, bind receiveListener,and then send my request packet ipRequest to my udpServer:

receiveListener(info) {
let self = this;
console.log('wifiStore Recv from socket: ' + JSON.stringify(info));
}

startSearch() {
let self = this;
self.resetWifi();
if(window.chrome) {
  let ipRequest = [{msgType: 'ipRequest'}];
  let ipRequestStr = JSON.stringify(ipRequest);
  chrome.sockets.udp.onReceiveError.addListener(self.receiveErrorListener.bind(this));
  chrome.sockets.udp.onReceive.addListener(self.receiveListener.bind(self));
  chrome.sockets.udp.create(function(createInfo) {
    self._socketId = createInfo.socketId;
    console.log('startSearch createInfo.socketId:' + self._socketId);
    chrome.sockets.udp.bind(createInfo.socketId, '0.0.0.0', 0, function(result) {
      console.log('startSearch bind result:' + result);
      chrome.sockets.udp.setBroadcast(createInfo.socketId, true, function(result) { 
        console.log('startSearch setBroadcast result:' + result);
        
        self._intervalId = setInterval(function() {
          let message = self.stringToArrayBuffer(ipRequestStr);
          chrome.sockets.udp.send(createInfo.socketId, message, '255.255.255.255', 8081, function(result) {
            if (result < 0) {
              console.log('startSearch fail: ' + result);
            } else {
              console.log('startSearch success ' + result);
            }
          });
        } ,1000);

      });
    });
  });
} else {
  console.log('startSearch not window.chrome');
}

}
And my udpServer receive the request, as the log shown below:
serverLog - recv [{"msgType":"ipRequest"}](25 bytes) from client 192.168.1.112:63912 serverLog - recv [{"msgType":"ipRequest"}](25 bytes) from client 192.168.1.112:63912 serverLog - recv [{"msgType":"ipRequest"}](25 bytes) from client 192.168.1.112:63912

And the udpServer send the answer packet to my request client, the answer code is shown as below:

 var serverSocket = dgram.createSocket('udp4');
 serverSocket.on('message', function(msg, rinfo){
logger.warn('recv %s(%d bytes) from client %s:%d', msg, msg.length, rinfo.address, rinfo.port);
var msgStr = String(msg);
var message = JSON.parse(msgStr);
for (var i = 0; i < message.length; i++) {
  if (message[i].msgType && message[i].msgType === 'ipRequest') {
    if (ackFlag){
      var ip = getIPAdress();
      var ipAck = [{msgType: 'ipAck', IP: ip}];
      var msg = JSON.stringify(ipAck); 
      logger.debug('ack to client');
      serverSocket.send(msg, 0, msg.length, rinfo.port, rinfo.address);
    }
  }
}    

});

And my request client receive the answer packet, but the data is null, as shown below:
Recv from socket: {"socketId":0,"data":{},"remoteAddress":"192.168.1.125","remotePort":8081} Recv from socket: {"socketId":0,"data":{},"remoteAddress":"192.168.1.125","remotePort":8081}

the data field is null, but my expected data is "var ipAck = [{msgType: 'ipAck', IP: ip}];"

Anyone who can show me why? Thanks very much!!!

By the way, the request client is a cordova app, and is tested on IPad

Setting TTL on Android has no effect

I have attempted to set the TTL to be higher than 1 but whatever I set it is always set at 1.

My research lead me to think this could be a java bug with having ipv4 and ipv6 on the system at the same time, which they suggest to fix with

        java.lang.System.setProperty("java.net.preferIPv4Stack", "true");
        java.lang.System.setProperty("java.net.preferIPv6Addresses", "false");

However this has no effect and the TTL remains at 1, no matter what I pass into setMulticastTimeToLive.

To make sure its not just an android bug I installing the Cling UDP demo app and that sets a TTL of 4, so it must be possible to have this work.

Many thanks for reading this.

iOS 14 UDP Sockets not working correctly

I currently use this Cordova plugin with Ionic V4. After the release of iOS 14 there is a glitchy behavior where the plugin does not always work. I have learned that turning WIFI on and off will sometimes cause the plugin to start receiving data once again. I feel this is an iOS14 issue but I need to try to fix. I would like to know if there is anything I can do to solve this issue from the plugin point of view.
I also have a reconnect mechanism where I will leave and close the socket in order to rejoin and this as well is not working correctly in iOS 14.

Versions

Cordova Version: 10.0.0
cordova-plugin-chrome-apps-common: 1.0.7
cordova-plugin-chrome-apps-iossocketscommon: 1.0.2
cordova-plugin-chrome-apps-sockets-udp: 1.3.0
Ionic Cli: 6.1.1

Source code


console.log('trying to create udp socket.');		
chrome.sockets.udp.create({}, function (socketInfo) {
			this.socketId = socketInfo.socketId;

			// this.socketId = this.socketId;
			console.log(this.socketId + ' bindip: ' + this.bindip + ' groupPort: ' + this.groupPort + ' groupIp: ' + this.groupIp);

			// Currently the discovery module use '239.0.0.123:55558' for multicast
			chrome.sockets.udp.bind(Number(this.socketId), String(this.bindip), parseInt(String(this.groupPort), 10), function (result) {
				console.log('Bind IF returns ' + result);
				if (result >= 0) {
					console.log('Joining Group');
					chrome.sockets.udp.joinGroup(this.socketId, this.groupIp, function (result1) {
						console.log('Joining Group returns ' + result1);
						if (result1 >= 0) {

							chrome.sockets.udp.setMulticastLoopbackMode(this.socketId, true, function (result2) {
								console.log('Loopback returns ' + result2);

							}.bind(this));
							chrome.sockets.udp.getInfo(this.socketId, function (info) {
								console.log('Socket Info: paused ? ' + info.paused);
								console.log('Socket Info: localAddress ' + info.localAddress);
								console.log('Socket Info: localPort ' + info.localPort);

							});
							chrome.sockets.udp.getSockets(function (infoarr) {
								infoarr.forEach(function (info) {
									console.log('Socket Info: Id ' + info.socketId);
									console.log('Socket Info: paused ? ' + info.paused);
									console.log('Socket Info: Persistense ? ' + info.persistent);
									console.log('Socket Info: localAddress ' + info.localAddress);
									console.log('Socket Info: localPort ' + info.localPort);
								});
							});
							console.log('Setup OnReceive Listener');
							chrome.sockets.udp.onReceive.addListener(this.receiveIncomingMulticastListener.bind(this));
							console.log('Setup OnReceiveError Listener');
							chrome.sockets.udp.onReceiveError.addListener(this.receiveErrorListener.bind(this));

							// hold the events till 'start' is called
							if (!doRecv) {
								chrome.sockets.udp.setPaused(this.socketId, true);
							} else {
								this.start();
							}
						}
					}.bind(this));
				}
			}.bind(this));
		}.bind(this));

XCODE Output:

2020-10-12 15:51:44.008119-0400 OEI[417:12700] trying to create udp socket.
2020-10-12 15:51:44.012282-0400 OEI[417:12700] 0 bindip: 0.0.0.0 groupPort: 55558 groupIp: 239.0.0.123
2020-10-12 15:51:44.015802-0400 OEI[417:12700] Bind IF returns 0
2020-10-12 15:51:44.016178-0400 OEI[417:12700] Joining Group
2020-10-12 15:51:44.028471-0400 OEI[417:12700] Joining Group returns 0
2020-10-12 15:51:44.032259-0400 OEI[417:12700] Setup OnReceive Listener
2020-10-12 15:51:44.033012-0400 OEI[417:12700] Setup OnReceiveError Listener
2020-10-12 15:51:44.039017-0400 OEI[417:12700] Loopback returns 0
2020-10-12 15:51:44.040270-0400 OEI[417:12700] Socket Info: paused ? false
2020-10-12 15:51:44.040992-0400 OEI[417:12700] Socket Info: localAddress 0.0.0.0
2020-10-12 15:51:44.041656-0400 OEI[417:12700] Socket Info: localPort 55558
2020-10-12 15:51:44.042574-0400 OEI[417:12700] Socket Info: Id 0
2020-10-12 15:51:44.043082-0400 OEI[417:12700] Socket Info: paused ? false
2020-10-12 15:51:44.043643-0400 OEI[417:12700] Socket Info: Persistense ? false
2020-10-12 15:51:44.044149-0400 OEI[417:12700] Socket Info: localAddress 0.0.0.0
2020-10-12 15:51:44.044695-0400 OEI[417:12700] Socket Info: localPort 55558

Cannot send UDP packet

Hi,
I am trying to send a UDP packet from my Android device. My code looks as follows:

chrome.sockets.udp.create({}, function(createInfo) {
    const socketId = createInfo.socketId;
    const arrayBuffer = new ArrayBuffer(2);
    arrayBuffer[0] = 0x01;
    arrayBuffer[1] = 0xff;
    console.log('socketId: ' + createInfo.socketId);
    chrome.sockets.udp.send(socketId, arrayBuffer,
      '127.0.0.1', 1337, function(sendInfo) { 
        console.log('sent ' + sendInfo.bytesSent); // this log never happens
      });
});

Why isn't it sending anything?

  • socketId is 0
  • Do I need to set any Android permissions? In AndroidManifest.xml I have
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

I am using

  • cordova version 8.1.2
  • ionic version 3.9.2
  • npm version 6.4.1

Multicast receive

I'm using joinGroup 224.0.0.x on emulator and receiving correctly multicasts sent from my phone, but the other way around doesn't work.
I read that a MulticastLock would be needed, but I see no such feature available in this package, making the joinGroup feature a bit useless as it is.
(or did I miss something? is that data outdated?)

Plugin build failure

I have encountered a build error when I try to compile the project through cordova build command for ios. The following is the error message:

    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketSSLProtocolVersionMax in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.streamContext in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.sslContext in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncWritePacket.timeout in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.timeout in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.startOffset in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_CLASS_$_GCDAsyncSocket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_METACLASS_$_GCDAsyncSocket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_CLASS_$_GCDAsyncSpecialPacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_METACLASS_$_GCDAsyncSpecialPacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_CLASS_$_GCDAsyncWritePacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_METACLASS_$_GCDAsyncWritePacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_CLASS_$_GCDAsyncReadPacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_METACLASS_$_GCDAsyncReadPacket in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSpecialPacket.tlsSettings in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.flags in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketSSLCipherSuites in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocketPreBuffer.writePointer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocketPreBuffer.readPointer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.bufferOwner in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.connectTimer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.writeTimer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.readTimer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncWritePacket.buffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.buffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.preBuffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocketPreBuffer.preBuffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_CLASS_$_GCDAsyncSocketPreBuffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_METACLASS_$_GCDAsyncSocketPreBuffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.sslPreBuffer in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketException in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketErrorDomain in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketSSLProtocolVersionMin in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.term in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.writeStream in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.readStream in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.maxLength in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.originalBufferLength in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.sslWriteCachedLength in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.readLength in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.config in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncWritePacket.tag in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.tag in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocketPreBuffer.preBufferSize in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.socketQueue in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.writeQueue in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.delegateQueue in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.readQueue in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.currentWrite in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.delegate in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncWritePacket.bytesDone in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncReadPacket.bytesDone in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketQueueName in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _GCDAsyncSocketThreadName in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.socketFDBytesAvailable in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.sslErrCode in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.writeSource in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.readSource in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.accept6Source in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.accept4Source in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.currentRead in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.userData in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.socket6FD in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.socket4FD in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.connectInterface6 in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
duplicate symbol _OBJC_IVAR_$_GCDAsyncSocket.connectInterface4 in:
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-67DCE4C61D8F3A6.o
    /Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/MaxusIOT.build/Debug-iphonesimulator/MaxusIOT.build/Objects-normal/i386/GCDAsyncSocket-E4D8713802C61477.o
ld: 67 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
	Ld build/emulator/MaxusIOT.app/MaxusIOT normal i386
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/cordova/build-debug.xcconfig,-project,MaxusIOT.xcodeproj,ARCHS=i386,-target,MaxusIOT,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/feizheng/Desktop/Maxustech/Cordova_App/MaxusIOT/platforms/ios/build/sharedpch

My toolkit version shown as follow:

[email protected]
[email protected]

Can anyone help?? Thank in advance.

Cannot receive multiple parallel packets by discovery broadcast

Hi there,

I've a scenario where I have to do a discovery broadcast to a dozens of devices (100 and more). Unfortunatley, the plugin seems to be in trouble with receiving the correct count of "answer"-packets. One-half of the packets is getting lost. The problem occurs on android, I did not test this behaviour on iPhone so far.
Are there any suggestions to deal with? Is this plugin not recommend for such scenarios?

Thank you in advance for any reply!

ionic2 working example

Could someone tell me how to use this plugin within the ionic2 framework? The provided example did not help me to understand how one would implement it in ionic2.

iOS receive doesn't work

I'm having problems with receiving UDP sockets on iOS.
I create a socket on iPhone, send a message, the other side receives it and sends a response to the phone's address (IP, port), but the callback registered with onReceive doesn't fire.
The same code works without problems on Android.
I tried setting the socket as persistent, that didn't help.
Is there anything extra that has to be done for this to work?

Internet required?

Possibly stupid question, but I'm mostly wondering if this plugin provides the ability to leverage other networking technologies to send data in a p2p network (with no internet connection).

"send" is no response in ionic

In my ionic project, it can't work normally.When I call this method, he didn't give me any return values.

setInterval(function () {
var buffer = new ArrayBuffer(12);
var x = new Int32Array(buffer);
x[1] = 1234;
var slice = buffer.slice(4);
var y = new Int32Array(slice);
console.log(x[1]);
console.log(y[0]);
x[1] = 6789;
alert($scope.socketId);
chrome.sockets.udp.send($scope.socketId, buffer,
'192.168.0.100', 8888, function(sendInfo) {
alert("sent " + sendInfo.bytesSent);
});
}, 5000);

Unable to use it with Phonegap:

Get following error:

Error: exec proxy not found for :: ChromeSocketsUdp :: registerReceiveEvents
errors.js:30 Uncaught TypeError: Cannot read property 'message' of undefined
at callbackWithError (errors.js:30)
at fail (sockets.udp.js:203)
at module.exports (cordova.js:992)
at Channel.registerReceiveEvents (sockets.udp.js:205)
at Channel.fire (cordova.js:777)
at cordova.js:1143
at Channel.f (cordova.js:649)
at Channel.fire (cordova.js:777)
at cordova.js:1130
at onScriptLoadingComplete (cordova.js:1567)

Ionic with UDP client with Cordova Plugin

I used the following command to add the plugin to my project:
https://github.com/MobileChromeApps/cordova-plugin-chrome-apps-sockets-udp

Then I created a controller with a function below:

app.controller('ctrl3', function ($scope) {
  $scope.udpClient = function () {
    console.log("success");
    var data, addr, port;
    port = 5000;
    addr = "192.168.10.255";
    data = "hello";
    chrome.sockets.udp.create({}, function(socketInfo) {
      var socketId = socketInfo.socketId;
      chrome.sockets.udp.send(socketId, data,
        addr, port, function(sendInfo) {
          alert("sent " + sendInfo.bytesSent);
        });
    });
    $scope.Message = "Button Clicked";
  };
});

And I get an error:

Cannot read property 'udp' of undefined
at Scope.$scope.udpClient
Am I doing something wrong?

Cordova CLI: 6.3.1
Ionic Framework: 1.3.1
Ionic CLI: 1.7.16
OS: Windows 7 Pro
Node: 4.4.7

Below is the whole code for app.js

var app = angular.module('ctrl1', ['ionic']);

app.run(function ($ionicPlatform) {
$ionicPlatform.ready(function () {
if (window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
//cordova.plugins.
//window.plugins.cordova-plugin-chrome-apps-sockets-udp.create()

  // Don't remove this line unless you know what you are doing. It stops the viewport
  // from snapping when text inputs are focused. Ionic handles this internally for
  // a much nicer keyboard experience.
  cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
  StatusBar.styleDefault();
}

console.log("Hello");
});
});

app.controller('ctrl2', function ($scope) {
$scope.dateToday = new Date();
$scope.x = 5;
$scope.y = 6;

});

app.controller('ctrl3', function ($scope) {
$scope.udpClient = function () {
console.log("success");

var data, addr, port;
port = 5000;
addr = "192.168.10.255";
data = "hello";


chrome.sockets.udp.create({}, function(socketInfo) {
  var socketId = socketInfo.socketId;
  chrome.sockets.udp.send(socketId, data,
    addr, port, function(sendInfo) {
      alert("sent " + sendInfo.bytesSent);
    });
});


$scope.Message = "Button Clicked";
};
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.