From a54e87167eb99a13133524c5aacc65bb905f62c5 Mon Sep 17 00:00:00 2001 From: xuemh Date: Mon, 6 Aug 2018 09:18:32 +0800 Subject: [PATCH] build 489 --- Ifish/Info.plist | 2 +- .../leftcontrollers/ConnectHotpotViewController.m | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Ifish/Info.plist b/Ifish/Info.plist index 7a7fc2c..35a54e9 100644 --- a/Ifish/Info.plist +++ b/Ifish/Info.plist @@ -70,7 +70,7 @@ CFBundleVersion - 488 + 489 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/Ifish/controllers/leftcontrollers/ConnectHotpotViewController.m b/Ifish/controllers/leftcontrollers/ConnectHotpotViewController.m index 921e7ac..61fa72e 100644 --- a/Ifish/controllers/leftcontrollers/ConnectHotpotViewController.m +++ b/Ifish/controllers/leftcontrollers/ConnectHotpotViewController.m @@ -125,6 +125,15 @@ - (void)sendToDeviceWithSSIDName:(NSString *)name andSSIDPWD:(NSString *)pwd { self.socket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()]; + NSError *error; + [self.socket bindToPort:9090 error:&error]; + [self.socket enableBroadcast:YES error:&error]; + if (error) { + [self.view makeToast:error.localizedDescription]; + } else { + [self.socket beginReceiving:&error]; + + } [self.socket sendData:[self updmessageData:name ssidPwd:pwd] toHost:@"192.168.4.1" port:333 withTimeout:-1 tag:0]; }