Merge remote-tracking branch 'origin/develop_01'

# Conflicts:
#	.DS_Store
This commit is contained in:
kai60
2020-07-16 14:33:53 +08:00
176 changed files with 6151 additions and 1364 deletions
+253 -125
View File
@@ -2175,19 +2175,6 @@
88F23F2D1EA9D18700E4D298 /* live_label_v.png in Resources */ = {isa = PBXBuildFile; fileRef = 88F23F211EA9D18700E4D298 /* live_label_v.png */; };
88F23F2E1EA9D18700E4D298 /* live_label_v@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88F23F221EA9D18700E4D298 /* live_label_v@2x.png */; };
88F23F2F1EA9D18700E4D298 /* live_label_v@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 88F23F231EA9D18700E4D298 /* live_label_v@3x.png */; };
88F5EE4C1D48CA2800CC7CAF /* ESP_ByteUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECC11D48CA2800CC7CAF /* ESP_ByteUtil.m */; };
88F5EE4D1D48CA2800CC7CAF /* ESP_CRC8.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECC31D48CA2800CC7CAF /* ESP_CRC8.m */; };
88F5EE4E1D48CA2800CC7CAF /* ESP_NetUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECC51D48CA2800CC7CAF /* ESP_NetUtil.m */; };
88F5EE4F1D48CA2800CC7CAF /* IPAddress.c in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECC61D48CA2800CC7CAF /* IPAddress.c */; };
88F5EE501D48CA2800CC7CAF /* ESPTouchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECCB1D48CA2800CC7CAF /* ESPTouchResult.m */; };
88F5EE511D48CA2800CC7CAF /* ESPTouchTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECCD1D48CA2800CC7CAF /* ESPTouchTask.m */; };
88F5EE521D48CA2800CC7CAF /* ESPTouchTaskParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECCF1D48CA2800CC7CAF /* ESPTouchTaskParameter.m */; };
88F5EE531D48CA2800CC7CAF /* ESPUDPSocketClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECD11D48CA2800CC7CAF /* ESPUDPSocketClient.m */; };
88F5EE541D48CA2800CC7CAF /* ESPUDPSocketServer.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECD31D48CA2800CC7CAF /* ESPUDPSocketServer.m */; };
88F5EE551D48CA2800CC7CAF /* ESPDataCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECD61D48CA2800CC7CAF /* ESPDataCode.m */; };
88F5EE561D48CA2800CC7CAF /* ESPDatumCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECD81D48CA2800CC7CAF /* ESPDatumCode.m */; };
88F5EE571D48CA2800CC7CAF /* ESPGuideCode.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECDA1D48CA2800CC7CAF /* ESPGuideCode.m */; };
88F5EE581D48CA2800CC7CAF /* ESPTouchGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5ECDC1D48CA2800CC7CAF /* ESPTouchGenerator.m */; };
88F5EFA91D48D08100CC7CAF /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5EEEC1D48D08000CC7CAF /* AFHTTPRequestOperation.m */; };
88F5EFAA1D48D08100CC7CAF /* AFHTTPRequestOperationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5EEEE1D48D08000CC7CAF /* AFHTTPRequestOperationManager.m */; };
88F5EFAB1D48D08100CC7CAF /* AFHTTPSessionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5EEF01D48D08000CC7CAF /* AFHTTPSessionManager.m */; };
@@ -2234,6 +2221,8 @@
88F5EFD81D48D08100CC7CAF /* MMVectorImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5EF591D48D08100CC7CAF /* MMVectorImage.m */; };
88F5EFD91D48D08100CC7CAF /* MyControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F5EF5C1D48D08100CC7CAF /* MyControl.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
88F740C01ECC28E800876AED /* ShopAddGoodsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 88F740BF1ECC28E800876AED /* ShopAddGoodsViewController.m */; };
C017B1E2245ED2D4003151DF /* UIImage+WaterMark.h in Headers */ = {isa = PBXBuildFile; fileRef = C017B1E0245ED2D3003151DF /* UIImage+WaterMark.h */; };
C017B1E3245ED2D4003151DF /* UIImage+WaterMark.m in Sources */ = {isa = PBXBuildFile; fileRef = C017B1E1245ED2D4003151DF /* UIImage+WaterMark.m */; };
C024B79E2379668B00509424 /* NSArray+AvoidCrash.m in Sources */ = {isa = PBXBuildFile; fileRef = C024B78A2379668B00509424 /* NSArray+AvoidCrash.m */; };
C024B79F2379668B00509424 /* AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B78B2379668B00509424 /* AvoidCrash.h */; };
C024B7A02379668B00509424 /* NSString+AvoidCrash.m in Sources */ = {isa = PBXBuildFile; fileRef = C024B78C2379668B00509424 /* NSString+AvoidCrash.m */; };
@@ -2254,6 +2243,48 @@
C024B7AF2379668B00509424 /* NSMutableString+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79B2379668B00509424 /* NSMutableString+AvoidCrash.h */; };
C024B7B02379668B00509424 /* NSMutableAttributedString+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79C2379668B00509424 /* NSMutableAttributedString+AvoidCrash.h */; };
C024B7B12379668B00509424 /* NSMutableArray+AvoidCrash.h in Headers */ = {isa = PBXBuildFile; fileRef = C024B79D2379668B00509424 /* NSMutableArray+AvoidCrash.h */; };
C02ED596249E3B7300CAC37D /* InfoByImageViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C02ED594249E3B7300CAC37D /* InfoByImageViewController.h */; };
C02ED597249E3B7300CAC37D /* InfoByImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C02ED595249E3B7300CAC37D /* InfoByImageViewController.m */; };
C0837A57244FF5510034FEC5 /* EGOCache.m in Sources */ = {isa = PBXBuildFile; fileRef = C0837A55244FF5500034FEC5 /* EGOCache.m */; };
C0837A58244FF5510034FEC5 /* EGOCache.h in Headers */ = {isa = PBXBuildFile; fileRef = C0837A56244FF5500034FEC5 /* EGOCache.h */; };
C0873EE12491060000D47D34 /* ESPUDPSocketClient.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EBE249105FF00D47D34 /* ESPUDPSocketClient.h */; };
C0873EE22491060000D47D34 /* ESPUDPSocketServer.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EBF249105FF00D47D34 /* ESPUDPSocketServer.m */; };
C0873EE32491060000D47D34 /* ESPUDPSocketClient.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EC0249105FF00D47D34 /* ESPUDPSocketClient.m */; };
C0873EE42491060000D47D34 /* ESPUDPSocketServer.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EC1249105FF00D47D34 /* ESPUDPSocketServer.h */; };
C0873EE52491060000D47D34 /* ESPGuideCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EC3249105FF00D47D34 /* ESPGuideCode.m */; };
C0873EE62491060000D47D34 /* ESPTouchGenerator.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EC4249105FF00D47D34 /* ESPTouchGenerator.m */; };
C0873EE72491060000D47D34 /* ESPDataCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EC5249105FF00D47D34 /* ESPDataCode.h */; };
C0873EE82491060000D47D34 /* ESPDatumCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EC6249105FF00D47D34 /* ESPDatumCode.h */; };
C0873EE92491060000D47D34 /* ESPGuideCode.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EC7249105FF00D47D34 /* ESPGuideCode.h */; };
C0873EEA2491060000D47D34 /* ESPDataCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EC8249105FF00D47D34 /* ESPDataCode.m */; };
C0873EEB2491060000D47D34 /* ESPTouchGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EC9249105FF00D47D34 /* ESPTouchGenerator.h */; };
C0873EEC2491060000D47D34 /* ESPDatumCode.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ECA249105FF00D47D34 /* ESPDatumCode.m */; };
C0873EED2491060000D47D34 /* ESPTools.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ECC249105FF00D47D34 /* ESPTools.m */; };
C0873EEE2491060000D47D34 /* ESP_NetUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ECD249105FF00D47D34 /* ESP_NetUtil.m */; };
C0873EEF2491060000D47D34 /* ESP_ByteUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ECE249105FF00D47D34 /* ESP_ByteUtil.m */; };
C0873EF02491060000D47D34 /* ESP_WifiUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ECF249105FF00D47D34 /* ESP_WifiUtil.m */; };
C0873EF12491060000D47D34 /* ESP_CRC8.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ED0249105FF00D47D34 /* ESP_CRC8.m */; };
C0873EF22491060000D47D34 /* ESPVersionMacro.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED1249105FF00D47D34 /* ESPVersionMacro.h */; };
C0873EF32491060000D47D34 /* ESPAES.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED2249105FF00D47D34 /* ESPAES.h */; };
C0873EF42491060000D47D34 /* ESP_NetUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED3249105FF00D47D34 /* ESP_NetUtil.h */; };
C0873EF52491060000D47D34 /* ESP_ByteUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED4249105FF00D47D34 /* ESP_ByteUtil.h */; };
C0873EF62491060000D47D34 /* ESPTools.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED5249105FF00D47D34 /* ESPTools.h */; };
C0873EF72491060000D47D34 /* ESP_CRC8.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED6249105FF00D47D34 /* ESP_CRC8.h */; };
C0873EF82491060000D47D34 /* ESP_WifiUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873ED7249105FF00D47D34 /* ESP_WifiUtil.h */; };
C0873EF92491060000D47D34 /* ESPAES.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873ED8249105FF00D47D34 /* ESPAES.m */; };
C0873EFA2491060000D47D34 /* ESPTouchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EDA2491060000D47D34 /* ESPTouchResult.m */; };
C0873EFB2491060000D47D34 /* ESPTouchTaskParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EDB2491060000D47D34 /* ESPTouchTaskParameter.h */; };
C0873EFC2491060000D47D34 /* ESPTouchTask.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EDC2491060000D47D34 /* ESPTouchTask.h */; };
C0873EFD2491060000D47D34 /* ESPTouchResult.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EDD2491060000D47D34 /* ESPTouchResult.h */; };
C0873EFE2491060000D47D34 /* ESPTouchDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = C0873EDE2491060000D47D34 /* ESPTouchDelegate.h */; };
C0873EFF2491060000D47D34 /* ESPTouchTaskParameter.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EDF2491060000D47D34 /* ESPTouchTaskParameter.m */; };
C0873F002491060000D47D34 /* ESPTouchTask.m in Sources */ = {isa = PBXBuildFile; fileRef = C0873EE02491060000D47D34 /* ESPTouchTask.m */; };
C0B2F541244C6FE3001079AA /* PetStoresViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B2F53E244C6FE3001079AA /* PetStoresViewController.h */; };
C0B2F542244C6FE3001079AA /* PetStoresViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B2F53F244C6FE3001079AA /* PetStoresViewController.m */; };
C0B2F543244C6FE3001079AA /* PetStoresViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0B2F540244C6FE3001079AA /* PetStoresViewController.xib */; };
C0B2F55D244D5577001079AA /* StoreNameView.h in Headers */ = {isa = PBXBuildFile; fileRef = C0B2F55B244D5577001079AA /* StoreNameView.h */; };
C0B2F55E244D5577001079AA /* StoreNameView.m in Sources */ = {isa = PBXBuildFile; fileRef = C0B2F55C244D5577001079AA /* StoreNameView.m */; };
C0B2F560244D568E001079AA /* StoreNameView.xib in Resources */ = {isa = PBXBuildFile; fileRef = C0B2F55F244D568E001079AA /* StoreNameView.xib */; };
C0E746D5239E4A7D001BCD6D /* wechatlogin.png in Resources */ = {isa = PBXBuildFile; fileRef = C0E746D4239E4A7C001BCD6D /* wechatlogin.png */; };
C0E7D6C023A1D11500256A10 /* WXApiRequestHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = C0E7D6BC23A1D11200256A10 /* WXApiRequestHandler.h */; };
C0E7D6C123A1D11500256A10 /* WXApiManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C0E7D6BD23A1D11200256A10 /* WXApiManager.h */; };
@@ -2305,6 +2336,8 @@
C0EA8A3023AF74F4003DC53B /* UIButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = C0EA8A0F23AF74F3003DC53B /* UIButton+WebCache.m */; };
C0EA8A3123AF74F4003DC53B /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = C0EA8A1023AF74F3003DC53B /* UIImage+GIF.h */; };
C0F0400C23756F3C00B61D3B /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0F0400B23756F3C00B61D3B /* ExternalAccessory.framework */; };
C0F6E1C0243B0A840071ECB9 /* xuanduo3fModel.h in Headers */ = {isa = PBXBuildFile; fileRef = C0F6E1BE243B0A840071ECB9 /* xuanduo3fModel.h */; };
C0F6E1C1243B0A840071ECB9 /* xuanduo3fModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C0F6E1BF243B0A840071ECB9 /* xuanduo3fModel.m */; };
CB0F4E8622951A130091C76D /* SVRadialGradientLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = CB0F4E7B22951A130091C76D /* SVRadialGradientLayer.m */; };
CB0F4E8722951A130091C76D /* SVIndefiniteAnimatedView.h in Headers */ = {isa = PBXBuildFile; fileRef = CB0F4E7C22951A130091C76D /* SVIndefiniteAnimatedView.h */; };
CB0F4E8822951A130091C76D /* SVProgressHUD.h in Headers */ = {isa = PBXBuildFile; fileRef = CB0F4E7D22951A130091C76D /* SVProgressHUD.h */; };
@@ -5549,33 +5582,6 @@
88F23F211EA9D18700E4D298 /* live_label_v.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = live_label_v.png; sourceTree = "<group>"; };
88F23F221EA9D18700E4D298 /* live_label_v@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "live_label_v@2x.png"; sourceTree = "<group>"; };
88F23F231EA9D18700E4D298 /* live_label_v@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "live_label_v@3x.png"; sourceTree = "<group>"; };
88F5ECC01D48CA2800CC7CAF /* ESP_ByteUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_ByteUtil.h; sourceTree = "<group>"; };
88F5ECC11D48CA2800CC7CAF /* ESP_ByteUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_ByteUtil.m; sourceTree = "<group>"; };
88F5ECC21D48CA2800CC7CAF /* ESP_CRC8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_CRC8.h; sourceTree = "<group>"; };
88F5ECC31D48CA2800CC7CAF /* ESP_CRC8.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_CRC8.m; sourceTree = "<group>"; };
88F5ECC41D48CA2800CC7CAF /* ESP_NetUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_NetUtil.h; sourceTree = "<group>"; };
88F5ECC51D48CA2800CC7CAF /* ESP_NetUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_NetUtil.m; sourceTree = "<group>"; };
88F5ECC61D48CA2800CC7CAF /* IPAddress.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = IPAddress.c; sourceTree = "<group>"; };
88F5ECC71D48CA2800CC7CAF /* IPAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IPAddress.h; sourceTree = "<group>"; };
88F5ECC91D48CA2800CC7CAF /* ESPTouchDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchDelegate.h; sourceTree = "<group>"; };
88F5ECCA1D48CA2800CC7CAF /* ESPTouchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchResult.h; sourceTree = "<group>"; };
88F5ECCB1D48CA2800CC7CAF /* ESPTouchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchResult.m; sourceTree = "<group>"; };
88F5ECCC1D48CA2800CC7CAF /* ESPTouchTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchTask.h; sourceTree = "<group>"; };
88F5ECCD1D48CA2800CC7CAF /* ESPTouchTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchTask.m; sourceTree = "<group>"; };
88F5ECCE1D48CA2800CC7CAF /* ESPTouchTaskParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchTaskParameter.h; sourceTree = "<group>"; };
88F5ECCF1D48CA2800CC7CAF /* ESPTouchTaskParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchTaskParameter.m; sourceTree = "<group>"; };
88F5ECD01D48CA2800CC7CAF /* ESPUDPSocketClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPUDPSocketClient.h; sourceTree = "<group>"; };
88F5ECD11D48CA2800CC7CAF /* ESPUDPSocketClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPUDPSocketClient.m; sourceTree = "<group>"; };
88F5ECD21D48CA2800CC7CAF /* ESPUDPSocketServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPUDPSocketServer.h; sourceTree = "<group>"; };
88F5ECD31D48CA2800CC7CAF /* ESPUDPSocketServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPUDPSocketServer.m; sourceTree = "<group>"; };
88F5ECD51D48CA2800CC7CAF /* ESPDataCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPDataCode.h; sourceTree = "<group>"; };
88F5ECD61D48CA2800CC7CAF /* ESPDataCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPDataCode.m; sourceTree = "<group>"; };
88F5ECD71D48CA2800CC7CAF /* ESPDatumCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPDatumCode.h; sourceTree = "<group>"; };
88F5ECD81D48CA2800CC7CAF /* ESPDatumCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPDatumCode.m; sourceTree = "<group>"; };
88F5ECD91D48CA2800CC7CAF /* ESPGuideCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPGuideCode.h; sourceTree = "<group>"; };
88F5ECDA1D48CA2800CC7CAF /* ESPGuideCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPGuideCode.m; sourceTree = "<group>"; };
88F5ECDB1D48CA2800CC7CAF /* ESPTouchGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchGenerator.h; sourceTree = "<group>"; };
88F5ECDC1D48CA2800CC7CAF /* ESPTouchGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchGenerator.m; sourceTree = "<group>"; };
88F5EEEB1D48D08000CC7CAF /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; };
88F5EEEC1D48D08000CC7CAF /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; };
88F5EEED1D48D08000CC7CAF /* AFHTTPRequestOperationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperationManager.h; sourceTree = "<group>"; };
@@ -5674,6 +5680,8 @@
88F5EF5C1D48D08100CC7CAF /* MyControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyControl.m; sourceTree = "<group>"; };
88F740BE1ECC28E800876AED /* ShopAddGoodsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopAddGoodsViewController.h; sourceTree = "<group>"; };
88F740BF1ECC28E800876AED /* ShopAddGoodsViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopAddGoodsViewController.m; sourceTree = "<group>"; };
C017B1E0245ED2D3003151DF /* UIImage+WaterMark.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+WaterMark.h"; sourceTree = "<group>"; };
C017B1E1245ED2D4003151DF /* UIImage+WaterMark.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+WaterMark.m"; sourceTree = "<group>"; };
C024B78A2379668B00509424 /* NSArray+AvoidCrash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSArray+AvoidCrash.m"; sourceTree = "<group>"; };
C024B78B2379668B00509424 /* AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AvoidCrash.h; sourceTree = "<group>"; };
C024B78C2379668B00509424 /* NSString+AvoidCrash.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+AvoidCrash.m"; sourceTree = "<group>"; };
@@ -5694,6 +5702,48 @@
C024B79B2379668B00509424 /* NSMutableString+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableString+AvoidCrash.h"; sourceTree = "<group>"; };
C024B79C2379668B00509424 /* NSMutableAttributedString+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableAttributedString+AvoidCrash.h"; sourceTree = "<group>"; };
C024B79D2379668B00509424 /* NSMutableArray+AvoidCrash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+AvoidCrash.h"; sourceTree = "<group>"; };
C02ED594249E3B7300CAC37D /* InfoByImageViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InfoByImageViewController.h; sourceTree = "<group>"; };
C02ED595249E3B7300CAC37D /* InfoByImageViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InfoByImageViewController.m; sourceTree = "<group>"; };
C0837A55244FF5500034FEC5 /* EGOCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EGOCache.m; sourceTree = "<group>"; };
C0837A56244FF5500034FEC5 /* EGOCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EGOCache.h; sourceTree = "<group>"; };
C0873EBE249105FF00D47D34 /* ESPUDPSocketClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPUDPSocketClient.h; sourceTree = "<group>"; };
C0873EBF249105FF00D47D34 /* ESPUDPSocketServer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPUDPSocketServer.m; sourceTree = "<group>"; };
C0873EC0249105FF00D47D34 /* ESPUDPSocketClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPUDPSocketClient.m; sourceTree = "<group>"; };
C0873EC1249105FF00D47D34 /* ESPUDPSocketServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPUDPSocketServer.h; sourceTree = "<group>"; };
C0873EC3249105FF00D47D34 /* ESPGuideCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPGuideCode.m; sourceTree = "<group>"; };
C0873EC4249105FF00D47D34 /* ESPTouchGenerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchGenerator.m; sourceTree = "<group>"; };
C0873EC5249105FF00D47D34 /* ESPDataCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPDataCode.h; sourceTree = "<group>"; };
C0873EC6249105FF00D47D34 /* ESPDatumCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPDatumCode.h; sourceTree = "<group>"; };
C0873EC7249105FF00D47D34 /* ESPGuideCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPGuideCode.h; sourceTree = "<group>"; };
C0873EC8249105FF00D47D34 /* ESPDataCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPDataCode.m; sourceTree = "<group>"; };
C0873EC9249105FF00D47D34 /* ESPTouchGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchGenerator.h; sourceTree = "<group>"; };
C0873ECA249105FF00D47D34 /* ESPDatumCode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPDatumCode.m; sourceTree = "<group>"; };
C0873ECC249105FF00D47D34 /* ESPTools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTools.m; sourceTree = "<group>"; };
C0873ECD249105FF00D47D34 /* ESP_NetUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_NetUtil.m; sourceTree = "<group>"; };
C0873ECE249105FF00D47D34 /* ESP_ByteUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_ByteUtil.m; sourceTree = "<group>"; };
C0873ECF249105FF00D47D34 /* ESP_WifiUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_WifiUtil.m; sourceTree = "<group>"; };
C0873ED0249105FF00D47D34 /* ESP_CRC8.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESP_CRC8.m; sourceTree = "<group>"; };
C0873ED1249105FF00D47D34 /* ESPVersionMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPVersionMacro.h; sourceTree = "<group>"; };
C0873ED2249105FF00D47D34 /* ESPAES.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPAES.h; sourceTree = "<group>"; };
C0873ED3249105FF00D47D34 /* ESP_NetUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_NetUtil.h; sourceTree = "<group>"; };
C0873ED4249105FF00D47D34 /* ESP_ByteUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_ByteUtil.h; sourceTree = "<group>"; };
C0873ED5249105FF00D47D34 /* ESPTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTools.h; sourceTree = "<group>"; };
C0873ED6249105FF00D47D34 /* ESP_CRC8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_CRC8.h; sourceTree = "<group>"; };
C0873ED7249105FF00D47D34 /* ESP_WifiUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESP_WifiUtil.h; sourceTree = "<group>"; };
C0873ED8249105FF00D47D34 /* ESPAES.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPAES.m; sourceTree = "<group>"; };
C0873EDA2491060000D47D34 /* ESPTouchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchResult.m; sourceTree = "<group>"; };
C0873EDB2491060000D47D34 /* ESPTouchTaskParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchTaskParameter.h; sourceTree = "<group>"; };
C0873EDC2491060000D47D34 /* ESPTouchTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchTask.h; sourceTree = "<group>"; };
C0873EDD2491060000D47D34 /* ESPTouchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchResult.h; sourceTree = "<group>"; };
C0873EDE2491060000D47D34 /* ESPTouchDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ESPTouchDelegate.h; sourceTree = "<group>"; };
C0873EDF2491060000D47D34 /* ESPTouchTaskParameter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchTaskParameter.m; sourceTree = "<group>"; };
C0873EE02491060000D47D34 /* ESPTouchTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ESPTouchTask.m; sourceTree = "<group>"; };
C0B2F53E244C6FE3001079AA /* PetStoresViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PetStoresViewController.h; sourceTree = "<group>"; };
C0B2F53F244C6FE3001079AA /* PetStoresViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PetStoresViewController.m; sourceTree = "<group>"; };
C0B2F540244C6FE3001079AA /* PetStoresViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PetStoresViewController.xib; sourceTree = "<group>"; };
C0B2F55B244D5577001079AA /* StoreNameView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StoreNameView.h; sourceTree = "<group>"; };
C0B2F55C244D5577001079AA /* StoreNameView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StoreNameView.m; sourceTree = "<group>"; };
C0B2F55F244D568E001079AA /* StoreNameView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = StoreNameView.xib; sourceTree = "<group>"; };
C0E746D4239E4A7C001BCD6D /* wechatlogin.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wechatlogin.png; sourceTree = "<group>"; };
C0E7D6BC23A1D11200256A10 /* WXApiRequestHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiRequestHandler.h; sourceTree = "<group>"; };
C0E7D6BD23A1D11200256A10 /* WXApiManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXApiManager.h; sourceTree = "<group>"; };
@@ -5745,6 +5795,8 @@
C0EA8A0F23AF74F3003DC53B /* UIButton+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+WebCache.m"; sourceTree = "<group>"; };
C0EA8A1023AF74F3003DC53B /* UIImage+GIF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+GIF.h"; sourceTree = "<group>"; };
C0F0400B23756F3C00B61D3B /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; };
C0F6E1BE243B0A840071ECB9 /* xuanduo3fModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = xuanduo3fModel.h; sourceTree = "<group>"; };
C0F6E1BF243B0A840071ECB9 /* xuanduo3fModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = xuanduo3fModel.m; sourceTree = "<group>"; };
CB0F4E7B22951A130091C76D /* SVRadialGradientLayer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SVRadialGradientLayer.m; sourceTree = "<group>"; };
CB0F4E7C22951A130091C76D /* SVIndefiniteAnimatedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVIndefiniteAnimatedView.h; sourceTree = "<group>"; };
CB0F4E7D22951A130091C76D /* SVProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SVProgressHUD.h; sourceTree = "<group>"; };
@@ -9263,6 +9315,7 @@
883E76461D48A5E50030E075 /* controllers */ = {
isa = PBXGroup;
children = (
C0B2F53D244C6FAF001079AA /* pets */,
CB4820462334B37100A50C92 /* ConnectAauariumVC */,
CBA615F6228E526C00ED380D /* message */,
3D1C4F00221A9EDD0096AE43 /* IfishYooseeFile */,
@@ -9486,6 +9539,8 @@
883E76A31D48A5E50030E075 /* XutoBackMsgModel.m */,
FA0892E7226B22C90084A609 /* Xuanduo2Model.h */,
FA0892E8226B22C90084A609 /* Xuanduo2Model.m */,
C0F6E1BE243B0A840071ECB9 /* xuanduo3fModel.h */,
C0F6E1BF243B0A840071ECB9 /* xuanduo3fModel.m */,
FAA732D6227C1DA80062C252 /* Xuanduo2TimerModel.h */,
FAA732D7227C1DA80062C252 /* Xuanduo2TimerModel.m */,
FA0892EB226C15000084A609 /* Xuanduo2DataUtility.h */,
@@ -9614,6 +9669,8 @@
E5212234210760A600BA24C5 /* SettingResetViewController.xib */,
CB7D6ABA229660370014E5C7 /* IfishConnectUsViewController.h */,
CB7D6ABB229660370014E5C7 /* IfishConnectUsViewController.m */,
C02ED594249E3B7300CAC37D /* InfoByImageViewController.h */,
C02ED595249E3B7300CAC37D /* InfoByImageViewController.m */,
);
path = mineControllers;
sourceTree = "<group>";
@@ -9868,6 +9925,7 @@
883E791A1D48ACFF0030E075 /* Utinitys */ = {
isa = PBXGroup;
children = (
C0837A54244FF5500034FEC5 /* EGOCache */,
885BD30E1E260B3C00CDB65A /* shuomingshu.html */,
887495541DAE1B2D00F8F4E2 /* IfishUtils */,
883E791B1D48ACFF0030E075 /* DataCenter */,
@@ -9974,6 +10032,7 @@
883E79451D48B0280030E075 /* views */ = {
isa = PBXGroup;
children = (
C0B2F55A244D552A001079AA /* petsStoreName */,
CB4820532334E2E800A50C92 /* HKPieChartView */,
887491D31E78CCA000CDA284 /* IifshSegmentView */,
8869B3701E6939FE0010F099 /* NJKWebViewProgress */,
@@ -11873,83 +11932,17 @@
88F5ECA41D48C9C400CC7CAF /* ThirdPartUnity */ = {
isa = PBXGroup;
children = (
C0873EBC249105FF00D47D34 /* ESPTouch */,
18C54F032350541400DF4E7D /* AlibcTradeSDK-3.1.1.96 */,
CB8B646A230FAD250032EB24 /* Bugly */,
88C6860D1EA60A40004CDFD9 /* TalkingDataV2.2.88 */,
88C685C81EA603A8004CDFD9 /* UMSocial */,
883E7BC81EA5FA1A00ED5D89 /* SMS_SDK */,
88F5ECBD1D48CA2800CC7CAF /* ESPTouch */,
88F5ECE51D48CA2800CC7CAF /* UMCommunity */,
);
name = ThirdPartUnity;
sourceTree = "<group>";
};
88F5ECBD1D48CA2800CC7CAF /* ESPTouch */ = {
isa = PBXGroup;
children = (
88F5ECBE1D48CA2800CC7CAF /* ESPTouAPI */,
);
path = ESPTouch;
sourceTree = "<group>";
};
88F5ECBE1D48CA2800CC7CAF /* ESPTouAPI */ = {
isa = PBXGroup;
children = (
88F5ECBF1D48CA2800CC7CAF /* Esptouchdata */,
88F5ECC81D48CA2800CC7CAF /* Esptouchtask */,
88F5ECD41D48CA2800CC7CAF /* protocol */,
);
path = ESPTouAPI;
sourceTree = "<group>";
};
88F5ECBF1D48CA2800CC7CAF /* Esptouchdata */ = {
isa = PBXGroup;
children = (
88F5ECC01D48CA2800CC7CAF /* ESP_ByteUtil.h */,
88F5ECC11D48CA2800CC7CAF /* ESP_ByteUtil.m */,
88F5ECC21D48CA2800CC7CAF /* ESP_CRC8.h */,
88F5ECC31D48CA2800CC7CAF /* ESP_CRC8.m */,
88F5ECC41D48CA2800CC7CAF /* ESP_NetUtil.h */,
88F5ECC51D48CA2800CC7CAF /* ESP_NetUtil.m */,
88F5ECC61D48CA2800CC7CAF /* IPAddress.c */,
88F5ECC71D48CA2800CC7CAF /* IPAddress.h */,
);
path = Esptouchdata;
sourceTree = "<group>";
};
88F5ECC81D48CA2800CC7CAF /* Esptouchtask */ = {
isa = PBXGroup;
children = (
88F5ECC91D48CA2800CC7CAF /* ESPTouchDelegate.h */,
88F5ECCA1D48CA2800CC7CAF /* ESPTouchResult.h */,
88F5ECCB1D48CA2800CC7CAF /* ESPTouchResult.m */,
88F5ECCC1D48CA2800CC7CAF /* ESPTouchTask.h */,
88F5ECCD1D48CA2800CC7CAF /* ESPTouchTask.m */,
88F5ECCE1D48CA2800CC7CAF /* ESPTouchTaskParameter.h */,
88F5ECCF1D48CA2800CC7CAF /* ESPTouchTaskParameter.m */,
88F5ECD01D48CA2800CC7CAF /* ESPUDPSocketClient.h */,
88F5ECD11D48CA2800CC7CAF /* ESPUDPSocketClient.m */,
88F5ECD21D48CA2800CC7CAF /* ESPUDPSocketServer.h */,
88F5ECD31D48CA2800CC7CAF /* ESPUDPSocketServer.m */,
);
path = Esptouchtask;
sourceTree = "<group>";
};
88F5ECD41D48CA2800CC7CAF /* protocol */ = {
isa = PBXGroup;
children = (
88F5ECD51D48CA2800CC7CAF /* ESPDataCode.h */,
88F5ECD61D48CA2800CC7CAF /* ESPDataCode.m */,
88F5ECD71D48CA2800CC7CAF /* ESPDatumCode.h */,
88F5ECD81D48CA2800CC7CAF /* ESPDatumCode.m */,
88F5ECD91D48CA2800CC7CAF /* ESPGuideCode.h */,
88F5ECDA1D48CA2800CC7CAF /* ESPGuideCode.m */,
88F5ECDB1D48CA2800CC7CAF /* ESPTouchGenerator.h */,
88F5ECDC1D48CA2800CC7CAF /* ESPTouchGenerator.m */,
);
path = protocol;
sourceTree = "<group>";
};
88F5ECE51D48CA2800CC7CAF /* UMCommunity */ = {
isa = PBXGroup;
children = (
@@ -12180,6 +12173,108 @@
path = AvoidCrash;
sourceTree = "<group>";
};
C0837A54244FF5500034FEC5 /* EGOCache */ = {
isa = PBXGroup;
children = (
C017B1E0245ED2D3003151DF /* UIImage+WaterMark.h */,
C017B1E1245ED2D4003151DF /* UIImage+WaterMark.m */,
C0837A55244FF5500034FEC5 /* EGOCache.m */,
C0837A56244FF5500034FEC5 /* EGOCache.h */,
);
path = EGOCache;
sourceTree = "<group>";
};
C0873EBC249105FF00D47D34 /* ESPTouch */ = {
isa = PBXGroup;
children = (
C0873EBD249105FF00D47D34 /* udp */,
C0873EC2249105FF00D47D34 /* protocol */,
C0873ECB249105FF00D47D34 /* ESPUtils */,
C0873ED92491060000D47D34 /* task */,
);
path = ESPTouch;
sourceTree = "<group>";
};
C0873EBD249105FF00D47D34 /* udp */ = {
isa = PBXGroup;
children = (
C0873EBE249105FF00D47D34 /* ESPUDPSocketClient.h */,
C0873EBF249105FF00D47D34 /* ESPUDPSocketServer.m */,
C0873EC0249105FF00D47D34 /* ESPUDPSocketClient.m */,
C0873EC1249105FF00D47D34 /* ESPUDPSocketServer.h */,
);
path = udp;
sourceTree = "<group>";
};
C0873EC2249105FF00D47D34 /* protocol */ = {
isa = PBXGroup;
children = (
C0873EC3249105FF00D47D34 /* ESPGuideCode.m */,
C0873EC4249105FF00D47D34 /* ESPTouchGenerator.m */,
C0873EC5249105FF00D47D34 /* ESPDataCode.h */,
C0873EC6249105FF00D47D34 /* ESPDatumCode.h */,
C0873EC7249105FF00D47D34 /* ESPGuideCode.h */,
C0873EC8249105FF00D47D34 /* ESPDataCode.m */,
C0873EC9249105FF00D47D34 /* ESPTouchGenerator.h */,
C0873ECA249105FF00D47D34 /* ESPDatumCode.m */,
);
path = protocol;
sourceTree = "<group>";
};
C0873ECB249105FF00D47D34 /* ESPUtils */ = {
isa = PBXGroup;
children = (
C0873ECC249105FF00D47D34 /* ESPTools.m */,
C0873ECD249105FF00D47D34 /* ESP_NetUtil.m */,
C0873ECE249105FF00D47D34 /* ESP_ByteUtil.m */,
C0873ECF249105FF00D47D34 /* ESP_WifiUtil.m */,
C0873ED0249105FF00D47D34 /* ESP_CRC8.m */,
C0873ED1249105FF00D47D34 /* ESPVersionMacro.h */,
C0873ED2249105FF00D47D34 /* ESPAES.h */,
C0873ED3249105FF00D47D34 /* ESP_NetUtil.h */,
C0873ED4249105FF00D47D34 /* ESP_ByteUtil.h */,
C0873ED5249105FF00D47D34 /* ESPTools.h */,
C0873ED6249105FF00D47D34 /* ESP_CRC8.h */,
C0873ED7249105FF00D47D34 /* ESP_WifiUtil.h */,
C0873ED8249105FF00D47D34 /* ESPAES.m */,
);
path = ESPUtils;
sourceTree = "<group>";
};
C0873ED92491060000D47D34 /* task */ = {
isa = PBXGroup;
children = (
C0873EDA2491060000D47D34 /* ESPTouchResult.m */,
C0873EDB2491060000D47D34 /* ESPTouchTaskParameter.h */,
C0873EDC2491060000D47D34 /* ESPTouchTask.h */,
C0873EDD2491060000D47D34 /* ESPTouchResult.h */,
C0873EDE2491060000D47D34 /* ESPTouchDelegate.h */,
C0873EDF2491060000D47D34 /* ESPTouchTaskParameter.m */,
C0873EE02491060000D47D34 /* ESPTouchTask.m */,
);
path = task;
sourceTree = "<group>";
};
C0B2F53D244C6FAF001079AA /* pets */ = {
isa = PBXGroup;
children = (
C0B2F53E244C6FE3001079AA /* PetStoresViewController.h */,
C0B2F53F244C6FE3001079AA /* PetStoresViewController.m */,
C0B2F540244C6FE3001079AA /* PetStoresViewController.xib */,
);
path = pets;
sourceTree = "<group>";
};
C0B2F55A244D552A001079AA /* petsStoreName */ = {
isa = PBXGroup;
children = (
C0B2F55B244D5577001079AA /* StoreNameView.h */,
C0B2F55C244D5577001079AA /* StoreNameView.m */,
C0B2F55F244D568E001079AA /* StoreNameView.xib */,
);
name = petsStoreName;
sourceTree = "<group>";
};
C0E7D6C423A1D16C00256A10 /* Helper */ = {
isa = PBXGroup;
children = (
@@ -12755,6 +12850,7 @@
CB484E0422B8C8C80075F050 /* bprint.h in Headers */,
FAFC08232279CB5900B5A07B /* SetTimerCell.h in Headers */,
CB7D6AA122953BEB0014E5C7 /* YYKVStorage.h in Headers */,
C0873EF42491060000D47D34 /* ESP_NetUtil.h in Headers */,
CB484DE522B8C8C80075F050 /* rational.h in Headers */,
CB484DE922B8C8C80075F050 /* avutil.h in Headers */,
3D1C508C221A9EDF0096AE43 /* Utils.h in Headers */,
@@ -12776,6 +12872,7 @@
3D1C50BB221A9EE00096AE43 /* RegisterResult.h in Headers */,
CBA6167F228F9AB100ED380D /* MASViewConstraint.h in Headers */,
C024B7A22379668B00509424 /* NSAttributedString+AvoidCrash.h in Headers */,
C0873EF62491060000D47D34 /* ESPTools.h in Headers */,
CB8B6468230F7F980032EB24 /* IfishMainInfoCell.h in Headers */,
C0EA8A2A23AF74F4003DC53B /* SDWebImageOperation.h in Headers */,
CB484E1122B8C8C90075F050 /* version.h in Headers */,
@@ -12808,6 +12905,7 @@
CB7D6AA322953BEB0014E5C7 /* YYMemoryCache.h in Headers */,
3D1C50E6221A9EE00096AE43 /* ParamDao.h in Headers */,
CB484DFC22B8C8C80075F050 /* bswap.h in Headers */,
C02ED596249E3B7300CAC37D /* InfoByImageViewController.h in Headers */,
3D1C5134221A9EE10096AE43 /* YooseeNextConnectViewController.h in Headers */,
CB484DFF22B8C8C80075F050 /* audioconvert.h in Headers */,
CB484DED22B8C8C80075F050 /* file.h in Headers */,
@@ -12827,6 +12925,7 @@
3D1C50B7221A9EDF0096AE43 /* YTargetAndAction.h in Headers */,
3D1C510A221A9EE00096AE43 /* PlayBaseViewController.h in Headers */,
CB484DE222B8C8C80075F050 /* samplefmt.h in Headers */,
C0873EF72491060000D47D34 /* ESP_CRC8.h in Headers */,
3D1C50AA221A9EDF0096AE43 /* CyclePickerView.h in Headers */,
CB484DE322B8C8C80075F050 /* pixdesc.h in Headers */,
CB48204D2334D0A200A50C92 /* ConAquarChooseWiFiVC.h in Headers */,
@@ -12866,6 +12965,7 @@
3D1C50B4221A9EDF0096AE43 /* YTheNaviBar.h in Headers */,
3D1C5121221A9EE00096AE43 /* CameraBottomCollectionViewCell.h in Headers */,
CB484E1222B8C8C90075F050 /* vdpau.h in Headers */,
C0B2F55D244D5577001079AA /* StoreNameView.h in Headers */,
C0EA8A1323AF74F4003DC53B /* UIImageView+WebCache.h in Headers */,
CB4820962334E99700A50C92 /* IQUIView+Hierarchy.h in Headers */,
FA0892E9226B22C90084A609 /* Xuanduo2Model.h in Headers */,
@@ -12888,16 +12988,21 @@
CB484DFA22B8C8C80075F050 /* log.h in Headers */,
CB48207F2334E99700A50C92 /* IQPreviousNextView.h in Headers */,
FA0893152275F7CF0084A609 /* XuanduoSelectHeader.h in Headers */,
C0837A58244FF5510034FEC5 /* EGOCache.h in Headers */,
3D1C50D1221A9EE00096AE43 /* SVPullToRefresh.h in Headers */,
CB7D6AB022954DE20014E5C7 /* CommonUtils.h in Headers */,
3D1C513C221A9EE10096AE43 /* FishControlFourthCell.h in Headers */,
C0873EF82491060000D47D34 /* ESP_WifiUtil.h in Headers */,
3D1C5086221A9EDF0096AE43 /* KTThumbView.h in Headers */,
3D1C50E5221A9EE00096AE43 /* ShakeManager.h in Headers */,
3D1C5088221A9EDF0096AE43 /* KTThumbsView.h in Headers */,
C0F6E1C0243B0A840071ECB9 /* xuanduo3fModel.h in Headers */,
3D1C513F221A9EE10096AE43 /* FishControlThreedViewCell.h in Headers */,
FA0892F52270BED00084A609 /* XuanduoHuliModel.h in Headers */,
C024B79F2379668B00509424 /* AvoidCrash.h in Headers */,
C024B7AE2379668B00509424 /* NSObject+AvoidCrash.h in Headers */,
C0B2F541244C6FE3001079AA /* PetStoresViewController.h in Headers */,
C0873EFE2491060000D47D34 /* ESPTouchDelegate.h in Headers */,
3D1C50C7221A9EE00096AE43 /* LocalDevice.h in Headers */,
3D1C50A0221A9EDF0096AE43 /* TouchButton.h in Headers */,
CBB0243723517947002900D5 /* MJExtension.h in Headers */,
@@ -12914,6 +13019,7 @@
3D1C509D221A9EDF0096AE43 /* GetContactMessageResult.h in Headers */,
CBB0243923517947002900D5 /* MJPropertyKey.h in Headers */,
CBA61681228F9AB100ED380D /* NSLayoutConstraint+MASDebugAdditions.h in Headers */,
C0873EE72491060000D47D34 /* ESPDataCode.h in Headers */,
3D1C5109221A9EE00096AE43 /* P2PPlaybackController.h in Headers */,
C024B7B02379668B00509424 /* NSMutableAttributedString+AvoidCrash.h in Headers */,
C0E7D6D323A1D16D00256A10 /* UIAlertView+WX.h in Headers */,
@@ -12927,6 +13033,7 @@
C0EA8A1C23AF74F4003DC53B /* UIButton+WebCache.h in Headers */,
C024B7AC2379668B00509424 /* NSArray+AvoidCrash.h in Headers */,
CB48207D2334E99700A50C92 /* IQUIView+IQKeyboardToolbar.h in Headers */,
C0873EF52491060000D47D34 /* ESP_ByteUtil.h in Headers */,
C024B7AF2379668B00509424 /* NSMutableString+AvoidCrash.h in Headers */,
C0EA8A2023AF74F4003DC53B /* UIView+WebCacheOperation.h in Headers */,
CB48208A2334E99700A50C92 /* IQKeyboardReturnKeyHandler.h in Headers */,
@@ -12934,8 +13041,11 @@
3D1C5095221A9EDF0096AE43 /* Alarm.h in Headers */,
CB4820872334E99700A50C92 /* IQKeyboardManagerConstantsInternal.h in Headers */,
C0EA8A2D23AF74F4003DC53B /* SDWebImagePrefetcher.h in Headers */,
C0873EEB2491060000D47D34 /* ESPTouchGenerator.h in Headers */,
3D1C5145221A9EE10096AE43 /* BootomViewSoketBackMasgConreol.h in Headers */,
C0873EF22491060000D47D34 /* ESPVersionMacro.h in Headers */,
3D1C5146221A9EE10096AE43 /* FishTankBootmDataHelper.h in Headers */,
C0873EE92491060000D47D34 /* ESPGuideCode.h in Headers */,
CB484DF522B8C8C80075F050 /* hmac.h in Headers */,
CB484E0922B8C8C80075F050 /* intreadwrite.h in Headers */,
CB484E0122B8C8C80075F050 /* imgutils.h in Headers */,
@@ -12946,6 +13056,7 @@
3D1C5101221A9EE00096AE43 /* IfishP2PMonitorController.h in Headers */,
3D1C50F5221A9EE00096AE43 /* CameraManager.h in Headers */,
C0EA8A2423AF74F4003DC53B /* UIImageView+HighlightedWebCache.h in Headers */,
C0873EE82491060000D47D34 /* ESPDatumCode.h in Headers */,
CB484DF422B8C8C80075F050 /* common.h in Headers */,
3D1C50A3221A9EDF0096AE43 /* WaitingPageView.h in Headers */,
CB484DEB22B8C8C80075F050 /* xtea.h in Headers */,
@@ -12961,13 +13072,16 @@
3D1C50F0221A9EE00096AE43 /* RecommendInfo.h in Headers */,
3D1C509C221A9EDF0096AE43 /* ModifyLoginPasswordResult.h in Headers */,
C0EA8A2E23AF74F4003DC53B /* SDWebImageCompat.h in Headers */,
C0873EFB2491060000D47D34 /* ESPTouchTaskParameter.h in Headers */,
CBA61680228F9AB100ED380D /* MASConstraint.h in Headers */,
C0873EE42491060000D47D34 /* ESPUDPSocketServer.h in Headers */,
CB484E0622B8C8C80075F050 /* timestamp.h in Headers */,
3D1C512E221A9EE10096AE43 /* CameraBottomHView.h in Headers */,
C0EA8A2223AF74F4003DC53B /* UIImage+WebP.h in Headers */,
CB484E0E22B8C8C80075F050 /* version.h in Headers */,
3D1C50E4221A9EE00096AE43 /* config.h in Headers */,
CBB0243223517947002900D5 /* NSObject+MJProperty.h in Headers */,
C017B1E2245ED2D4003151DF /* UIImage+WaterMark.h in Headers */,
3D1C5104221A9EE00096AE43 /* YooseConnectFirstViewController.h in Headers */,
CB484E1E22B8C8C90075F050 /* P2PCInterface.h in Headers */,
3D1C5127221A9EE00096AE43 /* IfishCameraRecordSecondCell.h in Headers */,
@@ -13002,6 +13116,7 @@
3D1C511B221A9EE00096AE43 /* ShootImgDataSource.h in Headers */,
3D1C5132221A9EE10096AE43 /* CameraRecordViewController.h in Headers */,
CB48208B2334E99700A50C92 /* IQKeyboardManager.h in Headers */,
C0873EE12491060000D47D34 /* ESPUDPSocketClient.h in Headers */,
CB484DF122B8C8C80075F050 /* adler32.h in Headers */,
3D1C50A9221A9EDF0096AE43 /* MXSCycleScrollView.h in Headers */,
CB484E0322B8C8C80075F050 /* parseutils.h in Headers */,
@@ -13014,7 +13129,9 @@
CB484DEE22B8C8C80075F050 /* md5.h in Headers */,
FAA732D4227BE2B80062C252 /* ReadTimerModel.h in Headers */,
C0EA8A1923AF74F4003DC53B /* SDImageCache.h in Headers */,
C0873EFC2491060000D47D34 /* ESPTouchTask.h in Headers */,
CBA61676228F9AB100ED380D /* MASConstraint+Private.h in Headers */,
C0873EF32491060000D47D34 /* ESPAES.h in Headers */,
CB484DF022B8C8C80075F050 /* attributes.h in Headers */,
3D1C508B221A9EDF0096AE43 /* KTPhotoScrollViewController.h in Headers */,
3D1C50DB221A9EE00096AE43 /* YAudioStreamPlayer.h in Headers */,
@@ -13026,6 +13143,7 @@
3D1C5108221A9EE00096AE43 /* P2PPlayingbackVC.h in Headers */,
3D1C50AD221A9EDF0096AE43 /* FXBlurView.h in Headers */,
CB0F4E8A22951A130091C76D /* SVRadialGradientLayer.h in Headers */,
C0873EFD2491060000D47D34 /* ESPTouchResult.h in Headers */,
404D7CEB2238CF77005655F5 /* UIViewController+Swizzling.h in Headers */,
CB0F4E8E22951A130091C76D /* SVProgressAnimatedView.h in Headers */,
FA0892FD2275A1B30084A609 /* Xuanduo2SettingController.h in Headers */,
@@ -13935,6 +14053,7 @@
E51D7D58208CE121001FF053 /* CustomModeSetCell.xib in Resources */,
882956A61DBDA3A200E9DDD7 /* community_left@2x.png in Resources */,
883E79181D48A74F0030E075 /* scanscanBg.png in Resources */,
C0B2F543244C6FE3001079AA /* PetStoresViewController.xib in Resources */,
3D1C50D5221A9EE00096AE43 /* SVPullToRefresh.bundle in Resources */,
8871C4981E6D507B000AA49F /* signin_condition_await@3x.png in Resources */,
883283481EAEE60500A47157 /* ifish_look_on.png in Resources */,
@@ -14211,6 +14330,7 @@
8871C4A41E6D507B000AA49F /* signin_condition_gift_conduct@3x.png in Resources */,
881672121EA5DE2B00BEBF23 /* FZLanTingHei-L-GBK-M.TTF in Resources */,
881478121E712A2700BFB79C /* task_choiceLookShops@3x.png in Resources */,
C0B2F560244D568E001079AA /* StoreNameView.xib in Resources */,
882956211DBDA3A100E9DDD7 /* neves0036.png in Resources */,
8865120C1E979BF100BABDF1 /* personal_iocn_share@3x.png in Resources */,
8814781B1E712A2700BFB79C /* task_ifishDoctorpng.png in Resources */,
@@ -14520,12 +14640,11 @@
8816719E1EA5DE2B00BEBF23 /* UMComCommentListDataController.m in Sources */,
88591EE61D655B9E00A1316E /* ChinaPlckerView.m in Sources */,
883E763B1D4897570030E075 /* huifushebeiruwnagModel.m in Sources */,
88F5EE551D48CA2800CC7CAF /* ESPDataCode.m in Sources */,
886F4E011D76BFF8001EDA34 /* KanHuBaoGaoModel.m in Sources */,
883E79C21D48B0280030E075 /* InfoCell.m in Sources */,
CBA6169A22924F1E00ED380D /* MessageAlertView.m in Sources */,
C0EA8A1F23AF74F4003DC53B /* SDWebImagePrefetcher.m in Sources */,
88F5EE531D48CA2800CC7CAF /* ESPUDPSocketClient.m in Sources */,
C0B2F55E244D5577001079AA /* StoreNameView.m in Sources */,
883E78561D48A5E50030E075 /* IfishBlackListCenterViewController.m in Sources */,
CB484E1A22B8C8C90075F050 /* RtspInterface.mm in Sources */,
883A3D181EC44EF300DA84FF /* IfishUsersActivityListController.m in Sources */,
@@ -14655,6 +14774,7 @@
881672031EA5DE2B00BEBF23 /* UMComRefreshView.m in Sources */,
3D34479A212CF71C00CF3941 /* IfishHotBarVc.m in Sources */,
881672211EA5DE2B00BEBF23 /* UMComBriefEditView.m in Sources */,
C0873EEF2491060000D47D34 /* ESP_ByteUtil.m in Sources */,
881A1D4F1DD41AB000BA1AF4 /* MineKanEditSec1ThredCell.m in Sources */,
885C43BC1E89F79D00685A2E /* WMPageController.m in Sources */,
CBB0243C23517947002900D5 /* NSObject+MJClass.m in Sources */,
@@ -14673,6 +14793,7 @@
881671AE1EA5DE2B00BEBF23 /* UMComUserUpdateDataController.m in Sources */,
885C43B71E89F79D00685A2E /* IfishLiveRecommendListViewController.m in Sources */,
8816721C1EA5DE2B00BEBF23 /* UMComSimplicityFindTableViewCell.m in Sources */,
C0873EEC2491060000D47D34 /* ESPDatumCode.m in Sources */,
88597ABD1E56BAF1003D0E5C /* WBSPopShareView.m in Sources */,
8816720E1EA5DE2B00BEBF23 /* UMComProgressHUD.m in Sources */,
886185C11EF2228000459AD1 /* ThreeControlNameViewController.m in Sources */,
@@ -14683,6 +14804,7 @@
886185C71EF228E100459AD1 /* FourControlName.m in Sources */,
CBB0243523517947002900D5 /* NSString+MJExtension.m in Sources */,
881672251EA5DE2B00BEBF23 /* UMComSelectTopicViewController.m in Sources */,
C0873EEE2491060000D47D34 /* ESP_NetUtil.m in Sources */,
3D1C5140221A9EE10096AE43 /* BootomViewSoketBackMasgConreol.m in Sources */,
883E78601D48A5E50030E075 /* LeftViewController.m in Sources */,
3D1C511A221A9EE00096AE43 /* ShotScreenImgViewController.m in Sources */,
@@ -14700,6 +14822,7 @@
8815D11E1DF7A0E300BEA2DA /* NSTimer+Convenience.m in Sources */,
3D1C50A4221A9EDF0096AE43 /* ProgressImageView.m in Sources */,
CB7D6AA022953BEB0014E5C7 /* YYDiskCache.m in Sources */,
C0873EE62491060000D47D34 /* ESPTouchGenerator.m in Sources */,
883E793E1D48ACFF0030E075 /* AFHttpTool.m in Sources */,
3DD7AB5121E2F2FB0064856A /* mask.c in Sources */,
883E787C1D48A5E50030E075 /* IfishMeViewController.m in Sources */,
@@ -14741,11 +14864,9 @@
C0EA8A1623AF74F4003DC53B /* SDWebImageDecoder.m in Sources */,
885A376E1E6EBB67007AD930 /* QianDaoGiftView.m in Sources */,
CBA61657228F9A6C00ED380D /* YYClassInfo.m in Sources */,
88F5EE4E1D48CA2800CC7CAF /* ESP_NetUtil.m in Sources */,
FA0892F2226CA3920084A609 /* NSString+Add.m in Sources */,
883E763E1D4897570030E075 /* ServerBackDeviceLogInModel.m in Sources */,
C0EA8A1223AF74F4003DC53B /* MKAnnotationView+WebCache.m in Sources */,
88F5EE511D48CA2800CC7CAF /* ESPTouchTask.m in Sources */,
CBA616A822928B1700ED380D /* UIButton+button.m in Sources */,
3D1C5098221A9EDF0096AE43 /* UDManager.m in Sources */,
3D1C50EA221A9EE00096AE43 /* des2.c in Sources */,
@@ -14797,7 +14918,6 @@
3D1C174F2171BB0700A159A8 /* PNPieChart.m in Sources */,
88F5EFCB1D48D08100CC7CAF /* UIScrollView+JHExtension.m in Sources */,
88C1B1CB1DC99B0500C2C99A /* TabMineDeivceListViewCell.m in Sources */,
88F5EE541D48CA2800CC7CAF /* ESPUDPSocketServer.m in Sources */,
8853531C1D672695009B828B /* ShopCertifyStausModel.m in Sources */,
883E79C41D48B0280030E075 /* SecondSetTimeCell.m in Sources */,
3D1C5081221A9EDF0096AE43 /* KTThumbView.m in Sources */,
@@ -14825,6 +14945,7 @@
88613F701E5C1E86008D2C69 /* IfishFeedCellHeaghtCalculator.m in Sources */,
8816722E1EA5DE2B00BEBF23 /* UMComFeedDetailCommentCell.m in Sources */,
CB4820832334E99700A50C92 /* IQPreviousNextView.m in Sources */,
C0F6E1C1243B0A840071ECB9 /* xuanduo3fModel.m in Sources */,
883E78951D48A5E50030E075 /* IfishMessageViewCell.m in Sources */,
887DA78C1D547A49001DB880 /* IfishTanSuoViewCell.m in Sources */,
8816720D1EA5DE2B00BEBF23 /* UMComEmojiPageView.m in Sources */,
@@ -14844,7 +14965,6 @@
3D5C437321339F8F00E15B66 /* IfishChatView.m in Sources */,
881671FB1EA5DE2B00BEBF23 /* UMAssetsCollectionCell.m in Sources */,
88678C771E8C9E7F0043DA55 /* ifishLiveListAdViewCell.m in Sources */,
88F5EE571D48CA2800CC7CAF /* ESPGuideCode.m in Sources */,
883E76371D4897570030E075 /* deviceLoginModel.m in Sources */,
3D1C50C1221A9EE00096AE43 /* Utils.m in Sources */,
88F5EFCC1D48D08100CC7CAF /* UIScrollView+JHRefresh.m in Sources */,
@@ -14878,6 +14998,7 @@
CBB0244223517947002900D5 /* MJPropertyType.m in Sources */,
8871FAA41EBC0CE30038E99A /* ShopCerProgressHeaderView.m in Sources */,
88F5EFD81D48D08100CC7CAF /* MMVectorImage.m in Sources */,
C0873EF02491060000D47D34 /* ESP_WifiUtil.m in Sources */,
CBB0243623517947002900D5 /* NSObject+MJProperty.m in Sources */,
883E79B81D48B0280030E075 /* remindCyclePic.m in Sources */,
88696FCF1E9C8872005D4AFB /* MemeberEditeViewCustomCell.m in Sources */,
@@ -14885,6 +15006,7 @@
881671AA1EA5DE2B00BEBF23 /* UMComDataOperationErrorHandler.m in Sources */,
881671D21EA5DE2B00BEBF23 /* UMComPostReplyEditView.m in Sources */,
88F5EFC71D48D08100CC7CAF /* JHRefreshBaseView.m in Sources */,
C0837A57244FF5510034FEC5 /* EGOCache.m in Sources */,
881671A51EA5DE2B00BEBF23 /* UMComLikeListDataController.m in Sources */,
88597AC21E56BAF1003D0E5C /* WFTailoringViewController.m in Sources */,
882957FD1DC0443600E9DDD7 /* IfishCardScrollView.m in Sources */,
@@ -14895,7 +15017,7 @@
883E78731D48A5E50030E075 /* SetNameTextViewController.m in Sources */,
88F5EFD51D48D08100CC7CAF /* MMProgressHUDViewController.m in Sources */,
3D1C507E221A9EDF0096AE43 /* KTPhotoBrowserGlobal.m in Sources */,
88F5EE561D48CA2800CC7CAF /* ESPDatumCode.m in Sources */,
C0873F002491060000D47D34 /* ESPTouchTask.m in Sources */,
883E78931D48A5E50030E075 /* IfishDiscoverViewController.m in Sources */,
88696FD41E9C8B4A005D4AFB /* MemberEditeViewLocationCell.m in Sources */,
886F4DF61D753877001EDA34 /* Report3ViewCell.m in Sources */,
@@ -14904,7 +15026,6 @@
885979D31E529F64003D0E5C /* GoNetShopViewCell.m in Sources */,
881671A81EA5DE2B00BEBF23 /* UMComTopicGroupDataController.m in Sources */,
883E762C1D4897570030E075 /* setRemindWaterModel.m in Sources */,
88F5EE501D48CA2800CC7CAF /* ESPTouchResult.m in Sources */,
88742C3D1D63FA270074F1F8 /* CertifyListFourthCell.m in Sources */,
8871FAAF1EBC2CE60038E99A /* ShopCerPatr1DetailLocationCell.m in Sources */,
88597A2B1E5597C8003D0E5C /* KanHuGuanLi1ViewCell.m in Sources */,
@@ -14930,7 +15051,6 @@
88674A691E4AEABF00C647BB /* UINavigationBar+Background.m in Sources */,
88883B191EF0DA8100CAC0AE /* SongNuo86NameViewController.m in Sources */,
885C43B61E89F79D00685A2E /* IfishLivePopularListViewController.m in Sources */,
88F5EE581D48CA2800CC7CAF /* ESPTouchGenerator.m in Sources */,
883E79A91D48B0280030E075 /* CCMBorderView.m in Sources */,
885FBDE01E4C21FD00E0D7D1 /* WoShiShangJiaViewController.m in Sources */,
8871FAAA1EBC2CAF0038E99A /* shopCerpart1LoactionCell.m in Sources */,
@@ -14948,6 +15068,7 @@
3DD7AB9A21E474940064856A /* AsyncSocket.m in Sources */,
886B80641D62F57000E1B9B3 /* SOngNuoGuiDeng.m in Sources */,
881F0F591D73DFFF0091507E /* BaoGaoViewThirdCell.m in Sources */,
C0873EFA2491060000D47D34 /* ESPTouchResult.m in Sources */,
88653C9B1E76691E00FF973E /* IfishInformationViewController.m in Sources */,
88F5EFB81D48D08100CC7CAF /* UIRefreshControl+AFNetworking.m in Sources */,
88D3373C1DC7440C006C0ADB /* IfishConnectingView.m in Sources */,
@@ -15014,7 +15135,6 @@
881671E11EA5DE2B00BEBF23 /* UMComUserTableViewController.m in Sources */,
885FBDE91E4C3E1000E0D7D1 /* ShopAlreadyCertifyViewCell.m in Sources */,
881671D01EA5DE2B00BEBF23 /* UMComSelectTopicView.m in Sources */,
88F5EE4D1D48CA2800CC7CAF /* ESP_CRC8.m in Sources */,
8869B3B61E696E770010F099 /* IfishUserObsever.m in Sources */,
881671EA1EA5DE2B00BEBF23 /* UMComButton.m in Sources */,
881671EF1EA5DE2B00BEBF23 /* UMComGridViewerController.m in Sources */,
@@ -15034,6 +15154,7 @@
881A1D591DD41C0700BA1AF4 /* MineKanEditSec2SecCell.m in Sources */,
888EEB5F1DC346D3003C5C5B /* FBShimmeringView.m in Sources */,
3D1C174B2171BB0700A159A8 /* PNLineChart.m in Sources */,
C02ED597249E3B7300CAC37D /* InfoByImageViewController.m in Sources */,
3D1C50E7221A9EE00096AE43 /* CameraManager.m in Sources */,
8816719F1EA5DE2B00BEBF23 /* UMComFeedEditDataController.m in Sources */,
883BCD741ED58B810046283B /* ShopDetailViewGoodsViewCell.m in Sources */,
@@ -15052,6 +15173,7 @@
881671C11EA5DE2B00BEBF23 /* UMComNavigationController.m in Sources */,
88380DB61EB1DA7B00FC7C0D /* ShopGoodsManageViewController.m in Sources */,
CB484D0022B8B0D30075F050 /* Reachability.m in Sources */,
C0873EE22491060000D47D34 /* ESPUDPSocketServer.m in Sources */,
887C36281EE63F6000964ACD /* XWCountryCodeController.m in Sources */,
883E786E1D48A5E50030E075 /* infoCollectionViewCell.m in Sources */,
881671C61EA5DE2B00BEBF23 /* UMComDiscoverViewController.m in Sources */,
@@ -15073,7 +15195,6 @@
881671AF1EA5DE2B00BEBF23 /* UMComUserAlbumDataController.m in Sources */,
881671B01EA5DE2B00BEBF23 /* UMComLoginManager.m in Sources */,
C024B7A12379668B00509424 /* NSDictionary+AvoidCrash.m in Sources */,
88F5EE4C1D48CA2800CC7CAF /* ESP_ByteUtil.m in Sources */,
883E79C61D48B0280030E075 /* SetCell.m in Sources */,
881671E71EA5DE2B00BEBF23 /* UMComAddedImageCellView.m in Sources */,
881672181EA5DE2B00BEBF23 /* UMComSimpleGridViewerController.m in Sources */,
@@ -15115,7 +15236,6 @@
881672201EA5DE2B00BEBF23 /* UINavigationBar+ChangeBackgroundColor.m in Sources */,
881672171EA5DE2B00BEBF23 /* UMComSimpleGridView.m in Sources */,
88F5EFCF1D48D08100CC7CAF /* MMHud.m in Sources */,
88F5EE521D48CA2800CC7CAF /* ESPTouchTaskParameter.m in Sources */,
8871FB0C1EBC7EC90038E99A /* IfishBindDeviceSelectViewController.m in Sources */,
8876A58E1BB83447007A4B54 /* ViewController.m in Sources */,
8891330B1ECE999A00F52EBC /* IfishVideoModel.m in Sources */,
@@ -15135,6 +15255,7 @@
CBB0243023517947002900D5 /* MJFoundation.m in Sources */,
883E76451D4897570030E075 /* ZeroControlBackmsgModel.m in Sources */,
889133041ECE999A00F52EBC /* ArtPlayerView.m in Sources */,
C0873EE32491060000D47D34 /* ESPUDPSocketClient.m in Sources */,
881A1D371DD3025400BA1AF4 /* MineKankanEditViewController.m in Sources */,
883E79BE1D48B0280030E075 /* ChangeWaterCell.m in Sources */,
88696FDE1E9C8D51005D4AFB /* MemberDetailMarkDetailViewCell.m in Sources */,
@@ -15177,6 +15298,7 @@
881671FC1EA5DE2B00BEBF23 /* UMAssetsCollectionCheckMarkView.m in Sources */,
881477E61E71091300BFB79C /* IfishTaskModel.m in Sources */,
88C1B2BE1DD1749F00C2C99A /* IfishKanKanListViewController.m in Sources */,
C0873EFF2491060000D47D34 /* ESPTouchTaskParameter.m in Sources */,
8868FE511E66BDB4002F7F33 /* DengJiShuoMingViewCell.m in Sources */,
3D1C511D221A9EE00096AE43 /* IfishCameraRecordfirstCell.m in Sources */,
885C43B91E89F79D00685A2E /* WMMenuView.m in Sources */,
@@ -15193,6 +15315,7 @@
CB7D6AB122954DE20014E5C7 /* CommonUtils.m in Sources */,
883E78EA1D48A5E50030E075 /* BookViewController.m in Sources */,
3D1C17552171BB0700A159A8 /* PNScatterChart.m in Sources */,
C0873EEA2491060000D47D34 /* ESPDataCode.m in Sources */,
883E79AB1D48B0280030E075 /* UIViewController+MaryPopin.m in Sources */,
CB48204A2334B46100A50C92 /* ConAquarNowWiFiPwdVC.m in Sources */,
881671B81EA5DE2B00BEBF23 /* UMComMessageManager.m in Sources */,
@@ -15254,6 +15377,7 @@
88591EEC1D65B8B500A1316E /* ShopCertifyFailViewController.m in Sources */,
883E793C1D48ACFF0030E075 /* IfishDBHelper.m in Sources */,
886B807D1D63116E00E1B9B3 /* CertificationViewFourthCell.m in Sources */,
C0873EED2491060000D47D34 /* ESPTools.m in Sources */,
8867F5C51E656D0300AF021C /* IfishDengjiProgress.m in Sources */,
3D1C17502171BB0700A159A8 /* PNRadarChart.m in Sources */,
8870694A1D4EE89200BCF675 /* DXPopover.m in Sources */,
@@ -15287,9 +15411,11 @@
883E78381D48A5E50030E075 /* MorShopViewController.m in Sources */,
881671A21EA5DE2B00BEBF23 /* UMComNoticeListDataController..m in Sources */,
883E78431D48A5E50030E075 /* KeLiAiBackMassage.m in Sources */,
C0873EF92491060000D47D34 /* ESPAES.m in Sources */,
3D3447A0212D113D00CF3941 /* IFishHotBarCell.m in Sources */,
8871FB101EBC80850038E99A /* FishSelectDeviceListViewCell.m in Sources */,
881672421EA5DE2B00BEBF23 /* UMComSimplicityUserCenterViewController.m in Sources */,
C0B2F542244C6FE3001079AA /* PetStoresViewController.m in Sources */,
3D8F649A21571D7C00F04BD3 /* HitbarWifeVc.m in Sources */,
8861258F1E2731CC004A6097 /* JuNengSoketBackUtls.m in Sources */,
88F5EFD11D48D08100CC7CAF /* MMProgressHUD+Animations.m in Sources */,
@@ -15322,6 +15448,7 @@
882A75FD1EBAF2DB00AD1D15 /* IfishShopCerNewViewController.m in Sources */,
8816721E1EA5DE2B00BEBF23 /* UMComSimplicityUserInfoBar.m in Sources */,
883E76251D4897570030E075 /* ChatroomModel.m in Sources */,
C0873EF12491060000D47D34 /* ESP_CRC8.m in Sources */,
3D1C5082221A9EDF0096AE43 /* KTPhotoScrollViewController.m in Sources */,
881671FA1EA5DE2B00BEBF23 /* UMComPageControlView.m in Sources */,
3D1C174A2171BB0700A159A8 /* PNBarChart.m in Sources */,
@@ -15382,6 +15509,7 @@
3D1C5143221A9EE10096AE43 /* ifishdeviceListCell.m in Sources */,
881671DF1EA5DE2B00BEBF23 /* UMComUserTableViewCell.m in Sources */,
881671EE1EA5DE2B00BEBF23 /* UMComGridView.m in Sources */,
C0873EE52491060000D47D34 /* ESPGuideCode.m in Sources */,
881672281EA5DE2B00BEBF23 /* UMComFeedImageCollectionViewCell.m in Sources */,
88742C381D63FA060074F1F8 /* CertifyListThridCell.m in Sources */,
889C25E91E1C83F6004F745D /* RuSunBackMessageUtils.m in Sources */,
@@ -15403,6 +15531,7 @@
E51D7D5B208CF4E7001FF053 /* RuiMeiInputViewController.m in Sources */,
881672241EA5DE2B00BEBF23 /* UMComSelectTopicCell.m in Sources */,
FAFC08242279CB5900B5A07B /* SetTimerCell.m in Sources */,
C017B1E3245ED2D4003151DF /* UIImage+WaterMark.m in Sources */,
3D1C5097221A9EDF0096AE43 /* TabView.m in Sources */,
88696FBD1E9C7215005D4AFB /* MemberDetailViewController.m in Sources */,
8816722C1EA5DE2B00BEBF23 /* UMComSimpleFeedTableViewController.m in Sources */,
@@ -15426,7 +15555,6 @@
883E78641D48A5E50030E075 /* CellModel.m in Sources */,
888EEB5E1DC346D3003C5C5B /* FBShimmeringLayer.m in Sources */,
883E78F81D48A5E50030E075 /* ForgetViewController.m in Sources */,
88F5EE4F1D48CA2800CC7CAF /* IPAddress.c in Sources */,
885979F31E5422B8003D0E5C /* IfishShopEdite1Cell.m in Sources */,
3D1C5133221A9EE10096AE43 /* YooseeCenterViewCell.m in Sources */,
88597A011E5427FB003D0E5C /* IfishSHopEdite3ViewCell.m in Sources */,
@@ -15622,11 +15750,11 @@
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "compiler-default";
CODE_SIGN_ENTITLEMENTS = Ifish/Ifish.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = "";
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -15743,7 +15871,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 29;
DEVELOPMENT_TEAM = WFX8GD5HFX;
ENABLE_BITCODE = NO;
ENABLE_TESTABILITY = YES;
@@ -15829,7 +15957,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = production2;
PROVISIONING_PROFILE_SPECIFIER = fishdis11;
TARGETED_DEVICE_FAMILY = 1;
USER_HEADER_SEARCH_PATHS = "";
VERSIONING_SYSTEM = "apple-generic";
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "apmodeInfo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 986 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "hotbarInfo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 KiB

After

Width:  |  Height:  |  Size: 218 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "智能宠物系统.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 144 KiB

@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -0,0 +1,12 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
},
"data" : [
{
"idiom" : "universal",
"filename" : "firstlogo"
}
]
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "logo.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "pet.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 619 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "petsImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "xialasanjiao.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "恒温关.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "恒温开.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "换气关.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "换气开.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "杀菌关.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "杀菌开.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "照明关.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "照明开.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "pets.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

BIN
View File
Binary file not shown.
Binary file not shown.
@@ -1,37 +0,0 @@
//
// ESPNetUtil.h
// EspTouchDemo
//
// Created by 白 桦 on 5/15/15.
// Copyright (c) 2015 白 桦. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ESP_NetUtil : NSObject
/**
* get the local ip address by IOS System
*
*/
+ (NSData *) getLocalInetAddress;
/**
* parse InetAddress
*/
+ (NSData *) parseInetAddrByData: (NSData *) inetAddrData andOffset: (int) offset andCount: (int) count;
/**
* descrpion inetAddrData for print pretty
*/
+ (NSString *) descriptionInetAddrByData: (NSData *) inetAddrData;
/**
* parse bssid
*
* @param bssid the bssid
* @return byte converted from bssid
*/
+ (NSData *) parseBssid2bytes: (NSString *) bssid;
@end
@@ -1,92 +0,0 @@
//
// ESPNetUtil.m
// EspTouchDemo
//
// Created by 白 桦 on 5/15/15.
// Copyright (c) 2015 白 桦. All rights reserved.
//
#import "ESP_NetUtil.h"
#include "IPAddress.h"
#include "ESP_ByteUtil.h"
// only support ipV4 at the moment
#define IP_LEN 4
@implementation ESP_NetUtil
+ (NSData *) getLocalInetAddress
{
InitAddresses();
GetIPAddresses();
GetHWAddresses();
NSData *localInetAddrData = nil;
Byte localIpBytes[IP_LEN];
for (int i=0; i<MAXADDRS; ++i)
{
static unsigned long localHost = 0x100007F; // 127.0.0.1
unsigned long theAddr;
theAddr = ip_addrs[i];
if (theAddr == 0) break;
if (theAddr == localHost) continue;
// NSLog(@"theAddr=%lu",theAddr);
// hard coding
localIpBytes[0] = (theAddr & 0xff) >> 0;
localIpBytes[1] = (theAddr & 0xff00) >> 8;
localIpBytes[2] = (theAddr & 0xff0000) >> 16;
localIpBytes[3] = (theAddr & 0xff000000) >> 24;
// NSLog(@"ESP_NetUtil:: %d.%d.%d.%d",localIpBytes[0],localIpBytes[1],localIpBytes[2],localIpBytes[3]);
// if (theAddr != 0) break;
// NSLog(@"ESP_NetUtil:: Name: %s MAC: %s IP: %s\n", if_names[i], hw_addrs[i], ip_names[i]);
}
localInetAddrData = [[NSData alloc]initWithBytes:localIpBytes length:IP_LEN];
FreeAddresses();
Byte byte1 = 0;
Byte byte2 = 0;
Byte byte3 = 0;
Byte byte4 = 0;
[localInetAddrData getBytes:&byte1 range:NSMakeRange(0, 1)];
[localInetAddrData getBytes:&byte2 range:NSMakeRange(1, 1)];
[localInetAddrData getBytes:&byte3 range:NSMakeRange(2, 1)];
[localInetAddrData getBytes:&byte4 range:NSMakeRange(3, 1)];
NSLog(@"ESP_NetUtil:: %d.%d.%d.%d", byte1,byte2,byte3,byte4);
return localInetAddrData;
}
+ (NSData *) parseInetAddrByData: (NSData *) inetAddrData andOffset: (int) offset andCount: (int) count
{
return [inetAddrData subdataWithRange:NSMakeRange(offset, count)];
}
+ (NSString *) descriptionInetAddrByData: (NSData *) inetAddrData
{
Byte inetAddrBytes[IP_LEN];
[inetAddrData getBytes:inetAddrBytes length:IP_LEN];
// hard coding
return [NSString stringWithFormat:@"%d.%d.%d.%d",inetAddrBytes[0],inetAddrBytes[1],inetAddrBytes[2],inetAddrBytes[3]];
}
+ (NSData *) parseBssid2bytes: (NSString *) bssid
{
NSArray *bssidArray = [bssid componentsSeparatedByString:@":"];
NSInteger size = [bssidArray count];
Byte bssidBytes[size];
for (NSInteger i = 0; i < size; i++) {
NSString *bssidStr = [bssidArray objectAtIndex:i];
bssidBytes[i] = strtoul([bssidStr UTF8String], 0, 16);
}
return [[NSData alloc]initWithBytes:bssidBytes length:size];
}
@end
@@ -1,216 +0,0 @@
//
// IPAddress.c
// LocalIpDemo
//
// Created by 白 桦 on 5/11/15.
// Copyright (c) 2015 白 桦. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/sockio.h>
#include <net/if.h>
#include <errno.h>
#include <net/if_dl.h>
#include <net/ethernet.h>
#include "IPAddress.h"
#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))
#define BUFFERSIZE 4000
char *if_names[MAXADDRS];
char *ip_names[MAXADDRS];
char *hw_addrs[MAXADDRS];
unsigned long ip_addrs[MAXADDRS];
static int nextAddr = 0;
void InitAddresses()
{
int i;
for (i=0; i<MAXADDRS; ++i)
{
if_names[i] = ip_names[i] = hw_addrs[i] = NULL;
ip_addrs[i] = 0;
}
}
void FreeAddresses()
{
int i;
for (i=0; i<MAXADDRS; ++i)
{
if (if_names[i] != 0) free(if_names[i]);
if (ip_names[i] != 0) free(ip_names[i]);
if (hw_addrs[i] != 0) free(hw_addrs[i]);
ip_addrs[i] = 0;
nextAddr = 0;
}
InitAddresses();
}
void GetIPAddresses()
{
int i, len, flags;
char buffer[BUFFERSIZE], *ptr, lastname[IFNAMSIZ], *cptr;
struct ifconf ifc;
struct ifreq *ifr, ifrcopy;
struct sockaddr_in *sin;
char temp[80];
int sockfd;
for (i=0; i<MAXADDRS; ++i)
{
if_names[i] = ip_names[i] = NULL;
ip_addrs[i] = 0;
}
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd < 0)
{
perror("socket failed");
return;
}
ifc.ifc_len = BUFFERSIZE;
ifc.ifc_buf = buffer;
if (ioctl(sockfd, SIOCGIFCONF, &ifc) < 0)
{
perror("ioctl error");
return;
}
lastname[0] = 0;
for (ptr = buffer; ptr < buffer + ifc.ifc_len; )
{
ifr = (struct ifreq *)ptr;
len = max(sizeof(struct sockaddr), ifr->ifr_addr.sa_len);
ptr += sizeof(ifr->ifr_name) + len; // for next one in buffer
if (ifr->ifr_addr.sa_family != AF_INET)
{
continue; // ignore if not desired address family
}
if ((cptr = (char *)strchr(ifr->ifr_name, ':')) != NULL)
{
*cptr = 0; // replace colon will null
}
if (strncmp(lastname, ifr->ifr_name, IFNAMSIZ) == 0)
{
continue; /* already processed this interface */
}
memcpy(lastname, ifr->ifr_name, IFNAMSIZ);
ifrcopy = *ifr;
ioctl(sockfd, SIOCGIFFLAGS, &ifrcopy);
flags = ifrcopy.ifr_flags;
if ((flags & IFF_UP) == 0)
{
continue; // ignore if interface not up
}
if_names[nextAddr] = (char *)malloc(strlen(ifr->ifr_name)+1);
if (if_names[nextAddr] == NULL)
{
return;
}
strcpy(if_names[nextAddr], ifr->ifr_name);
sin = (struct sockaddr_in *)&ifr->ifr_addr;
strcpy(temp, inet_ntoa(sin->sin_addr));
ip_names[nextAddr] = (char *)malloc(strlen(temp)+1);
if (ip_names[nextAddr] == NULL)
{
return;
}
strcpy(ip_names[nextAddr], temp);
ip_addrs[nextAddr] = sin->sin_addr.s_addr;
++nextAddr;
}
close(sockfd);
}
void GetHWAddresses()
{
struct ifconf ifc;
struct ifreq *ifr;
int i, sockfd;
char buffer[BUFFERSIZE], *cp, *cplim;
char temp[80];
for (i=0; i<MAXADDRS; ++i)
{
hw_addrs[i] = NULL;
}
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if (sockfd < 0)
{
perror("socket failed");
return;
}
ifc.ifc_len = BUFFERSIZE;
ifc.ifc_buf = buffer;
if (ioctl(sockfd, SIOCGIFCONF, (char *)&ifc) < 0)
{
perror("ioctl error");
close(sockfd);
return;
}
ifr = ifc.ifc_req;
cplim = buffer + ifc.ifc_len;
for (cp=buffer; cp < cplim; )
{
ifr = (struct ifreq *)cp;
if (ifr->ifr_addr.sa_family == AF_LINK)
{
struct sockaddr_dl *sdl = (struct sockaddr_dl *)&ifr->ifr_addr;
int a,b,c,d,e,f;
int i;
strcpy(temp, (char *)ether_ntoa((const struct ether_addr *)LLADDR(sdl)));
sscanf(temp, "%x:%x:%x:%x:%x:%x", &a, &b, &c, &d, &e, &f);
sprintf(temp, "%02X:%02X:%02X:%02X:%02X:%02X",a,b,c,d,e,f);
for (i=0; i<MAXADDRS; ++i)
{
if ((if_names[i] != NULL) && (strcmp(ifr->ifr_name, if_names[i]) == 0))
{
if (hw_addrs[i] == NULL)
{
hw_addrs[i] = (char *)malloc(strlen(temp)+1);
strcpy(hw_addrs[i], temp);
break;
}
}
}
}
cp += sizeof(ifr->ifr_name) + max(sizeof(ifr->ifr_addr), ifr->ifr_addr.sa_len);
}
close(sockfd);
}
@@ -1,26 +0,0 @@
//
// IPAddress.h
// LocalIpDemo
//
// Created by 白 桦 on 5/11/15.
// Copyright (c) 2015 白 桦. All rights reserved.
//
#ifndef LocalIpDemo_IPAddress_h
#define LocalIpDemo_IPAddress_h
#define MAXADDRS 32
extern char *if_names[MAXADDRS];
extern char *ip_names[MAXADDRS];
extern char *hw_addrs[MAXADDRS];
extern unsigned long ip_addrs[MAXADDRS];
// Function prototypes
void InitAddresses();
void FreeAddresses();
void GetIPAddresses();
void GetHWAddresses();
#endif
@@ -1,197 +0,0 @@
//
// ESPUDPSocketServer.m
// EspTouchDemo
//
// Created by 白 桦 on 4/13/15.
// Copyright (c) 2015 白 桦. All rights reserved.
//
#import "ESPUDPSocketServer.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include "ESPTouchTask.h"
@interface ESPUDPSocketServer ()
@property(nonatomic,assign) int _sck_fd;
@property(nonatomic,assign) int _port;
// it is used to check whether the socket is closed already to prevent close more than once.
// especially, when you close the socket second time, it is created just now, it will crash.
//
// // suppose fd1 = 4, fd1 belong to obj1
// e.g. int fd1 = socket(AF_INET,SOCK_DRAM,0);
// close(fd1);
//
// // suppose fd2 = 4 as well, fd2 belong to obj2
// int fd2 = socket(AF_INET,SOCK_DRAM,0);
//
// // obj1's dealloc() is called by system, so
// close(fd1);
//
// // Amazing!!! at the moment, fd2 is close by others
//
@property(nonatomic,assign) volatile bool _isClosed;
// it is used to lock the close method
@property(nonatomic,strong) volatile NSLock *_lock;
@end
@implementation ESPUDPSocketServer
- (id) initWithPort: (int) port AndSocketTimeout: (int) socketTimeout
{
self = [super init];
if (self)
{
// create local
self._lock = [[NSLock alloc]init];
// create socket
self._isClosed = NO;
self._sck_fd = socket(AF_INET,SOCK_DGRAM,0);
if (DEBUG_ON)
{
NSLog(@"##########################server init(): _sck_fd=%d", self._sck_fd);
}
if (self._sck_fd < 0)
{
if (DEBUG_ON)
{
perror("server: _skd_fd init() fail\n");
}
return nil;
}
// init socket params
struct sockaddr_in server_addr;
socklen_t addr_len;
memset(&server_addr, 0, sizeof(server_addr));
server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(port);
server_addr.sin_addr.s_addr = INADDR_ANY;
addr_len = sizeof(server_addr);
// set broadcast
const int opt = 1;
if (setsockopt(self._sck_fd,SOL_SOCKET,SO_BROADCAST,(char *)&opt, sizeof(opt)) < 0)
{
if (DEBUG_ON)
{
perror("server init(): setsockopt SO_BROADCAST fail\n");
}
[self close];
return nil;
}
// set timeout
[self setSocketTimeout:socketTimeout];
// bind
if (bind(self._sck_fd, (struct sockaddr*)&server_addr, addr_len) < 0)
{
if (DEBUG_ON)
{
perror("server init(): bind fail\n");
}
[self close];
return nil;
}
}
return self;
}
// make sure the socket will be closed sometime
- (void)dealloc
{
if (DEBUG_ON)
{
NSLog(@"###################server dealloc()");
}
[self close];
}
- (void) close
{
[self._lock lock];
if (!self._isClosed)
{
if (DEBUG_ON)
{
NSLog(@"###################server close() fd=%d",self._sck_fd);
}
close(self._sck_fd);
self._isClosed = true;
}
[self._lock unlock];
}
- (void) interrupt
{
[self close];
}
- (void) setSocketTimeout: (int) timeout
{
struct timeval tv;
tv.tv_sec = timeout/1000;
tv.tv_usec = timeout%1000*1000;
if (setsockopt(self._sck_fd,SOL_SOCKET,SO_RCVTIMEO,(char *)&tv, sizeof(tv)) < 0)
{
if (DEBUG_ON)
{
perror("server: setsockopt SO_RCVTIMEO fail\n");
}
}
}
- (Byte) receiveOneByte
{
ssize_t recNumber = recv(self._sck_fd, _buffer, BUFFER_SIZE, 0);
if (recNumber > 0)
{
return _buffer[0];
}
else if(recNumber == 0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte socket is closed by the other\n");
}
}
else
{
if (DEBUG_ON)
{
perror("server: receiveOneByte fail\n");
}
}
return UINT8_MAX;
}
- (NSData *) receiveSpecLenBytes: (int)len
{
ssize_t recNumber = recv(self._sck_fd, _buffer, BUFFER_SIZE, 0);
if (recNumber==len)
{
NSData *data = [[NSData alloc]initWithBytes:_buffer length:recNumber];
return data;
}
else if(recNumber==0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte socket is closed by the other\n");
}
}
else if(recNumber<0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte fail\n");
}
}
else
{
// receive rubbish message, just ignore it
}
return nil;
}
@end
+19
View File
@@ -0,0 +1,19 @@
//
// ESPAES.h
// EspTouchDemo
//
// Created by AE on 2018/4/5.
//
#import <Foundation/Foundation.h>
@interface ESPAES : NSObject {
@private NSString *key;
}
- (instancetype)initWithKey:(NSString *)secretKey;
- (NSData *)AES128EncryptData:(NSData *)data;
- (NSData *)AES128DecryptData:(NSData *)data;
@end
+66
View File
@@ -0,0 +1,66 @@
//
// ESPAES.m
// EspTouchDemo
//
// Created by AE on 2018/4/5.
//
#import "ESPAES.h"
#import <CommonCrypto/CommonCryptor.h>
@implementation ESPAES
- (instancetype)initWithKey:(NSString *)secretKey
{
self = [super init];
if (self) {
key = secretKey;
}
return self;
}
- (NSData *)AES128EncryptData:(NSData *)data {
char keyPtr[kCCKeySizeAES128+1];
bzero(keyPtr, sizeof(keyPtr));
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [data length];
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(bufferSize);
size_t numBytesEncrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt, kCCAlgorithmAES128,
kCCOptionPKCS7Padding | kCCOptionECBMode,
keyPtr, kCCBlockSizeAES128,
NULL,
[data bytes], dataLength,
buffer, bufferSize,
&numBytesEncrypted);
if (cryptStatus == kCCSuccess) {
return [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted];
}
free(buffer);
return nil;
}
- (NSData *)AES128DecryptData:(NSData *)data {
char keyPtr[kCCKeySizeAES128+1];
bzero(keyPtr, sizeof(keyPtr));
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [data length];
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(bufferSize);
size_t numBytesDecrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt(kCCDecrypt, kCCAlgorithmAES128,
kCCOptionPKCS7Padding | kCCOptionECBMode,
keyPtr, kCCBlockSizeAES128,
NULL,
[data bytes], dataLength,
buffer, bufferSize,
&numBytesDecrypted);
if (cryptStatus == kCCSuccess) {
return [NSData dataWithBytesNoCopy:buffer length:numBytesDecrypted];
}
free(buffer);
return nil;
}
@end
+22
View File
@@ -0,0 +1,22 @@
//
// EspNetUtils.h
// Esp32Mesh
//
// Created by AE on 2018/4/19.
// Copyright © 2018年 AE. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface ESPTools : NSObject
+ (nullable NSString *)getCurrentWiFiSsid;
+ (nullable NSString *)getCurrentBSSID;
+ (NSString *)getIPAddress:(BOOL)preferIPv4;
+ (NSDictionary *)getIPAddresses;
NS_ASSUME_NONNULL_END
@end
+132
View File
@@ -0,0 +1,132 @@
//
// EspNetUtils.m
// Esp32Mesh
//
// Created by AE on 2018/4/19.
// Copyright © 2018年 AE. All rights reserved.
//
#import "ESPTools.h"
#import <ifaddrs.h>
#import <arpa/inet.h>
#import <net/if.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#define IOS_CELLULAR @"pdp_ip0"
#define IOS_WIFI @"en0"
#define IOS_VPN @"utun0"
#define IP_ADDR_IPv4 @"ipv4"
#define IP_ADDR_IPv6 @"ipv6"
@implementation ESPTools
+ (nullable NSString *)getCurrentWiFiSsid {
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
id info = nil;
for (NSString *ifnam in ifs) {
info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
if (info && [info count]) {
break;
}
}
// Key: BSSID, SSID, SSIDDATA
return [(NSDictionary*)info objectForKey:@"SSID"];
}
+ (nullable NSString *)getCurrentBSSID {
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
id info = nil;
for (NSString *ifnam in ifs) {
info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
if (info && [info count]) {
break;
}
}
// Key: BSSID, SSID, SSIDDATA
return [(NSDictionary*)info objectForKey:@"BSSID"];
}
+ (NSString *)getIPAddress:(BOOL)preferIPv4 {
NSArray *searchArray = preferIPv4 ?
@[ IOS_VPN @"/" IP_ADDR_IPv4, IOS_VPN @"/" IP_ADDR_IPv6, IOS_WIFI @"/" IP_ADDR_IPv4, IOS_WIFI @"/" IP_ADDR_IPv6, IOS_CELLULAR @"/" IP_ADDR_IPv4, IOS_CELLULAR @"/" IP_ADDR_IPv6 ] :
@[ IOS_VPN @"/" IP_ADDR_IPv6, IOS_VPN @"/" IP_ADDR_IPv4, IOS_WIFI @"/" IP_ADDR_IPv6, IOS_WIFI @"/" IP_ADDR_IPv4, IOS_CELLULAR @"/" IP_ADDR_IPv6, IOS_CELLULAR @"/" IP_ADDR_IPv4 ] ;
NSDictionary *addresses = [self getIPAddresses];
NSLog(@"addresses: %@", addresses);
__block NSString *address;
[searchArray enumerateObjectsUsingBlock:^(NSString *key, NSUInteger idx, BOOL *stop) {
address = addresses[key];
//筛选出IP地址格式
if([self isValidatIP:address]) *stop = YES;
} ];
return address ? address : @"0.0.0.0";
}
+ (BOOL)isValidatIP:(NSString *)ipAddress {
if (ipAddress.length == 0) {
return NO;
}
NSString *urlRegEx = @"^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\."
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])$";
NSError *error;
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:urlRegEx options:0 error:&error];
if (regex != nil) {
NSTextCheckingResult *firstMatch=[regex firstMatchInString:ipAddress options:0 range:NSMakeRange(0, [ipAddress length])];
if (firstMatch) {
NSRange resultRange = [firstMatch rangeAtIndex:0];
NSString *result=[ipAddress substringWithRange:resultRange];
//输出结果
NSLog(@"ESPTools 输出结果:%@",result);
return YES;
}
}
return NO;
}
+ (NSDictionary *)getIPAddresses {
NSMutableDictionary *addresses = [NSMutableDictionary dictionaryWithCapacity:8];
// retrieve the current interfaces - returns 0 on success
struct ifaddrs *interfaces;
if(!getifaddrs(&interfaces)) {
// Loop through linked list of interfaces
struct ifaddrs *interface;
for(interface=interfaces; interface; interface=interface->ifa_next) {
if(!(interface->ifa_flags & IFF_UP) /* || (interface->ifa_flags & IFF_LOOPBACK) */ ) {
continue; // deeply nested code harder to read
}
const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr;
char addrBuf[ MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) ];
if(addr && (addr->sin_family==AF_INET || addr->sin_family==AF_INET6)) {
NSString *name = [NSString stringWithUTF8String:interface->ifa_name];
NSString *type;
if(addr->sin_family == AF_INET) {
if(inet_ntop(AF_INET, &addr->sin_addr, addrBuf, INET_ADDRSTRLEN)) {
type = IP_ADDR_IPv4;
}
} else {
const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6*)interface->ifa_addr;
if(inet_ntop(AF_INET6, &addr6->sin6_addr, addrBuf, INET6_ADDRSTRLEN)) {
type = IP_ADDR_IPv6;
}
}
if(type) {
NSString *key = [NSString stringWithFormat:@"%@/%@", name, type];
addresses[key] = [NSString stringWithUTF8String:addrBuf];
}
}
}
// Free memory
freeifaddrs(interfaces);
}
return [addresses count] ? addresses : nil;
}
@end
+20
View File
@@ -0,0 +1,20 @@
//
// ESPVersionMacro.h
// suite
//
// Created by fby on 5/16/16.
// Copyright © 2016 fby. All rights reserved.
//
#ifndef ESPVersionMacro_h
#define ESPVersionMacro_h
#import <UIKit/UIKit.h>
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#endif /* ESPVersionMacro_h */
@@ -2,8 +2,8 @@
// ESP_ByteUtil.h
// EspTouchDemo
//
// Created by 白 桦 on 4/7/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/7/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -48,7 +48,6 @@
* @return the high and low bytes be split, byte[0] is high and byte[1] is
* low
*/
+ (NSData *) splitUint8To2Bytes: (UInt8) uint8;
/**
@@ -60,7 +59,6 @@
* the low byte
* @return the whole byte
*/
+ (Byte) combine2bytesToOneWithHigh: (Byte) high andLow: (Byte) low;
/**
@@ -2,8 +2,8 @@
// ESP_ByteUtil.m
// EspTouchDemo
//
// Created by 白 桦 on 4/7/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/7/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESP_ByteUtil.h"
@@ -57,6 +57,7 @@
high = 0;
low = [self intFromHexString:[hexString substringWithRange:NSMakeRange(0, 1)]];
}
Byte bytes[] = { high, low };
NSData *data = [[NSData alloc] initWithBytes:bytes length:2];
return data;
@@ -108,7 +109,6 @@
+ (NSString *) parseBssid:(Byte[]) bssidBytes Offset: (int) offset Count: (int) count
{
Byte bytes[count];
for (int i = 0; i < count; i++ )
{
bytes[i] = bssidBytes[i + offset];
@@ -2,8 +2,8 @@
// ESP_CRC8.h
// EspTouchDemo
//
// Created by 白 桦 on 3/23/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 3/23/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -53,7 +53,7 @@
/**
* Updates the checksum value with the given byte.
*
* @param val
* @param value
* the byte to update the checksum with.
*/
- (void)updateWithValue:(int)value;
@@ -2,8 +2,8 @@
// ESP_CRC8.m
// EspTouchDemo
//
// Created by 白 桦 on 3/23/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 3/23/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESP_CRC8.h"
+82
View File
@@ -0,0 +1,82 @@
//
// ESPNetUtil.h
// EspTouchDemo
//
// Created by fby on 5/15/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ESP_NetUtil : NSObject
/**
* get local ip v4 or nil
*
* @return local ip v4 or nil
*/
+ (NSString *) getLocalIPv4;
/**
* get local ip v6 or nil
*
* @return local ip v6 or nil
*/
+ (NSString *) getLocalIPv6;
/**
* whether the ipAddr is v4
*
* @return whether the ipAddr is v4
*/
+ (BOOL) isIPv4Addr:(NSString *)ipAddr;
/**
* whether the ipAddr v4 is private
*
* @return whether the ipAddr v4 is private
*/
+ (BOOL) isIPv4PrivateAddr:(NSString *)ipAddr;
/**
* get the local ip address by local inetAddress ip4
*
* @param localInetAddr4 local inetAddress ip4
*/
+ (NSData *) getLocalInetAddress4ByAddr:(NSString *) localInetAddr4;
/**
* get the invented local ip address by local port
*
*/
+ (NSData *) getLocalInetAddress6ByPort:(int) localPort;
/**
* parse InetAddress
*/
+ (NSData *) parseInetAddrByData: (NSData *) inetAddrData andOffset: (int) offset andCount: (int) count;
/**
* descrpion inetAddrData for print pretty IPv4
*/
+ (NSString *) descriptionInetAddr4ByData: (NSData *) inetAddrData;
/**
* descrpion inetAddrData for print pretty IPv6
*/
+ (NSString *) descriptionInetAddr6ByData: (NSData *) inetAddrData;
/**
* parse bssid
*
* @param bssid the bssid
* @return byte converted from bssid
*/
+ (NSData *) parseBssid2bytes: (NSString *) bssid;
/**
* send a dummy GET to "https://8.8.8.8" just to get Network Permission after ios10.0(including)
*/
+ (void) tryOpenNetworkPermission;
@end
+153
View File
@@ -0,0 +1,153 @@
//
// ESPNetUtil.m
// EspTouchDemo
//
// Created by fby on 5/15/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESP_NetUtil.h"
#import "ESP_WifiUtil.h"
#import "ESP_ByteUtil.h"
#import "ESPVersionMacro.h"
#define IP4_LEN 4
#define IP6_LEN 16
@implementation ESP_NetUtil
/**
* get local ip v4 or nil
*
* @return local ip v4 or nil
*/
+ (NSString *) getLocalIPv4
{
return [ESP_WifiUtil getIPAddress4];
}
/**
* get local ip v6 or nil
*
* @return local ip v6 or nil
*/
+ (NSString *) getLocalIPv6
{
return [ESP_WifiUtil getIpAddress6];
}
+ (BOOL) isIPv4Addr:(NSString *)ipAddr
{
NSArray *ip4array = [ipAddr componentsSeparatedByString:@"."];
return [ip4array count]==4;
}
+ (BOOL) isIPv4PrivateAddr:(NSString *)ipAddr4
{
NSArray *ip4array = [ipAddr4 componentsSeparatedByString:@"."];
Byte byte0 = [[ip4array objectAtIndex:0]intValue];
Byte byte1 = [[ip4array objectAtIndex:1]intValue];
// Byte byte2 = [[ip4array objectAtIndex:2]intValue];
// Byte byte3 = [[ip4array objectAtIndex:3]intValue];
if (byte0==10) {
// 10.0.0.0~10.255.255.255
return YES;
} else if (byte0==172&&16<=byte1&&byte1<=31) {
// 172.16.0.0~172.31.255.255
return YES;
} else if (byte0==192&&byte1==168) {
// 192.168.0.0~192.168.255.255
return YES;
}
return NO;
}
+ (NSData *) getLocalInetAddress4ByAddr:(NSString *) localInetAddr4
{
NSArray *ip4array = [localInetAddr4 componentsSeparatedByString:@"."];
Byte byte0 = [[ip4array objectAtIndex:0]intValue];
Byte byte1 = [[ip4array objectAtIndex:1]intValue];
Byte byte2 = [[ip4array objectAtIndex:2]intValue];
Byte byte3 = [[ip4array objectAtIndex:3]intValue];
Byte bytes[] = {byte0,byte1,byte2,byte3};
NSData *ip4data = [NSData dataWithBytes:bytes length:IP4_LEN];
return ip4data;
}
+ (NSData *) getLocalInetAddress6ByPort:(int) localPort
{
Byte lowPort = localPort & 0xff;
Byte highPort = (localPort>>8) & 0xff;
Byte bytes[] = {highPort,lowPort,0xff,0xff};
NSData *ip6data = [NSData dataWithBytes:bytes length:IP4_LEN];
return ip6data;
}
+ (NSData *) parseInetAddrByData: (NSData *) inetAddrData andOffset: (int) offset andCount: (int) count
{
return [inetAddrData subdataWithRange:NSMakeRange(offset, count)];
}
+ (NSString *) descriptionInetAddr4ByData: (NSData *) inetAddrData
{
// check whether inetAddrData is belong to IPv4
if ([inetAddrData length]!=IP4_LEN) {
return nil;
}
Byte inetAddrBytes[IP4_LEN];
[inetAddrData getBytes:inetAddrBytes length:IP4_LEN];
// hard coding
return [NSString stringWithFormat:@"%d.%d.%d.%d",inetAddrBytes[0],inetAddrBytes[1],inetAddrBytes[2],inetAddrBytes[3]];
}
+ (NSString *) descriptionInetAddr6ByData: (NSData *) inetAddrData
{
// check whether inetAddrData is belong to IPv4
if ([inetAddrData length]!=IP6_LEN) {
return nil;
}
Byte inetAddrBytes[IP6_LEN];
[inetAddrData getBytes:inetAddrBytes length:IP6_LEN];
// hard coding
return [NSString stringWithFormat:@"%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x:%02x%02x",inetAddrBytes[0],inetAddrBytes[1],inetAddrBytes[2],inetAddrBytes[3],inetAddrBytes[4],inetAddrBytes[5],inetAddrBytes[6],inetAddrBytes[7],inetAddrBytes[8],inetAddrBytes[9],inetAddrBytes[10],inetAddrBytes[11],inetAddrBytes[12],inetAddrBytes[13],inetAddrBytes[14],inetAddrBytes[15]];
}
+ (NSData *) parseBssid2bytes: (NSString *) bssid
{
NSArray *bssidArray = [bssid componentsSeparatedByString:@":"];
NSInteger size = [bssidArray count];
Byte bssidBytes[size];
for (NSInteger i = 0; i < size; i++) {
NSString *bssidStr = [bssidArray objectAtIndex:i];
bssidBytes[i] = strtoul([bssidStr UTF8String], 0, 16);
}
return [[NSData alloc]initWithBytes:bssidBytes length:size];
}
+ (NSURLSessionConfiguration *) DEFAULT_SESSION_CONFIGURATION
{
static dispatch_once_t predicate;
static NSURLSessionConfiguration *DEFAULT_SESSION_CONFIGURATION;
dispatch_once(&predicate, ^{
DEFAULT_SESSION_CONFIGURATION = [NSURLSessionConfiguration defaultSessionConfiguration];
});
return DEFAULT_SESSION_CONFIGURATION;
}
+ (void) tryOpenNetworkPermission
{
// only ios 10.0 later required to try open network permission
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")) {
NSURL *url = [NSURL URLWithString:@"https://8.8.8.8"];
NSURLRequest *request = [NSURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:1000];
NSURLSession *urlSession = [NSURLSession sessionWithConfiguration:[self DEFAULT_SESSION_CONFIGURATION] delegate:nil delegateQueue:[NSOperationQueue currentQueue]];
[[urlSession dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error){
}] resume];
}
}
@end
+33
View File
@@ -0,0 +1,33 @@
//
// ESP_WifiUtil.h
// EspTouchDemo
//
// Created by fby on 6/15/16.
// Copyright © 2016 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ESP_WifiUtil : NSObject
// refer to http://stackoverflow.com/questions/7072989/iphone-ipad-osx-how-to-get-my-ip-address-programmatically
+ (NSString *)getIPAddress:(BOOL)preferIPv4;
// refer to http://stackoverflow.com/questions/7072989/iphone-ipad-osx-how-to-get-my-ip-address-programmatically
+ (NSDictionary *)getIPAddresses;
/**
* get local ip address by IPv4
*
* @return local ip address by IPv4(or nil when en0/ipv4 unaccessible)
*/
+ (NSString *)getIPAddress4;
/**
* get local ip address by IPv6
*
* @return local ip address by IPv6(or nil when en0/ipv6 unaccessible)
*/
+ (NSString *)getIpAddress6;
@end
+95
View File
@@ -0,0 +1,95 @@
//
// ESP_WifiUtil.m
// EspTouchDemo
//
// Created by fby on 6/15/16.
// Copyright © 2016 fby. All rights reserved.
//
#import "ESP_WifiUtil.h"
#include <ifaddrs.h>
#include <arpa/inet.h>
#include <net/if.h>
#define IOS_CELLULAR @"pdp_ip0"
#define IOS_WIFI @"en0"
#define IOS_VPN @"utun0"
#define IP_ADDR_IPv4 @"ipv4"
#define IP_ADDR_IPv6 @"ipv6"
@implementation ESP_WifiUtil
+ (NSString *)getIPAddress:(BOOL)preferIPv4
{
NSArray *searchArray = preferIPv4 ?
@[ IOS_VPN @"/" IP_ADDR_IPv4, IOS_VPN @"/" IP_ADDR_IPv6, IOS_WIFI @"/" IP_ADDR_IPv4, IOS_WIFI @"/" IP_ADDR_IPv6, IOS_CELLULAR @"/" IP_ADDR_IPv4, IOS_CELLULAR @"/" IP_ADDR_IPv6 ] :
@[ IOS_VPN @"/" IP_ADDR_IPv6, IOS_VPN @"/" IP_ADDR_IPv4, IOS_WIFI @"/" IP_ADDR_IPv6, IOS_WIFI @"/" IP_ADDR_IPv4, IOS_CELLULAR @"/" IP_ADDR_IPv6, IOS_CELLULAR @"/" IP_ADDR_IPv4 ] ;
NSDictionary *addresses = [self getIPAddresses];
// NSLog(@"addresses: %@", addresses);
__block NSString *address;
[searchArray enumerateObjectsUsingBlock:^(NSString *key, NSUInteger idx, BOOL *stop)
{
address = addresses[key];
if(address) *stop = YES;
} ];
return address ? address : @"0.0.0.0";
}
+ (NSDictionary *)getIPAddresses
{
NSMutableDictionary *addresses = [NSMutableDictionary dictionaryWithCapacity:8];
// retrieve the current interfaces - returns 0 on success
struct ifaddrs *interfaces;
if(!getifaddrs(&interfaces)) {
// Loop through linked list of interfaces
struct ifaddrs *interface;
for(interface=interfaces; interface; interface=interface->ifa_next) {
if(!(interface->ifa_flags & IFF_UP) /* || (interface->ifa_flags & IFF_LOOPBACK) */ ) {
continue; // deeply nested code harder to read
}
const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr;
char addrBuf[ MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) ];
if(addr && (addr->sin_family==AF_INET || addr->sin_family==AF_INET6)) {
NSString *name = [NSString stringWithUTF8String:interface->ifa_name];
NSString *type;
if(addr->sin_family == AF_INET) {
if(inet_ntop(AF_INET, &addr->sin_addr, addrBuf, INET_ADDRSTRLEN)) {
type = IP_ADDR_IPv4;
}
} else {
const struct sockaddr_in6 *addr6 = (const struct sockaddr_in6*)interface->ifa_addr;
if(inet_ntop(AF_INET6, &addr6->sin6_addr, addrBuf, INET6_ADDRSTRLEN)) {
type = IP_ADDR_IPv6;
}
}
if(type) {
NSString *key = [NSString stringWithFormat:@"%@/%@", name, type];
addresses[key] = [NSString stringWithUTF8String:addrBuf];
}
}
}
// Free memory
freeifaddrs(interfaces);
}
return [addresses count] ? addresses : nil;
}
+ (NSString *)getIPAddress4
{
NSString *key = [NSString stringWithFormat:@"%@/%@",IOS_WIFI,IP_ADDR_IPv4];
NSString *ipv4 = [[self getIPAddresses]objectForKey:key];
return ipv4;
}
+ (NSString *)getIpAddress6
{
NSString *key = [NSString stringWithFormat:@"%@/%@",IOS_WIFI,IP_ADDR_IPv6];
NSString *ipv6 = [[self getIPAddresses]objectForKey:key];
return ipv6;
}
@end
@@ -2,8 +2,8 @@
// ESPDataCode.h
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -2,8 +2,8 @@
// ESPDataCode.m
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPDataCode.h"
@@ -2,8 +2,8 @@
// ESPDatumCode.h
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -29,7 +29,7 @@
* whether the Ap's ssid is hidden
*
*/
- (id) initWithSsid: (NSString *) apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString*) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden;
- (id) initWithSsid: (NSData *) apSsid andApBssid: (NSData *) apBssid andApPwd: (NSData*) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden;
- (NSData *) getBytes;
@@ -2,8 +2,8 @@
// ESPDatumCode.m
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPDatumCode.h"
@@ -18,7 +18,7 @@
@implementation ESPDatumCode
- (id) initWithSsid: (NSString *) apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString*) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden
- (id) initWithSsid: (NSData *) apSsid andApBssid: (NSData *) apBssid andApPwd: (NSData*) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden
{
self = [super init];
if (self)
@@ -30,22 +30,22 @@
// total xor
UInt8 totalXor = 0;
NSData *apPwdBytesData = [ESP_ByteUtil getBytesByNSString:apPwd];
NSData *apSsidBytesData = [ESP_ByteUtil getBytesByNSString:apSsid];
NSData *apPwdBytesData = apPwd;
NSData *apSsidBytesData = apSsid;
Byte apPwdBytes[[apPwdBytesData length]];
Byte apSsidBytes[[apSsidBytesData length]];
[apPwdBytesData getBytes:apPwdBytes];
[apSsidBytesData getBytes:apSsidBytes];
[apPwdBytesData getBytes:apPwdBytes length:[apPwdBytesData length]];
[apSsidBytesData getBytes:apSsidBytes length:[apSsidBytesData length]];
Byte apPwdLen = [apPwdBytesData length];
ESP_CRC8 *crc = [[ESP_CRC8 alloc]init];
[crc updateWithBuf:apSsidBytes Nbytes:(int)sizeof(apSsidBytes)];
Byte apSsidCrc = [crc getValue];
[crc reset];
NSData *apBssidData = [ESP_NetUtil parseBssid2bytes:apBssid];
NSData *apBssidData = apBssid;
int apBssidDataLen = (int)[apBssidData length];
Byte apBssidBytes[apBssidDataLen];
[apBssidData getBytes:apBssidBytes];
[apBssidData getBytes:apBssidBytes length:[apBssidData length]];
[crc updateWithBuf:apBssidBytes Nbytes:apBssidDataLen];
UInt8 apBssidCrc = [crc getValue];
@@ -54,14 +54,14 @@
// only support ipv4 at the moment
UInt8 ipLen = [ipAddrData length];
Byte ipAddrUint8s[ipLen];
[ipAddrData getBytes:ipAddrUint8s];
[ipAddrData getBytes:ipAddrUint8s length:[ipAddrData length]];
UInt8 _totalLen = EXTRA_HEAD_LEN + ipLen + apPwdLen + apSsidLen;
UInt8 totalLen = isSsidHidden ? (EXTRA_HEAD_LEN + ipLen + apPwdLen + apSsidLen):(EXTRA_HEAD_LEN + ipLen + apPwdLen);
// build data codes
_dataCodes = [[NSMutableArray alloc]initWithCapacity:totalLen];
_dataCodes = [[NSMutableArray alloc]initWithCapacity:totalLen + apBssidDataLen];
ESPDataCode *dataCode = [[ESPDataCode alloc]initWithU8:_totalLen andIndex:0];
[_dataCodes addObject:dataCode];
totalXor ^= _totalLen;
@@ -106,6 +106,20 @@
// add total xor last
dataCode = [[ESPDataCode alloc]initWithU8:totalXor andIndex:4];
[_dataCodes insertObject:dataCode atIndex:4];
// add bssid
NSUInteger bssidInsertIndex = EXTRA_HEAD_LEN;
for (int i = 0; i < apBssidDataLen; i++) {
int index = totalLen + i;
Byte b = apBssidBytes[i];
ESPDataCode *dc = [[ESPDataCode alloc] initWithU8:b andIndex:index];
if (bssidInsertIndex >= _dataCodes.count) {
[_dataCodes addObject:dc];
} else {
[_dataCodes insertObject:dc atIndex:bssidInsertIndex];
}
bssidInsertIndex += 4;
}
}
return self;
}
@@ -2,8 +2,8 @@
// ESPGuideCode.h
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -2,8 +2,8 @@
// ESPGuideCode.m
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPGuideCode.h"
@@ -2,8 +2,8 @@
// ESPTouchGenerator.h
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -29,13 +29,12 @@
* @param isSsidHidden
* whether the Ap's ssid is hidden
*/
- (id) initWithSsid: (NSString *) apSsid andApBssid: (NSString *) apBssid andApPassword: (NSString *) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden;
- (id) initWithSsid: (NSData *)apSsid andApBssid: (NSData *)apBssid andApPassword: (NSData *)apPwd andInetAddrData: (NSData *)ipAddrData andIsSsidHidden: (BOOL)isSsidHidden;
/**
* Get guide code by the format of byte[][]
* @return guide code by the format of byte[][]
*/
- (NSArray *) getGCBytes2;
/**
@@ -2,8 +2,8 @@
// ESPTouchGenerator.m
// EspTouchDemo
//
// Created by 白 桦 on 4/9/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/9/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPTouchGenerator.h"
@@ -14,20 +14,18 @@
@implementation ESPTouchGenerator
- (id) initWithSsid: (NSString *) apSsid andApBssid: (NSString *) apBssid andApPassword: (NSString *) apPwd andInetAddrData: (NSData *) ipAddrData andIsSsidHidden: (BOOL) isSsidHidden
- (id) initWithSsid: (NSData *)apSsid andApBssid: (NSData *)apBssid andApPassword: (NSData *)apPwd andInetAddrData: (NSData *)ipAddrData andIsSsidHidden:(BOOL) isSsidHidden
{
self = [super init];
if (self)
{
// generate guide code
ESPGuideCode *gc = [[ESPGuideCode alloc]init];
NSData *gcData1 = [gc getU16s];
NSUInteger gcData1Len = [gcData1 length];
UInt16 gcU16_1[gcData1Len/2];
[gcData1 getBytes:gcU16_1 length:gcData1Len];
_gcBytes2 = [[NSMutableArray alloc]initWithCapacity:gcData1Len];
for (int i = 0; i < gcData1Len/2; i++)
{
NSData* data = [ESP_ByteUtil genSpecBytesWithU16:gcU16_1[i]];
@@ -35,26 +33,19 @@
}
// generate data code
ESPDatumCode *dc = [[ESPDatumCode alloc]initWithSsid:apSsid andApBssid:apBssid andApPwd:apPwd andInetAddrData:ipAddrData andIsSsidHidden:isSsidHidden];
NSData *dcData1 = [dc getU16s];
NSUInteger dcDataLen = [dcData1 length];
UInt16 dcU16_1[dcDataLen/2];
[dcData1 getBytes:dcU16_1 length:dcDataLen];
_dcBytes2 = [[NSMutableArray alloc]initWithCapacity:dcDataLen];
for (int i = 0; i < dcDataLen/2; i++)
{
NSData* data = [ESP_ByteUtil genSpecBytesWithU16:dcU16_1[i]];
[_dcBytes2 addObject:data];
}
}
return self;
}
- (NSArray *) getGCBytes2
@@ -2,8 +2,8 @@
// ESPTouchDelegate.h
// EspTouchDemo
//
// Created by 白 桦 on 8/14/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 8/14/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -2,8 +2,8 @@
// ESPTouchResult.h
// EspTouchDemo
//
// Created by 白 桦 on 4/14/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/14/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -31,4 +31,6 @@
*/
- (id) initWithIsSuc: (BOOL) isSuc andBssid: (NSString *) bssid andInetAddrData: (NSData *) ipAddrData;
- (NSString *) getAddressString;
@end
@@ -2,8 +2,8 @@
// ESPTouchResult.m
// EspTouchDemo
//
// Created by 白 桦 on 4/14/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/14/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPTouchResult.h"
@@ -24,9 +24,17 @@
return self;
}
- (NSString *)getAddressString {
NSString *ipAddrDataStr = [ESP_NetUtil descriptionInetAddr4ByData:self.ipAddrData];
if (ipAddrDataStr==nil) {
ipAddrDataStr = [ESP_NetUtil descriptionInetAddr6ByData:self.ipAddrData];
}
return ipAddrDataStr;
}
- (NSString *)description
{
NSString *ipAddrDataStr = [ESP_NetUtil descriptionInetAddrByData:self.ipAddrData];
NSString *ipAddrDataStr = [self getAddressString];
return [[NSString alloc]initWithFormat:@"[isSuc: %@,isCancelled: %@,bssid: %@,inetAddress: %@]",self.isSuc? @"YES":@"NO",
self.isCancelled? @"YES":@"NO"
,self.bssid
@@ -2,13 +2,16 @@
// ESPTouchTask.h
// EspTouchDemo
//
// Created by 白 桦 on 4/14/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/14/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ESPTouchResult.h"
#import "ESPTouchDelegate.h"
#import "ESPAES.h"
#define ESPTOUCH_VERSION @"SDK-v1.0.0"
#define DEBUG_ON YES
@@ -16,19 +19,7 @@
@property (atomic,assign) BOOL isCancelled;
/**
* Constructor of EsptouchTask
*
* @param apSsid
* the Ap's ssid
* @param apBssid
* the Ap's bssid
* @param apPassword
* the Ap's password
* @param isSsidHidden
* whether the Ap's ssid is hidden
*/
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden;
- (id)initWithApSsid:(NSString *)apSsid andApBssid:(NSString *)apBssid andApPwd:(NSString *)apPwd andAES:(ESPAES *)aes;
/**
* Constructor of EsptouchTask
@@ -37,21 +28,49 @@
* the Ap's ssid
* @param apBssid
* the Ap's bssid
* @param apPassword
* @param apPwd
* the Ap's password
*/
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd;
/**
* Deprecated
*/
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden __deprecated_msg("Use initWithApSsid:(NSString *) andApBssid:(NSString *) andApPwd:(NSString *) instead.");
/**
* Constructor of EsptouchTask
*
* @param apSsid
* the Ap's ssid
* @param apBssid
* the Ap's bssid
* @param apPwd
* the Ap's password
* @param timeoutMillisecond (it should be >= 15000+6000)
* millisecond of total timeout
*/
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andTimeoutMillisecond: (int) timeoutMillisecond;
/**
* Constructor of EsptouchTask
*
* @param apSsid
* the Ap's ssid
* @param apBssid
* the Ap's bssid
* @param apPwd
* the Ap's password
* @param isSsidHidden
* whether the Ap's ssid is hidden
* @param timeoutMillisecond(it should be >= 15000+6000)
* @param timeoutMillisecond (it should be >= 15000+6000)
* millisecond of total timeout
* @param context
* the Context of the Application
*/
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden andTimeoutMillisecond: (int) timeoutMillisecond;
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden andTimeoutMillisecond: (int) timeoutMillisecond __deprecated_msg("Use initWithApSsid:(NSString *) andApBssid:(NSString *) andApPwd:(NSString *) andTimeoutMillisecond:(int) instead.");
/**
* Interrupt the Esptouch Task when User tap back or close the Application.
*/
- (void) interrupt;
/**
@@ -88,4 +107,9 @@
*/
- (void) setEsptouchDelegate: (NSObject<ESPTouchDelegate> *) esptouchDelegate;
/**
* Set boradcast or multicast when post config info
* @param broadcast YES is boradcast, NO is multicast
*/
- (void) setPackageBroadcast: (BOOL) broadcast;
@end
@@ -2,8 +2,8 @@
// ESPTouchTask.m
// EspTouchDemo
//
// Created by 白 桦 on 4/14/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/14/15.
// Copyright (c) 2015 fby. All rights reserved.
//
// The usage of NSCondition refer to: https://gist.github.com/prachigauriar/8118909
@@ -16,16 +16,15 @@
#import "ESP_NetUtil.h"
#import "ESPTouchTaskParameter.h"
#import "AppDelegate.h"
#define ONE_DATA_LEN 3
@interface ESPTouchTask ()
@property (nonatomic,strong) NSString *_apSsid;
@property (nonatomic,strong) NSData *_apSsid;
@property (nonatomic,strong) NSString *_apBssid;
@property (nonatomic,strong) NSData *_apBssid;
@property (nonatomic,strong) NSString *_apPwd;
@property (nonatomic,strong) NSData *_apPwd;
@property (atomic,assign) BOOL _isSuc;
@@ -55,15 +54,20 @@
@property (nonatomic,strong) id<ESPTouchDelegate> _esptouchDelegate;
@property (nonatomic,strong) NSData *_localInetAddrData;
@end
@implementation ESPTouchTask
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden
- (id)initWithApSsid:(NSString *)apSsid andApBssid:(NSString *)apBssid andApPwd:(NSString *)apPwd andAES:(ESPAES *)aes
{
self = [super init];
NSLog(@"Welcome Esptouch %@",ESPTOUCH_VERSION);
if (apSsid==nil||[apSsid isEqualToString:@""])
{
perror("ESPTouchTask initWithApSsid() apSsid shouldn't be null or empty");
return self;
}
// the apSsid should be null or empty
assert(apSsid!=nil&&![apSsid isEqualToString:@""]);
@@ -72,26 +76,60 @@
apPwd = @"";
}
self = [super init];
if (self)
{
if (DEBUG_ON)
{
NSLog(@"ESPTouchTask init");
}
self._apSsid = apSsid;
self._apPwd = apPwd;
self._apBssid = apBssid;
if (aes == nil) {
self._apSsid = [ESP_ByteUtil getBytesByNSString:apSsid];
self._apPwd = [ESP_ByteUtil getBytesByNSString:apPwd];
} else {
self._apSsid = [aes AES128EncryptData:[ESP_ByteUtil getBytesByNSString:apSsid]];
self._apPwd = [aes AES128EncryptData:[ESP_ByteUtil getBytesByNSString:apPwd]];
}
self._apBssid = [ESP_NetUtil parseBssid2bytes:apBssid];
self._parameter = [[ESPTaskParameter alloc]init];
// check whether IPv4 and IPv6 is supported
NSString *localInetAddr4 = [ESP_NetUtil getLocalIPv4];
if (![ESP_NetUtil isIPv4PrivateAddr:localInetAddr4]) {
localInetAddr4 = nil;
}
NSString *localInetAddr6 = [ESP_NetUtil getLocalIPv6];
[self._parameter setIsIPv4Supported:localInetAddr4!=nil];
[self._parameter setIsIPv6Supported:localInetAddr6!=nil];
// create udp client and udp server
self._client = [[ESPUDPSocketClient alloc]init];
self._server = [[ESPUDPSocketServer alloc]initWithPort: [self._parameter getPortListening]
AndSocketTimeout: [self._parameter getWaitUdpTotalMillisecond]];
// update listening port for IPv6
[self._parameter setListeningPort6:self._server.port];
if (DEBUG_ON) {
NSLog(@"ESPTouchTask app server port is %d",self._server.port);
}
if (localInetAddr4!=nil) {
self._localInetAddrData = [ESP_NetUtil getLocalInetAddress4ByAddr:localInetAddr4];
} else {
int localPort = [self._parameter getPortListening];
self._localInetAddrData = [ESP_NetUtil getLocalInetAddress6ByPort:localPort];
}
if (DEBUG_ON)
{
// for ESPTouchGenerator only receive 4 bytes for local address no matter IPv4 or IPv6
NSLog(@"ESPTouchTask executeForResult() localInetAddr: %@", [ESP_NetUtil descriptionInetAddr4ByData:self._localInetAddrData]);
}
self._isSuc = NO;
self._isInterrupt = NO;
self._isWakeUp = NO;
self._isExecutedAlready = NO;
self._condition = [[NSCondition alloc]init];
self._isSsidHidden = isSsidHidden;
self._isSsidHidden = YES;
self._esptouchResultArray = [[NSMutableArray alloc]init];
self._bssidTaskSucCountDict = [[NSMutableDictionary alloc]init];
self._esptouchResultArrayCondition = [[NSCondition alloc]init];
@@ -99,9 +137,18 @@
return self;
}
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden andTimeoutMillisecond: (int) timeoutMillisecond
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd {
return [self initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd andAES:nil];
}
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden
{
ESPTouchTask *_self = [self initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd andIsSsidHiden:isSsidHidden];
return [self initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd];
}
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andTimeoutMillisecond: (int) timeoutMillisecond
{
ESPTouchTask *_self = [self initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd];
if (_self)
{
[_self._parameter setWaitUdpTotalMillisecond:timeoutMillisecond];
@@ -109,6 +156,11 @@
return _self;
}
- (id) initWithApSsid: (NSString *)apSsid andApBssid: (NSString *) apBssid andApPwd: (NSString *)apPwd andIsSsidHiden: (BOOL) isSsidHidden andTimeoutMillisecond: (int) timeoutMillisecond
{
return [self initWithApSsid:apSsid andApBssid:apBssid andApPwd:apPwd andTimeoutMillisecond:timeoutMillisecond];
}
- (void) __putEsptouchResultIsSuc: (BOOL) isSuc AndBssid: (NSString *)bssid AndInetAddr:(NSData *)inetAddr
{
[self._esptouchResultArrayCondition lock];
@@ -174,10 +226,8 @@
esptouchResult.isCancelled = self.isCancelled;
[self._esptouchResultArray addObject:esptouchResult];
}
[self._esptouchResultArrayCondition unlock];
return self._esptouchResultArray;
}
@@ -216,8 +266,8 @@
NSLog(@"ESPTouchTask __listenAsyn() start an asyn listen task, current thread is: %@", [NSThread currentThread]);
}
NSTimeInterval startTimestamp = [[NSDate date] timeIntervalSince1970];
NSString *apSsidAndPwd = [NSString stringWithFormat:@"%@%@",self._apSsid,self._apPwd];
Byte expectOneByte = [ESP_ByteUtil getBytesByNSString:apSsidAndPwd].length + 9;
// NSString *apSsidAndPwd = [NSString stringWithFormat:@"%@%@",self._apSsid,self._apPwd];
Byte expectOneByte = [self._apSsid length] + [self._apPwd length] + 9;
if (DEBUG_ON)
{
NSLog(@"ESPTouchTask __listenAsyn() expectOneByte: %d",expectOneByte);
@@ -226,7 +276,11 @@
NSData *receiveData = nil;
while ([self._esptouchResultArray count] < [self._parameter getExpectTaskResultCount] && !self._isInterrupt)
{
receiveData = [self._server receiveSpecLenBytes:expectDataLen];
if ([self._parameter isIPv4Supported]) {
receiveData = [self._server receiveSpecLenBytes4:expectDataLen];
} else {
receiveData = [self._server receiveSpecLenBytes6:expectDataLen];
}
if (receiveData != nil)
{
[receiveData getBytes:&receiveOneByte length:1];
@@ -396,14 +450,9 @@
[self __checkTaskValid];
NSData *localInetAddrData = [ESP_NetUtil getLocalInetAddress];
if (DEBUG_ON)
{
NSLog(@"ESPTouchTask executeForResult() localInetAddr: %@", [ESP_NetUtil descriptionInetAddrByData:localInetAddrData]);
}
// generator the esptouch byte[][] to be transformed, which will cost
// some time(maybe a bit much)
ESPTouchGenerator *generator = [[ESPTouchGenerator alloc]initWithSsid:self._apSsid andApBssid:self._apBssid andApPassword:self._apPwd andInetAddrData:localInetAddrData andIsSsidHidden:self._isSsidHidden];
ESPTouchGenerator *generator = [[ESPTouchGenerator alloc]initWithSsid:self._apSsid andApBssid:self._apBssid andApPassword:self._apPwd andInetAddrData:self._localInetAddrData andIsSsidHidden:self._isSsidHidden];
// listen the esptouch result asyn
[self __listenAsyn:[self._parameter getEsptouchResultTotalLen]];
BOOL isSuc = NO;
@@ -464,4 +513,8 @@
self._esptouchDelegate = esptouchDelegate;
}
- (void)setPackageBroadcast:(BOOL)broadcast {
[self._parameter setBroadcast:broadcast];
}
@end
@@ -2,8 +2,8 @@
// ESPTaskParameter.h
// EspTouchDemo
//
// Created by 白 桦 on 5/20/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 5/20/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -136,4 +136,38 @@
*/
- (void) setExpectTaskResultCount: (int) expectTaskResultCount;
/**
* get whether the router support IPv4
* @return whether the router support IPv4
*/
- (BOOL) isIPv4Supported;
/**
* set whether the router support IPv4
* @param isIPv4Supported whether the router support IPv4
*/
- (void) setIsIPv4Supported:(BOOL) isIPv4Supported;
/**
* get whether the router support IPv6
* @return whether the router support IPv6
*/
- (BOOL) isIPv6Supported;
/**
* set whether the router support IPv6
* @param isIPv6Supported whether the router support IPv6
*/
- (void) setIsIPv6Supported:(BOOL) isIPv6Supported;
/**
* set listening port for IPv6
*/
- (void) setListeningPort6:(int) listeningPort6;
/**
* Set broadcast or multicast
*/
- (void) setBroadcast:(BOOL) broadcast;
@end
@@ -2,8 +2,8 @@
// ESPTaskParameter.m
// EspTouchDemo
//
// Created by 白 桦 on 5/20/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 5/20/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPTouchTaskParameter.h"
@@ -17,14 +17,21 @@
@property (nonatomic,assign) int totalRepeatTime;
@property (nonatomic,assign) int esptouchResultOneLen;
@property (nonatomic,assign) int esptouchResultMacLen;
@property (nonatomic,assign) int esptouchResultIpLen;
@property (nonatomic,assign) int esptouchResultTotalLen;
@property (nonatomic,assign) int portListening;
@property (nonatomic,assign) int targetPort;
@property (nonatomic,assign) int esptouchResultIpLen4;
@property (nonatomic,assign) int esptouchResultIpLen6;
@property (nonatomic,assign) int esptouchResultTotalLen4;
@property (nonatomic,assign) int esptouchResultTotalLen6;
@property (nonatomic,assign) int portListening4;
@property (nonatomic,assign) int portListening6;
@property (nonatomic,assign) int targetPort4;
@property (nonatomic,assign) int targetPort6;
@property (nonatomic,assign) int waitUdpReceivingMillisecond;
@property (nonatomic,assign) int waitUdpSendingMillisecond;
@property (nonatomic,assign) int thresholdSucBroadcastCount;
@property (nonatomic,assign) int expectTaskResultCount;
@property (nonatomic,assign) BOOL isIPv4Supported0;
@property (nonatomic,assign) BOOL isIPv6Supported0;
@property (nonatomic,assign) BOOL broadcast;
@end
@implementation ESPTaskParameter
@@ -35,22 +42,28 @@ static int _datagramCount = 0;
{
self = [super init];
if (self) {
self.intervalGuideCodeMillisecond = 10;
self.intervalDataCodeMillisecond = 10;
self.intervalGuideCodeMillisecond = 8;
self.intervalDataCodeMillisecond = 8;
self.timeoutGuideCodeMillisecond = 2000;
self.timeoutDataCodeMillisecond = 4000;
self.timeoutTotalCodeMillisecond = 2000 + 4000;
self.totalRepeatTime = 1;
self.esptouchResultOneLen = 1;
self.esptouchResultMacLen = 6;
self.esptouchResultIpLen = 4;
self.esptouchResultTotalLen = 1 + 6 + 4;
self.portListening = 18266;
self.targetPort = 7001;
self.esptouchResultIpLen4 = 4;
self.esptouchResultIpLen6 = 16;
self.esptouchResultTotalLen4 = 1 + 6 + 4;
self.esptouchResultTotalLen6 = 1 + 6 + 16;
self.portListening4 = 18266;
self.portListening6 = 0;
self.targetPort4 = 7001;
self.targetPort6 = 7001;
self.waitUdpReceivingMillisecond = 15000;
self.waitUdpSendingMillisecond = 45000;
self.thresholdSucBroadcastCount = 1;
self.expectTaskResultCount = 1;
self.isIPv4Supported0 = YES;
self.isIPv6Supported0 = YES;
}
return self;
}
@@ -105,30 +118,52 @@ static int _datagramCount = 0;
- (int) getEsptouchResultIpLen
{
return self.esptouchResultIpLen;
return _isIPv4Supported0 ? _esptouchResultIpLen4 : _esptouchResultIpLen6;
}
- (int) getEsptouchResultTotalLen
{
return self.esptouchResultTotalLen;
if (_isIPv4Supported0) {
return _esptouchResultTotalLen4;
} else {
return _esptouchResultTotalLen6;
}
}
- (int) getPortListening
{
return self.portListening;
if (_isIPv4Supported0) {
return _portListening4;
} else {
return _portListening6;
}
}
// target hostname is : 234.1.1.1, 234.2.2.2, 234.3.3.3 to 234.100.100.100
// target hostname is : 234.1.1.1, 234.2.2.2, 234.3.3.3 to 234.100.100.100 for IPv4
// target hostname is : ff02::1 for IPv6
- (NSString *) getTargetHostname
{
if (_isIPv4Supported0) {
if (self.broadcast) {
return @"255.255.255.255";
} else {
int count = [self __getNextDatagramCount];
return [NSString stringWithFormat: @"234.%d.%d.%d", count, count, count];
}
} else {
return @"ff02::1%en0";
}
}
- (int) getTargetPort
{
return self.targetPort;
if (_isIPv4Supported0) {
return _targetPort4;
} else {
return _targetPort6;
}
}
- (int) getWaitUdpReceivingMillisecond
@@ -171,4 +206,34 @@ static int _datagramCount = 0;
{
_expectTaskResultCount = expectTaskResultCount;
}
- (BOOL) isIPv4Supported
{
return _isIPv4Supported0;
}
- (void) setIsIPv4Supported:(BOOL) isIPv4Supported
{
_isIPv4Supported0 = isIPv4Supported;
}
- (BOOL) isIPv6Supported
{
return _isIPv6Supported0;
}
- (void) setIsIPv6Supported:(BOOL) isIPv6Supported
{
_isIPv6Supported0 = isIPv6Supported;
}
- (void) setListeningPort6:(int) listeningPort6
{
_portListening6 = listeningPort6;
}
- (void)setBroadcast:(BOOL)broadcast {
_broadcast = broadcast;
}
@end
@@ -2,8 +2,8 @@
// ESPUDPSocketClient.h
// EspTouchDemo
//
// Created by 白 桦 on 4/13/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/13/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -17,11 +17,11 @@
/**
* send the data by UDP
*
* @param bytes
* @param bytesArray2
* the array of datas to be sent
* @param targetHost
* @param targetHostName
* the host name of target, e.g. 192.168.1.101
* @param targetPort
* @param port
* the port of target
* @param interval
* the milliseconds to between each UDP sent
@@ -32,15 +32,15 @@
/**
* send the data by UDP
*
* @param data
* @param bytesArray2
* the data to be sent
* @param offset
* the offset which data to be sent
* @param count
* the count of the data
* @param targetHost
* @param targetHostName
* the host name of target, e.g. 192.168.1.101
* @param targetPort
* @param port
* the port of target
* @param interval
* the milliseconds to between each UDP sent
@@ -2,19 +2,24 @@
// ESPUDPSocketClient.m
// EspTouchDemo
//
// Created by 白 桦 on 4/13/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/13/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPUDPSocketClient.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#import <netdb.h>
#include "ESPTouchTask.h"
#import "ESP_NetUtil.h"
#define SOCKET_NULL -1
@interface ESPUDPSocketClient ()
@property(nonatomic, assign) int _sck_fd;
@property(nonatomic, assign) int _sck_fd4;
@property(nonatomic, assign) int _sck_fd6;
@property(nonatomic, assign) BOOL _isStop;
// it is used to check whether the socket is closed already to prevent close more than once.
// especially, when you close the socket second time, it is created just now, it will crash.
@@ -45,16 +50,31 @@
if (self)
{
self._isStop = NO;
self._sck_fd = socket(AF_INET,SOCK_DGRAM,0);
self._sck_fd4 = SOCKET_NULL;
self._sck_fd6 = SOCKET_NULL;
self._sck_fd4 = socket(AF_INET,SOCK_DGRAM,0);
if (DEBUG_ON)
{
NSLog(@"##########################client init() _sck_fd=%d",self._sck_fd);
NSLog(@"##########################client init() _sck_fd4=%d",self._sck_fd4);
}
if (self._sck_fd < 0)
if (self._sck_fd4 < 0)
{
if (DEBUG_ON)
{
perror("client: init() _skd_fd init fail\n");
perror("client: init() _skd_fd4 init fail\n");
}
return nil;
}
self._sck_fd6 = socket(AF_INET6,SOCK_DGRAM,0);
if (DEBUG_ON)
{
NSLog(@"##########################client init() _sck_fd6=%d",self._sck_fd6);
}
if (self._sck_fd6 < 0)
{
if (DEBUG_ON)
{
perror("client: init() _skd_fd6 init fail\n");
}
return nil;
}
@@ -77,11 +97,22 @@
[self._lock lock];
if (!self._isClosed)
{
if (self._sck_fd4!=SOCKET_NULL) {
if (DEBUG_ON)
{
NSLog(@"###################client close() fd=%d",self._sck_fd);
NSLog(@"###################client close() fd4=%d",self._sck_fd4);
}
close(self._sck_fd4);
self._sck_fd4 = SOCKET_NULL;
}
if (self._sck_fd6!=SOCKET_NULL) {
if (DEBUG_ON)
{
NSLog(@"###################client close() fd6=%d",self._sck_fd6);
}
close(self._sck_fd6);
self._sck_fd6 = SOCKET_NULL;
}
close(self._sck_fd);
self._isClosed = YES;
}
[self._lock unlock];
@@ -98,19 +129,9 @@
return [self sendDataWithBytesArray2:bytesArray2 Offset:0 Count:[bytesArray2 count] ToTargetHostName:targetHostName WithPort:port andInterval:interval];
}
- (void) sendDataWithBytesArray2: (NSArray *) bytesArray2 Offset: (NSUInteger) offset Count: (NSUInteger) count ToTargetHostName: (NSString *)targetHostName WithPort: (int) port
- (void) sendDataWithBytesArray2Ipv4: (NSArray *) bytesArray2 Offset: (NSUInteger) offset Count: (NSUInteger) count ToTargetHostName: (NSString *)targetHostName WithPort: (int) port
andInterval: (long) interval
{
// check data is valid
if (nil == bytesArray2 || 0 == [bytesArray2 count])
{
if (DEBUG_ON)
{
perror("client: data is null or data's length equals 0, so sendData fail\n");
}
[self close];
return;
}
// init socket parameters
bool isBroadcast = [targetHostName isEqualToString:@"255.255.255.255"];
socklen_t addr_len;
@@ -123,7 +144,7 @@
if (isBroadcast) {
const int opt = 1;
// set whether the socket is broadcast or not
if (setsockopt(self._sck_fd,SOL_SOCKET,SO_BROADCAST,(char *)&opt, sizeof(opt)) < 0)
if (setsockopt(self._sck_fd4,SOL_SOCKET,SO_BROADCAST,(char *)&opt, sizeof(opt)) < 0)
{
if (DEBUG_ON)
{
@@ -145,7 +166,7 @@
Byte bytes[dataLen];
[data getBytes:bytes length:dataLen];
// send data
if (sendto(self._sck_fd, bytes, dataLen, 0, (struct sockaddr*)&target_addr, addr_len) < 0)
if (sendto(self._sck_fd4, bytes, dataLen, 0, (struct sockaddr*)&target_addr, addr_len) < 0)
{
if (DEBUG_ON)
{
@@ -163,4 +184,81 @@
}
}
- (void) sendDataWithBytesArray2Ipv6: (NSArray *) bytesArray2 Offset: (NSUInteger) offset Count: (NSUInteger) count ToTargetHostName: (NSString *)targetHostName WithPort: (int) port
andInterval: (long) interval
{
// init socket parameters
socklen_t addr_len;
struct sockaddr_in6 target_addr6;
memset(&target_addr6, 0, sizeof(target_addr6));
target_addr6.sin6_family = AF_INET6;
target_addr6.sin6_port = htons(port);
addr_len = sizeof(target_addr6);
NSString *portStr = [NSString stringWithFormat:@"%hu",(uint16_t)port];
struct addrinfo *res0,hints;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_INET6;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
int gai_error = getaddrinfo([targetHostName UTF8String], [portStr UTF8String], &hints, &res0);
if (gai_error) {
perror("client: gai_error, stop");
return;
}
NSData *dstData = [NSData dataWithBytes:res0->ai_addr length:res0->ai_addrlen];
const void *dst = [dstData bytes];
socklen_t dstSize = addr_len;
// send data gotten from the array
for (NSUInteger i = offset; !self._isStop && i < offset + count; i++) {
// get data
NSData* data = [bytesArray2 objectAtIndex:i];
NSUInteger dataLen = [data length];
if (0 == dataLen)
{
continue;
}
Byte bytes[dataLen];
[data getBytes:bytes length:dataLen];
// send data
if (sendto(self._sck_fd6, bytes, dataLen, 0, dst, dstSize) < 0)
{
if (DEBUG_ON)
{
perror("client: sendto fail, but just ignore it\n");
}
// for the Ap will make some troubles when the phone send too many UDP packets,
// but we don't expect the UDP packet received by others, so just ignore it
}
// sleep interval
usleep((useconds_t)(interval*1000));
}
// check whether the client is stop
if (self._isStop) {
[self close];
}
}
- (void) sendDataWithBytesArray2: (NSArray *) bytesArray2 Offset: (NSUInteger) offset Count: (NSUInteger) count ToTargetHostName: (NSString *)targetHostName WithPort: (int) port
andInterval: (long) interval
{
// check data is valid
if (nil == bytesArray2 || 0 == [bytesArray2 count])
{
if (DEBUG_ON)
{
perror("client: data is null or data's length equals 0, so sendData fail\n");
}
[self close];
return;
}
if ([ESP_NetUtil isIPv4Addr:targetHostName]) {
[self sendDataWithBytesArray2Ipv4:bytesArray2 Offset:offset Count:count ToTargetHostName:targetHostName WithPort:port andInterval:interval];
} else {
[self sendDataWithBytesArray2Ipv6:bytesArray2 Offset:offset Count:count ToTargetHostName:targetHostName WithPort:port andInterval:interval];
}
}
@end
@@ -2,8 +2,8 @@
// ESPUDPSocketServer.h
// EspTouchDemo
//
// Created by 白 桦 on 4/13/15.
// Copyright (c) 2015 白 桦. All rights reserved.
// Created by fby on 4/13/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -16,6 +16,8 @@
Byte _buffer[BUFFER_SIZE];
}
@property (nonatomic, assign) int port;
- (void) close;
- (void) interrupt;
@@ -25,7 +27,6 @@
*
* @param timeout
* the timeout in milliseconds or 0 for no timeout.
* @return true whether the timeout is set suc
*/
- (void) setSocketTimeout: (int) timeout;
@@ -34,9 +35,13 @@
*
* @return one byte receive from the port or UINT8_MAX(it impossible receive it from the socket)
*/
- (Byte) receiveOneByte;
- (Byte) receiveOneByte4;
- (NSData *) receiveSpecLenBytes: (int)len;
- (NSData *) receiveSpecLenBytes4: (int)len;
- (Byte) receiveOneByte6;
- (NSData *) receiveSpecLenBytes6:(int)len;
- (id) initWithPort: (int) port AndSocketTimeout: (int) socketTimeout;
+379
View File
@@ -0,0 +1,379 @@
//
// ESPUDPSocketServer.m
// EspTouchDemo
//
// Created by fby on 4/13/15.
// Copyright (c) 2015 fby. All rights reserved.
//
#import "ESPUDPSocketServer.h"
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include "ESPTouchTask.h"
#define SOCKET_NULL -1
@interface ESPUDPSocketServer ()
@property(nonatomic,assign) int _sck_fd4;
@property(nonatomic,assign) int _sck_fd6;
// it is used to check whether the socket is closed already to prevent close more than once.
// especially, when you close the socket second time, it is created just now, it will crash.
//
// // suppose fd1 = 4, fd1 belong to obj1
// e.g. int fd1 = socket(AF_INET,SOCK_DRAM,0);
// close(fd1);
//
// // suppose fd2 = 4 as well, fd2 belong to obj2
// int fd2 = socket(AF_INET,SOCK_DRAM,0);
//
// // obj1's dealloc() is called by system, so
// close(fd1);
//
// // Amazing!!! at the moment, fd2 is close by others
//
@property(nonatomic,assign) volatile bool _isClosed;
// it is used to lock the close method
@property(nonatomic,strong) volatile NSLock *_lock;
@end
@implementation ESPUDPSocketServer
- (BOOL) initWithPort4: (int) port AndSocketTimeout: (int) socketTimeout
{
self._sck_fd4 = socket(AF_INET,SOCK_DGRAM,0);
if (DEBUG_ON)
{
NSLog(@"##########################server init(): _sck_fd4=%d", self._sck_fd4);
}
if (self._sck_fd4 < 0)
{
if (DEBUG_ON)
{
perror("server: _skd_fd4 init() fail\n");
}
return NO;
}
// init socket4 params
struct sockaddr_in server_addr;
socklen_t addr_len;
memset(&server_addr, 0, sizeof(server_addr));
server_addr.sin_family = AF_INET;
server_addr.sin_port = htons(port);
server_addr.sin_addr.s_addr = INADDR_ANY;
addr_len = sizeof(server_addr);
// set broadcast
const int opt = 1;
if (setsockopt(self._sck_fd4,SOL_SOCKET,SO_BROADCAST,(char *)&opt, sizeof(opt)) < 0)
{
if (DEBUG_ON)
{
perror("server init() sck4: setsockopt SO_BROADCAST fail\n");
}
[self close];
return NO;
}
// set socket timeout
if (![self setSocketTimeout:socketTimeout SocketFd:self._sck_fd4]) {
if (DEBUG_ON) {
perror("server: sck4: setsockopt SO_RCVTIMEO fail\n");
}
[self close];
return NO;
}
// set SO_REUSEADDR for ipv4
if (setsockopt(self._sck_fd4, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(opt))< 0) {
if (DEBUG_ON)
{
perror("server init() sck4: setsockopt SO_REUSEADDR fail\n");
}
[self close];
return NO;
}
// bind for ipv4
if (bind(self._sck_fd4, (struct sockaddr*)&server_addr, addr_len) < 0)
{
if (DEBUG_ON)
{
perror("server init() sck4: bind fail\n");
}
[self close];
return NO;
}
return YES;
}
- (BOOL) initWithPort6: (int) port AndSocketTimeout: (int) socketTimeout
{
self._sck_fd6 = socket(AF_INET6,SOCK_DGRAM,0);
if (DEBUG_ON)
{
NSLog(@"##########################server init(): _sck_fd6=%d", self._sck_fd6);
}
if (self._sck_fd6 < 0)
{
if (DEBUG_ON)
{
perror("server: _skd_fd6 init() fail\n");
}
return NO;
}
// init socket6 params
struct sockaddr_in6 server_addr6;
socklen_t addr6_len = sizeof(server_addr6);
memset(&server_addr6, 0, addr6_len);
server_addr6.sin6_family = AF_INET6;
server_addr6.sin6_port = htons(port);
server_addr6.sin6_addr = in6addr_any;
// set socket timeout
if (![self setSocketTimeout:socketTimeout SocketFd:self._sck_fd6]) {
if (DEBUG_ON) {
perror("server: sck4: setsockopt SO_RCVTIMEO fail\n");
}
[self close];
return NO;
}
// set SO_REUSEADDR for ipv6
const int opt = 1;
if (setsockopt(self._sck_fd6, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, sizeof(opt))< 0) {
if (DEBUG_ON)
{
perror("server init() sck6: setsockopt SO_REUSEADDR fail\n");
}
[self close];
return NO;
}
// bind for ipv6
if (bind(self._sck_fd6, (struct sockaddr*)&server_addr6, addr6_len) < 0)
{
if (DEBUG_ON)
{
perror("server init() sck6: bind fail\n");
}
[self close];
return NO;
}
return YES;
}
- (id) initWithPort:(int)port AndSocketTimeout:(int)socketTimeout
{
self = [super init];
if (self) {
// create lock
self._lock = [[NSLock alloc]init];
// init
self._isClosed = NO;
self._sck_fd4 = SOCKET_NULL;
self._sck_fd6 = SOCKET_NULL;
// init sck4
if (![self initWithPort4:port AndSocketTimeout:socketTimeout]) {
if (DEBUG_ON) {
NSLog(@"fail to init socket for ipv4");
}
return nil;
}
if (port==0) {
struct sockaddr_in local_addr;
socklen_t len = sizeof(local_addr);
if (getsockname(self._sck_fd4, (struct sockaddr *)&local_addr, &len)==0) {
port = ntohs(local_addr.sin_port);
}
else {
if (DEBUG_ON) {
NSLog(@"fail to get socket port for ipv4");
}
[self close];
return nil;
}
}
_port = port;
// init sck6
if (![self initWithPort6:port AndSocketTimeout:socketTimeout]) {
if (DEBUG_ON) {
NSLog(@"fail to init socket for ipv6");
}
return nil;
}
}
return self;
}
// make sure the socket will be closed sometime
- (void)dealloc
{
if (DEBUG_ON)
{
NSLog(@"###################server dealloc()");
}
[self close];
}
- (void) close
{
[self._lock lock];
if (!self._isClosed)
{
if (self._sck_fd4!=SOCKET_NULL) {
if (DEBUG_ON)
{
NSLog(@"###################server close() fd4=%d",self._sck_fd4);
}
close(self._sck_fd4);
self._sck_fd4 = SOCKET_NULL;
}
if (self._sck_fd6!=SOCKET_NULL) {
if (DEBUG_ON)
{
NSLog(@"###################server close() fd6=%d",self._sck_fd6);
}
close(self._sck_fd6);
self._sck_fd6 = SOCKET_NULL;
}
self._isClosed = true;
}
[self._lock unlock];
}
- (void) interrupt
{
[self close];
}
- (BOOL) setSocketTimeout: (int) timeout SocketFd:(int) socketFd
{
struct timeval tv;
tv.tv_sec = timeout/1000;
tv.tv_usec = timeout%1000*1000;
if (setsockopt(socketFd,SOL_SOCKET,SO_RCVTIMEO,(char *)&tv, sizeof(tv)) < 0)
{
if (DEBUG_ON)
{
perror("server: setsockopt SO_RCVTIMEO fail\n");
}
return NO;
} else {
return YES;
}
}
- (void) setSocketTimeout:(int)timeout
{
[self setSocketTimeout:timeout SocketFd:self._sck_fd4];
[self setSocketTimeout:timeout SocketFd:self._sck_fd6];
}
- (Byte) receiveOneByte4
{
ssize_t recNumber = recv(self._sck_fd4, _buffer, BUFFER_SIZE, 0);
if (recNumber > 0)
{
return _buffer[0];
}
else if(recNumber == 0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte4 socket is closed by the other\n");
}
}
else
{
if (DEBUG_ON)
{
perror("server: receiveOneByte4 fail\n");
}
}
return UINT8_MAX;
}
- (Byte) receiveOneByte6
{
ssize_t recNumber = recv(self._sck_fd6, _buffer, BUFFER_SIZE, 0);
if (recNumber > 0)
{
return _buffer[0];
}
else if(recNumber == 0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte6 socket is closed by the other\n");
}
}
else
{
if (DEBUG_ON)
{
perror("server: receiveOneByte6 fail\n");
}
}
return UINT8_MAX;
}
- (NSData *) receiveSpecLenBytes4: (int)len
{
ssize_t recNumber = recv(self._sck_fd4, _buffer, BUFFER_SIZE, 0);
if (recNumber==len)
{
NSData *data = [[NSData alloc]initWithBytes:_buffer length:recNumber];
return data;
}
else if(recNumber==0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte4 socket is closed by the other\n");
}
}
else if(recNumber<0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte4 fail\n");
}
}
else
{
// receive rubbish message, just ignore it
}
return nil;
}
- (NSData *) receiveSpecLenBytes6:(int)len
{
ssize_t recNumber = recv(self._sck_fd6, _buffer, BUFFER_SIZE, 0);
if (recNumber==len)
{
NSData *data = [[NSData alloc]initWithBytes:_buffer length:recNumber];
return data;
}
else if(recNumber==0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte6 socket is closed by the other\n");
}
}
else if(recNumber<0)
{
if (DEBUG_ON)
{
perror("server: receiveOneByte6 fail\n");
}
}
else
{
// receive rubbish message, just ignore it
}
return nil;
}
@end
+4 -2
View File
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.1.4</string>
<string>5.1.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>19</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
@@ -405,6 +405,8 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
+3 -1
View File
@@ -7,7 +7,7 @@
//
#import <Foundation/Foundation.h>
#import "EGOCache.h"
@interface DataCenter : NSObject
@@ -16,6 +16,8 @@
-(void)setValue:(id)value forKey:(NSString*)key;
// 获取数据
-(id)valueForKey:(NSString*)key;
@property (nonatomic, strong) EGOCache *cache;
-(void)cacheinit:(NSString*)useid;
@end
+7
View File
@@ -44,9 +44,16 @@
_dict=[[NSMutableDictionary alloc]init];
}
}
return self;
}
-(void)cacheinit:(NSString*)useid
{
NSArray*arr=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
self.cache = [[EGOCache alloc] initWithCacheDirectory:[arr.firstObject stringByAppendingPathComponent:[NSString stringWithFormat:@"ifish/%@",[CommonUtils getNotNilStr:useid]]]];
[self.cache setDefaultTimeoutInterval:864000000];
}
//根据文件名 获取指定文件名的在沙盒Documents的 全路径
-(NSString*)getFullFilePathWithName:(NSString *)name{
//方法1
@@ -57,5 +57,6 @@
//新绚多
+(void)saveNewXuToControlName:(XuToControlName *)nameModel;
+(XuToControlName *)currentNewXuToControlName:(NSString *)macaddress;
+(XuToControlName *)currentPetsXuToControlName:(NSString *)macaddress;
@end
@@ -241,6 +241,26 @@
return controlName;
}
+(XuToControlName *)currentPetsXuToControlName:(NSString *)macaddress
{
NSString *key = [NSString stringWithFormat:@"newXuTo%@",macaddress];
NSString *file = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES).firstObject stringByAppendingPathComponent:key];
XuToControlName *controlName = [NSKeyedUnarchiver unarchiveObjectWithFile:file];
if (!controlName||[controlName isKindOfClass:[NSNull class]]) {
controlName = [[XuToControlName alloc] init];
controlName.shajunLight = @"杀菌灯";
controlName.zengyangPump = @"换气";
controlName.light1 = @"杀菌";
controlName.light2 = @"恒温";
controlName.zaolangPump = @"造浪泵";
controlName.huLiDeng = @"护理灯";
controlName.xunhuanPump = @"照明";
controlName.jiaRe = @"加热棒";
controlName.macAddress = macaddress;
}
return controlName;
}
+1 -1
View File
@@ -220,7 +220,7 @@ alpha:1.0]
#define kShareDevice [NSString stringWithFormat:@"app.ifish7.com/api/user/shareDevice.do",JIEKOUPORT]
// 扫一扫分享设备 已最新
#define kshareDeviceByQrCode [NSString stringWithFormat:@"%@/api/users/sharingDevice/",JIEKOUPORT]
#define kshareDeviceByQrCode [NSString stringWithFormat:@"%@/api/user/shareDeviceByQrCode.do",JIEKOUPORT]
// 解除分享的设备
#define kdeleteShareDevice [NSString stringWithFormat:@"%@/api/user/deleteShareDevice.do",JIEKOUPORT]
+96
View File
@@ -0,0 +1,96 @@
//
// EGOCache.h
// enormego
//
// Created by Shaun Harrison.
// Copyright (c) 2009-2017 enormego.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import <Foundation/Foundation.h>
#if TARGET_OS_IPHONE
#import <UIKit/UIKit.h>
#endif
#if TARGET_OS_OSX
#import <AppKit/AppKit.h>
#endif
//! Project version number for EGOCache.
FOUNDATION_EXPORT double EGOCacheVersionNumber;
//! Project version string for EGOCache.
FOUNDATION_EXPORT const unsigned char EGOCacheVersionString[];
#if !__has_feature(nullability)
# define nullable
# define nonnull
# define __nullable
# define __nonnull
#endif
@interface EGOCache : NSObject
// Global cache for easy use
+ (nonnull instancetype)globalCache;
// Opitionally create a different EGOCache instance with it's own cache directory
- (nonnull instancetype)initWithCacheDirectory:(NSString* __nonnull)cacheDirectory;
- (void)clearCache;
- (void)removeCacheForKey:(NSString* __nonnull)key;
- (BOOL)hasCacheForKey:(NSString* __nonnull)key;
- (NSData* __nullable)dataForKey:(NSString* __nonnull)key;
- (void)setData:(NSData* __nonnull)data forKey:(NSString* __nonnull)key;
- (void)setData:(NSData* __nonnull)data forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSString* __nullable)stringForKey:(NSString* __nonnull)key;
- (void)setString:(NSString* __nonnull)aString forKey:(NSString* __nonnull)key;
- (void)setString:(NSString* __nonnull)aString forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (NSDate* __nullable)dateForKey:(NSString* __nonnull)key;
- (NSArray* __nonnull)allKeys;
#if TARGET_OS_IPHONE
- (UIImage* __nullable)imageForKey:(NSString* __nonnull)key;
- (void)setImage:(UIImage* __nonnull)anImage forKey:(NSString* __nonnull)key;
- (void)setImage:(UIImage* __nonnull)anImage forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
#else
- (NSImage* __nullable)imageForKey:(NSString* __nonnull)key;
- (void)setImage:(NSImage* __nonnull)anImage forKey:(NSString* __nonnull)key;
- (void)setImage:(NSImage* __nonnull)anImage forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
#endif
- (NSData* __nullable)plistForKey:(NSString* __nonnull)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString* __nonnull)key;
- (void)setPlist:(nonnull id)plistObject forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (void)copyFilePath:(NSString* __nonnull)filePath asKey:(NSString* __nonnull)key;
- (void)copyFilePath:(NSString* __nonnull)filePath asKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
- (nullable id<NSCoding>)objectForKey:(NSString* __nonnull)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString* __nonnull)key;
- (void)setObject:(nonnull id<NSCoding>)anObject forKey:(NSString* __nonnull)key withTimeoutInterval:(NSTimeInterval)timeoutInterval;
@property(nonatomic) NSTimeInterval defaultTimeoutInterval; // Default is 1 day
@end
+368
View File
@@ -0,0 +1,368 @@
//
// EGOCache.m
// enormego
//
// Created by Shaun Harrison.
// Copyright (c) 2009-2017 enormego.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#import "EGOCache.h"
#if DEBUG
# define CHECK_FOR_EGOCACHE_PLIST() if([key isEqualToString:@"EGOCache.plist"]) { \
NSLog(@"EGOCache.plist is a reserved key and can not be modified."); \
return; }
#else
# define CHECK_FOR_EGOCACHE_PLIST() if([key isEqualToString:@"EGOCache.plist"]) return;
#endif
static inline NSString* cachePathForKey(NSString* directory, NSString* key) {
key = [key stringByReplacingOccurrencesOfString:@"/" withString:@"_"];
return [directory stringByAppendingPathComponent:key];
}
#pragma mark -
@interface EGOCache () {
dispatch_queue_t _cacheInfoQueue;
dispatch_queue_t _frozenCacheInfoQueue;
dispatch_queue_t _diskQueue;
NSMutableDictionary* _cacheInfo;
NSString* _directory;
BOOL _needsSave;
}
@property(nonatomic,copy) NSDictionary* frozenCacheInfo;
@end
@implementation EGOCache
+ (instancetype)globalCache {
static id instance;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
instance = [[[self class] alloc] init];
});
return instance;
}
- (instancetype)init {
NSString* cachesDirectory = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES)[0];
NSString* oldCachesDirectory = [[[cachesDirectory stringByAppendingPathComponent:[[NSProcessInfo processInfo] processName]] stringByAppendingPathComponent:@"EGOCache"] copy];
if([[NSFileManager defaultManager] fileExistsAtPath:oldCachesDirectory]) {
[[NSFileManager defaultManager] removeItemAtPath:oldCachesDirectory error:NULL];
}
cachesDirectory = [[[cachesDirectory stringByAppendingPathComponent:[[NSBundle mainBundle] bundleIdentifier]] stringByAppendingPathComponent:@"EGOCache"] copy];
return [self initWithCacheDirectory:cachesDirectory];
}
- (instancetype)initWithCacheDirectory:(NSString*)cacheDirectory {
if((self = [super init])) {
_cacheInfoQueue = dispatch_queue_create("com.enormego.egocache.info", DISPATCH_QUEUE_SERIAL);
dispatch_queue_t priority = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
dispatch_set_target_queue(priority, _cacheInfoQueue);
_frozenCacheInfoQueue = dispatch_queue_create("com.enormego.egocache.info.frozen", DISPATCH_QUEUE_SERIAL);
priority = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
dispatch_set_target_queue(priority, _frozenCacheInfoQueue);
_diskQueue = dispatch_queue_create("com.enormego.egocache.disk", DISPATCH_QUEUE_CONCURRENT);
priority = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0);
dispatch_set_target_queue(priority, _diskQueue);
_directory = cacheDirectory;
_cacheInfo = [[NSDictionary dictionaryWithContentsOfFile:cachePathForKey(_directory, @"EGOCache.plist")] mutableCopy];
if(!_cacheInfo) {
_cacheInfo = [[NSMutableDictionary alloc] init];
}
[[NSFileManager defaultManager] createDirectoryAtPath:_directory withIntermediateDirectories:YES attributes:nil error:NULL];
NSTimeInterval now = [[NSDate date] timeIntervalSinceReferenceDate];
NSMutableArray* removedKeys = [[NSMutableArray alloc] init];
for(NSString* key in _cacheInfo) {
if([_cacheInfo[key] timeIntervalSinceReferenceDate] <= now) {
[[NSFileManager defaultManager] removeItemAtPath:cachePathForKey(_directory, key) error:NULL];
[removedKeys addObject:key];
}
}
[_cacheInfo removeObjectsForKeys:removedKeys];
self.frozenCacheInfo = _cacheInfo;
[self setDefaultTimeoutInterval:86400];
}
return self;
}
- (void)clearCache {
dispatch_sync(_cacheInfoQueue, ^{
for(NSString* key in _cacheInfo) {
[[NSFileManager defaultManager] removeItemAtPath:cachePathForKey(_directory, key) error:NULL];
}
[_cacheInfo removeAllObjects];
dispatch_sync(_frozenCacheInfoQueue, ^{
self.frozenCacheInfo = [_cacheInfo copy];
});
[self setNeedsSave];
});
}
- (void)removeCacheForKey:(NSString*)key {
CHECK_FOR_EGOCACHE_PLIST();
dispatch_async(_diskQueue, ^{
[[NSFileManager defaultManager] removeItemAtPath:cachePathForKey(_directory, key) error:NULL];
});
[self setCacheTimeoutInterval:0 forKey:key];
}
- (BOOL)hasCacheForKey:(NSString*)key {
NSDate* date = [self dateForKey:key];
if(date == nil) return NO;
if([date timeIntervalSinceReferenceDate] < CFAbsoluteTimeGetCurrent()) return NO;
return [[NSFileManager defaultManager] fileExistsAtPath:cachePathForKey(_directory, key)];
}
- (NSDate*)dateForKey:(NSString*)key {
__block NSDate* date = nil;
dispatch_sync(_frozenCacheInfoQueue, ^{
date = (self.frozenCacheInfo)[key];
});
return date;
}
- (NSArray*)allKeys {
__block NSArray* keys = nil;
dispatch_sync(_frozenCacheInfoQueue, ^{
keys = [self.frozenCacheInfo allKeys];
});
return keys;
}
- (void)setCacheTimeoutInterval:(NSTimeInterval)timeoutInterval forKey:(NSString*)key {
NSDate* date = timeoutInterval > 0 ? [NSDate dateWithTimeIntervalSinceNow:timeoutInterval] : nil;
// Temporarily store in the frozen state for quick reads
dispatch_sync(_frozenCacheInfoQueue, ^{
NSMutableDictionary* info = [self.frozenCacheInfo mutableCopy];
if(date) {
info[key] = date;
} else {
[info removeObjectForKey:key];
}
self.frozenCacheInfo = info;
});
// Save the final copy (this may be blocked by other operations)
dispatch_async(_cacheInfoQueue, ^{
if(date) {
_cacheInfo[key] = date;
} else {
[_cacheInfo removeObjectForKey:key];
}
dispatch_sync(_frozenCacheInfoQueue, ^{
self.frozenCacheInfo = [_cacheInfo copy];
});
[self setNeedsSave];
});
}
#pragma mark -
#pragma mark Copy file methods
- (void)copyFilePath:(NSString*)filePath asKey:(NSString*)key {
[self copyFilePath:filePath asKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)copyFilePath:(NSString*)filePath asKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
dispatch_async(_diskQueue, ^{
[[NSFileManager defaultManager] copyItemAtPath:filePath toPath:cachePathForKey(_directory, key) error:NULL];
});
[self setCacheTimeoutInterval:timeoutInterval forKey:key];
}
#pragma mark -
#pragma mark Data methods
- (void)setData:(NSData*)data forKey:(NSString*)key {
[self setData:data forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setData:(NSData*)data forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
CHECK_FOR_EGOCACHE_PLIST();
NSString* cachePath = cachePathForKey(_directory, key);
dispatch_async(_diskQueue, ^{
[data writeToFile:cachePath atomically:YES];
});
[self setCacheTimeoutInterval:timeoutInterval forKey:key];
}
- (void)setNeedsSave {
dispatch_async(_cacheInfoQueue, ^{
if(_needsSave) return;
_needsSave = YES;
double delayInSeconds = 0.5;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, _cacheInfoQueue, ^(void){
if(!_needsSave) return;
[_cacheInfo writeToFile:cachePathForKey(_directory, @"EGOCache.plist") atomically:YES];
_needsSave = NO;
});
});
}
- (NSData*)dataForKey:(NSString*)key {
if([self hasCacheForKey:key]) {
return [NSData dataWithContentsOfFile:cachePathForKey(_directory, key) options:0 error:NULL];
} else {
return nil;
}
}
#pragma mark -
#pragma mark String methods
- (NSString*)stringForKey:(NSString*)key {
return [[NSString alloc] initWithData:[self dataForKey:key] encoding:NSUTF8StringEncoding];
}
- (void)setString:(NSString*)aString forKey:(NSString*)key {
[self setString:aString forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setString:(NSString*)aString forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
[self setData:[aString dataUsingEncoding:NSUTF8StringEncoding] forKey:key withTimeoutInterval:timeoutInterval];
}
#pragma mark -
#pragma mark Image methds
#if TARGET_OS_IPHONE
- (UIImage*)imageForKey:(NSString*)key {
UIImage* image = nil;
@try {
image = [NSKeyedUnarchiver unarchiveObjectWithFile:cachePathForKey(_directory, key)];
} @catch (NSException* e) {
// Surpress any unarchiving exceptions and continue with nil
}
return image;
}
- (void)setImage:(UIImage*)anImage forKey:(NSString*)key {
[self setImage:anImage forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setImage:(UIImage*)anImage forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
@try {
// Using NSKeyedArchiver preserves all information such as scale, orientation, and the proper image format instead of saving everything as pngs
[self setData:[NSKeyedArchiver archivedDataWithRootObject:anImage] forKey:key withTimeoutInterval:timeoutInterval];
} @catch (NSException* e) {
// Something went wrong, but we'll fail silently.
}
}
#else
- (NSImage*)imageForKey:(NSString*)key {
return [[NSImage alloc] initWithData:[self dataForKey:key]];
}
- (void)setImage:(NSImage*)anImage forKey:(NSString*)key {
[self setImage:anImage forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setImage:(NSImage*)anImage forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
[self setData:[[NSBitmapImageRep imageRepWithData:anImage.TIFFRepresentation] representationUsingType:NSPNGFileType properties:@{ }] forKey:key withTimeoutInterval:timeoutInterval];
}
#endif
#pragma mark -
#pragma mark Property List methods
- (NSData*)plistForKey:(NSString*)key; {
NSData* plistData = [self dataForKey:key];
return [NSPropertyListSerialization propertyListWithData:plistData options:NSPropertyListImmutable format:nil error:nil];
}
- (void)setPlist:(id)plistObject forKey:(NSString*)key; {
[self setPlist:plistObject forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setPlist:(id)plistObject forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval; {
// Binary plists are used over XML for better performance
NSData* plistData = [NSPropertyListSerialization dataWithPropertyList:plistObject format:NSPropertyListBinaryFormat_v1_0 options:0 error:nil];
if(plistData != nil) {
[self setData:plistData forKey:key withTimeoutInterval:timeoutInterval];
}
}
#pragma mark -
#pragma mark Object methods
- (id<NSCoding>)objectForKey:(NSString*)key {
if([self hasCacheForKey:key]) {
return [NSKeyedUnarchiver unarchiveObjectWithData:[self dataForKey:key]];
} else {
return nil;
}
}
- (void)setObject:(id<NSCoding>)anObject forKey:(NSString*)key {
[self setObject:anObject forKey:key withTimeoutInterval:self.defaultTimeoutInterval];
}
- (void)setObject:(id<NSCoding>)anObject forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval {
[self setData:[NSKeyedArchiver archivedDataWithRootObject:anObject] forKey:key withTimeoutInterval:timeoutInterval];
}
@end
@@ -0,0 +1,81 @@
//
// UIImage+WaterMark.h
// PictureWatermark
//
// Created by AD-iOS on 15/8/3.
// Copyright (c) 2015年 Adinnet. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (WaterMark)
/**
* 给图片加水印图片
*
* @param image 水印图片
* @param imgRect 水印图片所在位置,大小
* @param alpha 水印图片的透明度,0~1之间,透明度太大会完全遮盖被加水印图片的那一部分
*
* @return 加完水印的图片
*/
- (UIImage*)imageWaterMarkWithImage:(UIImage *)image imageRect:(CGRect)imgRect alpha:(CGFloat)alpha;
/**
* 同上
*
* @param image 同上
* @param imgPoint 水印图片(0,0)所在位置
* @param alpha 同上
*
* @return 同上
*/
- (UIImage*)imageWaterMarkWithImage:(UIImage*)image imagePoint:(CGPoint)imgPoint alpha:(CGFloat)alpha;
/**
* 给图片加文字水印
*
* @param str 水印文字
* @param strRect 文字所在的位置大小
* @param attri 文字的相关属性,自行设置
*
* @return 加完水印文字的图片
*/
- (UIImage*)imageWaterMarkWithString:(NSString*)str rect:(CGRect)strRect attribute:(NSDictionary *)attri;
/**
* 同上
*
* @param str 同上
* @param strPoint 文字(0,0)点所在位置
* @param attri 同上
*
* @return 同上
*/
- (UIImage*)imageWaterMarkWithString:(NSString*)str point:(CGPoint)strPoint attribute:(NSDictionary*)attri;
/**
* 返回加水印文字和图片的图片
*
* @param str 水印文字
* @param strPoint 文字(0,0)点所在位置
* @param attri 文字属性
* @param image 水印图片
* @param imgPoint 图片(0,0)点所在位置
* @param alpha 透明度
*
* @return 加完水印的图片
*/
- (UIImage*)imageWaterMarkWithString:(NSString*)str point:(CGPoint)strPoint attribute:(NSDictionary*)attri image:(UIImage*)image imagePoint:(CGPoint)imgPoint alpha:(CGFloat)alpha;
/**
* 同上
*
* @param str 同上
* @param strRect 文字的位置大小
* @param attri 同上
* @param image 同上
* @param imgRect 图片的位置大小
* @param alpha 透明度
*
* @return 同上
*/
- (UIImage*)imageWaterMarkWithString:(NSString*)str rect:(CGRect)strRect attribute:(NSDictionary *)attri image:(UIImage *)image imageRect:(CGRect)imgRect alpha:(CGFloat)alpha;
@end
@@ -0,0 +1,70 @@
//
// UIImage+WaterMark.m
// PictureWatermark
//
// Created by AD-iOS on 15/8/3.
// Copyright (c) 2015年 Adinnet. All rights reserved.
//
#import "UIImage+WaterMark.h"
@implementation UIImage (WaterMark)
- (UIImage*)imageWaterMarkWithImage:(UIImage *)image imageRect:(CGRect)imgRect alpha:(CGFloat)alpha
{
return [self imageWaterMarkWithString:nil rect:CGRectZero attribute:nil image:image imageRect:imgRect alpha:alpha];
}
- (UIImage*)imageWaterMarkWithImage:(UIImage*)image imagePoint:(CGPoint)imgPoint alpha:(CGFloat)alpha
{
return [self imageWaterMarkWithString:nil point:CGPointZero attribute:nil image:image imagePoint:imgPoint alpha:alpha];
}
- (UIImage*)imageWaterMarkWithString:(NSString*)str rect:(CGRect)strRect attribute:(NSDictionary *)attri
{
return [self imageWaterMarkWithString:str rect:strRect attribute:attri image:nil imageRect:CGRectZero alpha:0];
}
- (UIImage*)imageWaterMarkWithString:(NSString*)str point:(CGPoint)strPoint attribute:(NSDictionary*)attri
{
return [self imageWaterMarkWithString:str point:strPoint attribute:attri image:nil imagePoint:CGPointZero alpha:0];
}
- (UIImage*)imageWaterMarkWithString:(NSString*)str point:(CGPoint)strPoint attribute:(NSDictionary*)attri image:(UIImage*)image imagePoint:(CGPoint)imgPoint alpha:(CGFloat)alpha
{
UIGraphicsBeginImageContext(self.size);
[self drawAtPoint:CGPointMake(0, 0) blendMode:kCGBlendModeNormal alpha:1.0];
if (image) {
[image drawAtPoint:imgPoint blendMode:kCGBlendModeNormal alpha:alpha];
}
if (str) {
[str drawAtPoint:strPoint withAttributes:attri];
}
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resultImage;
}
- (UIImage*)imageWaterMarkWithString:(NSString*)str rect:(CGRect)strRect attribute:(NSDictionary *)attri image:(UIImage *)image imageRect:(CGRect)imgRect alpha:(CGFloat)alpha
{
UIGraphicsBeginImageContext(self.size);
[self drawInRect:CGRectMake(0, 0, self.size.width, self.size.height) blendMode:kCGBlendModeNormal alpha:1.0];
if (image) {
[image drawInRect:imgRect blendMode:kCGBlendModeNormal alpha:alpha];
}
if ([str isKindOfClass:[NSAttributedString class]])
{
[(NSAttributedString*)str drawInRect:strRect];
}
else if (str) {
[str drawInRect:strRect withAttributes:attri];
}
UIImage *resultImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return resultImage;
}
@end
@@ -117,7 +117,7 @@ methodType url : (NSString *)url
+(void)deviceBindCameraWith:(NSString *)cameraId
userId:(NSNumber *)userId
deviceId:(NSString *)deviceId
deviceId:(DeviceModel *)device
success:(void (^)(id response))success
failure:(void (^)(NSError* err))failure;
@@ -9,6 +9,7 @@
#import "AFNOHeaderHttpTool.h"
#import "AFNetworking.h"
#import "SVProgressHUD.h"
#import "IfishDeviceInfo.h"
#define ContentType @"text/html"
@implementation AFNOHeaderHttpTool
- (instancetype)init
@@ -258,15 +259,20 @@ methodType url : (NSString *)url
+(void)deviceBindCameraWith:(NSString *)cameraId
userId:(NSNumber *)userId
deviceId:(NSString *)deviceId
deviceId:(DeviceModel *)device
success:(void (^)(id response))success
failure:(void (^)(NSError* err))failure
{
NSDictionary*para=@{
@"cameraId":cameraId,
@"deviceId":deviceId,
@"deviceId":device.deviceId,
@"userId": userId
};
NSMutableDictionary*paradic=[[NSMutableDictionary alloc]initWithDictionary:para];
if ([device.type isEqualToString:DECICE_TYPE_XUANDUO3F])
{
paradic[@"type"]=@"1";
}
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:IfishdeviceBindCamera params:para success:success failure:failure];
}
@@ -313,10 +319,24 @@ methodType url : (NSString *)url
failure:(void (^)(NSError* err))failure
{
NSString*macid=[[deviceId componentsSeparatedByString:@"_"] firstObject];
NSString*deviceType=[[deviceId componentsSeparatedByString:@"_"] lastObject];
NSString*type=@"0";//0换水 1杀菌
if ([deviceType isEqualToString:@"3f"])
{
type=@"1";
}
NSDictionary*para=@{
@"deviceId":deviceId,
@"deviceId":macid,
@"waterRemind":waterRemind,
@"remindCycle":remindCycle
@"remindCycle":remindCycle,
@"type":type
};
[AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:kSetRemindWaterInf params:para success:success failure:failure];
@@ -12,6 +12,7 @@
#import "IfishNewsModel.h"
#import "IfishHotBarVc.h"
#import "Xuanduo2fController.h"
#import "IfishP2PMonitorController.h"
@implementation IfishDataUnity
@@ -48,15 +49,57 @@
{
if (dataDic[@"cameraId"])
{
IfishCameraModel *camera=[[IfishCameraModel alloc] initWithDict:dataDic];
[deviceArry insertObject:camera atIndex:0];
[[DataCenter defaultDtacenter]setValue:deviceArry forKey:@"cameraArr"];
if (scanVC)
{
[scanVC dismissViewControllerAnimated:YES completion:^{
IfishP2PMonitorController *p2pVC=[[IfishP2PMonitorController alloc] init];
p2pVC.contact = camera;
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:p2pVC];
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
app1.window.rootViewController=nav;
}];
}
else
{
IfishP2PMonitorController *p2pVC=[[IfishP2PMonitorController alloc] init];
p2pVC.contact = camera;
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:p2pVC];
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
app1.window.rootViewController=nav;
}
}
else
{
DeviceModel*devicemodel=[[DeviceModel alloc]initWithDict:dataDic];
//设备
[deviceArry insertObject:devicemodel atIndex:0];
[[DataCenter defaultDtacenter]setValue:deviceArry forKey:@"deviceInfo"];
if ([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F]) {
NSMutableDictionary*petStores=[[DataCenter defaultDtacenter] valueForKey:@"petStores"];
for (NSMutableArray*array in petStores.allValues) {
[array insertObject:devicemodel atIndex:0];
break;
}
[[DataCenter defaultDtacenter]setValue:petStores forKey:@"petStores"];
[[DataCenter defaultDtacenter].cache setString:devicemodel.macAddress forKey:@"currentPetDevice"];
}
[self initAppCenterVcWith:devicemodel addWithdissMisVc:scanVC];
}
}
@@ -173,6 +216,13 @@
UINavigationController *xuanduo2fNav=[[UINavigationController alloc]initWithRootViewController:xuanduo2fVc];
[UIApplication sharedApplication].delegate.window.rootViewController = xuanduo2fNav;
}
else if([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F]){
//绚多新设备
Xuanduo2fController *xuanduo2fVc = [Xuanduo2fController new];
xuanduo2fVc.currentDevice = devicemodel;
UINavigationController *xuanduo2fNav=[[UINavigationController alloc]initWithRootViewController:xuanduo2fVc];
[UIApplication sharedApplication].delegate.window.rootViewController = xuanduo2fNav;
}
else{
int controlAmount=[devicemodel.controlAmount intValue];
@@ -32,7 +32,9 @@
NSDictionary *userDic=dataDic[@"userInfo"];
UserModel *model=[[UserModel alloc] initWithDict:userDic];
[[DataCenter defaultDtacenter]setValue:model forKey:@"UserLogIn"];
[[DataCenter defaultDtacenter] cacheinit:[model.userId stringValue]];
//金币任务等级
NSDictionary *userAssetDic=dataDic[@"userAsset"];
@@ -88,6 +90,7 @@
NSDictionary *userDic=dataDic[@"userInfo"];
UserModel *model=[[UserModel alloc] initWithDict:userDic];
[[DataCenter defaultDtacenter]setValue:model forKey:@"UserLogIn"];
[[DataCenter defaultDtacenter] cacheinit:[model.userId stringValue]];
NSUserDefaults*userdefult=[NSUserDefaults standardUserDefaults];
if (model.unionId.length) {
[userdefult setObject:model.unionId forKey:@"unionId"];
@@ -31,6 +31,7 @@
#define DECICE_TYPE_XUANDUOOF @"0f" //0x0f//无屏幕
#define DECICE_TYPE_XUANDUO1F @"1f" //0x1f//有屏幕
#define DECICE_TYPE_XUANDUO2F @"2f" //新设备
#define DECICE_TYPE_XUANDUO3F @"3f" //宠物笼
//可丽爱
#define DECICE_TYPE_KELIAI @"aa" //0xaa
@@ -64,7 +64,8 @@
self.clientSocket.userData = SocketOfflineByUser;// 声明是由用户主动切断
[self.clientSocket disconnect];
[self.clientSocket disconnectAfterReadingAndWriting];
self.clientSocket=nil;
}
+4
View File
@@ -240,6 +240,10 @@
{
NSString*hexString=[NSString stringWithFormat:@"%@",[[NSString alloc]initWithFormat:@"%1x",intString]];
siWeihexString=[NSString stringWithFormat:@"00%@",hexString];
if (hexString.length==1)
{
siWeihexString=[NSString stringWithFormat:@"000%@",hexString];
}
}else if (intString>=260)
@@ -157,7 +157,10 @@
NSString*startTimeHex1=[backModel.timer1 substringWithRange:NSMakeRange(4, 4)];
NSString*endTimeHex1=[backModel.timer1 substringWithRange:NSMakeRange(8, 4)];
if (!backModel.timer1)
{
return nil;
}
// 十进制
NSString*startTimeTen1=[dataContorl hexStringToDateString:startTimeHex1];
NSString*endTimeTen1=[dataContorl hexStringToDateString:endTimeHex1];
@@ -124,13 +124,14 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
[self.view makeToast:@"请先连接设备热点"];
return;
}
if ([wifiName rangeOfString:@"ifish"].location!=NSNotFound||[wifiName rangeOfString:@"GW"].location!=NSNotFound) {
if ([wifiName rangeOfString:@"ifish"].location!=NSNotFound||[wifiName rangeOfString:@"GW"].location!=NSNotFound||[wifiName.lowercaseString isEqualToString:@"wlan"]||![wifiName isEqualToString:self.wifiName]) {
//wifi正确,则尝试连接设备
if(self.deviceType==DEVICECAMERA)
{
YooseeNextConnectViewController *nextvc=[[YooseeNextConnectViewController alloc] init];
nextvc.wifiName=self.wifiName;
nextvc.wifiPwd=self.wifiPwd;
nextvc.conectType =conectType_ap;
[self.navigationController pushViewController:nextvc animated:YES];
}
@@ -141,6 +142,7 @@ Assign BOOL isGoChangeWiFi;//更换为设备的WiFi
connecting.bssid = self.bssid;
connecting.wifiName = self.wifiName;
connecting.wifiPassword = self.wifiPwd;
connecting.deviceType=self.deviceType;
[self.navigationController pushViewController:connecting animated:YES];
}

Some files were not shown because too many files have changed in this diff Show More