diff --git a/.DS_Store b/.DS_Store index 1a005dc..bd09151 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore index e6a4dd5..70bb705 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,59 @@ + +# Created by https://www.gitignore.io/api/osx,xcode,carthage,cocoapods + +### Carthage ### +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +### CocoaPods ### +## CocoaPods GitIgnore Template + +# CocoaPods - Only use to conserve bandwidth / Save time on Pushing +# - Also handy if you have a lage number of dependant pods +# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGONRE THE LOCK FILE +Pods/ + +### OSX ### +*.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Xcode ### # Xcode # +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated build/ +DerivedData/ + +## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -9,21 +62,18 @@ build/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata -*.xccheckout +xcuserdata/ + +## Other *.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate +*.xccheckout +*.xcscmblueprint -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# -Pods/ -Podfile.lock +### Xcode Patch ### +*.xcodeproj/* +!*.xcodeproj/project.pbxproj +!*.xcodeproj/xcshareddata/ +!*.xcworkspace/contents.xcworkspacedata +/*.gcno -.DS_Store +# End of https://www.gitignore.io/api/osx,xcode,carthage,cocoapods \ No newline at end of file diff --git a/NetDiag.xcodeproj/project.pbxproj b/NetDiag.xcodeproj/project.pbxproj index f459996..dfc140e 100644 --- a/NetDiag.xcodeproj/project.pbxproj +++ b/NetDiag.xcodeproj/project.pbxproj @@ -3,230 +3,164 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 48; objects = { /* Begin PBXBuildFile section */ - D65003BADD975D200E6110A1 /* libPods-NetDiagTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 886F2F947AFBF178BDADA11B /* libPods-NetDiagTests.a */; }; - DF2B76EC1C33702D00643678 /* QNNPing.m in Sources */ = {isa = PBXBuildFile; fileRef = DF2B76EB1C33702D00643678 /* QNNPing.m */; }; - DF47525E1C740F0100EEAF4B /* PingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF47525D1C740F0100EEAF4B /* PingTest.m */; }; - DF4752601C743A8600EEAF4B /* ExternalIpTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF47525F1C743A8600EEAF4B /* ExternalIpTest.m */; }; - DF4752621C747D4A00EEAF4B /* TraceRouteTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF4752611C747D4A00EEAF4B /* TraceRouteTest.m */; }; - DF8DFFC51C60951D00174DA9 /* QNNNslookup.m in Sources */ = {isa = PBXBuildFile; fileRef = DF8DFFC41C60951D00174DA9 /* QNNNslookup.m */; }; - DF8DFFD21C61DA1B00174DA9 /* TcpPingTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DF8DFFD11C61DA1B00174DA9 /* TcpPingTest.m */; }; - DF8DFFD41C61DA1B00174DA9 /* libNetDiag.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DFCEC6451C2EC01D0058EE65 /* libNetDiag.a */; }; - DF8DFFDC1C61E6B200174DA9 /* QNNTestLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = DF8DFFDB1C61E6B200174DA9 /* QNNTestLogger.m */; }; - DF9D41FA1C57787500486F87 /* QNNTcpPing.m in Sources */ = {isa = PBXBuildFile; fileRef = DF9D41F91C57787500486F87 /* QNNTcpPing.m */; }; - DF9D41FD1C57789B00486F87 /* QNNUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = DF9D41FC1C57789B00486F87 /* QNNUtil.m */; }; - DF9D42001C5778B600486F87 /* QNNRtmp.m in Sources */ = {isa = PBXBuildFile; fileRef = DF9D41FF1C5778B600486F87 /* QNNRtmp.m */; }; - DF9D42031C5778EA00486F87 /* QNNTraceRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = DF9D42021C5778EA00486F87 /* QNNTraceRoute.m */; }; - DF9D42091C57BEFD00486F87 /* QNNExternalIp.m in Sources */ = {isa = PBXBuildFile; fileRef = DF9D42081C57BEFD00486F87 /* QNNExternalIp.m */; }; - DFA9E1761C6B350800C17111 /* QNNHttp.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9E1751C6B350800C17111 /* QNNHttp.m */; }; - DFA9E1781C6C8FE800C17111 /* RtmpTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9E1771C6C8FE800C17111 /* RtmpTest.m */; }; - DFA9E17A1C6DB06D00C17111 /* NslookupTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9E1791C6DB06D00C17111 /* NslookupTest.m */; }; - DFA9E17E1C708A0000C17111 /* QNNHttpTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DFA9E17D1C708A0000C17111 /* QNNHttpTest.m */; }; - DFCEC6491C2EC01D0058EE65 /* QNNetDiag.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DFCEC6481C2EC01D0058EE65 /* QNNetDiag.h */; }; - FD5C54271DF7180E006C4F17 /* QNNQue.m in Sources */ = {isa = PBXBuildFile; fileRef = FD5C54261DF7180E006C4F17 /* QNNQue.m */; }; + 03402A0A1F9DB6ED00146591 /* QNNExternalIp.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F81F9DA17700500E6D /* QNNExternalIp.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A0B1F9DB6ED00146591 /* QNNExternalIp.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163F01F9DA17700500E6D /* QNNExternalIp.m */; }; + 03402A0C1F9DB6ED00146591 /* QNNHttp.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163FC1F9DA17700500E6D /* QNNHttp.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A0D1F9DB6ED00146591 /* QNNHttp.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163EE1F9DA17700500E6D /* QNNHttp.m */; }; + 03402A0E1F9DB6ED00146591 /* QNNNslookup.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F91F9DA17700500E6D /* QNNNslookup.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A0F1F9DB6ED00146591 /* QNNNslookup.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163F61F9DA17700500E6D /* QNNNslookup.m */; }; + 03402A101F9DB6ED00146591 /* QNNPing.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F51F9DA17700500E6D /* QNNPing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A111F9DB6ED00146591 /* QNNPing.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163EF1F9DA17700500E6D /* QNNPing.m */; }; + 03402A121F9DB6ED00146591 /* QNNProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F11F9DA17700500E6D /* QNNProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A131F9DB6ED00146591 /* QNNQue.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163FB1F9DA17700500E6D /* QNNQue.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A141F9DB6ED00146591 /* QNNQue.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163F41F9DA17700500E6D /* QNNQue.m */; }; + 03402A151F9DB6ED00146591 /* QNNRtmp.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F21F9DA17700500E6D /* QNNRtmp.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A161F9DB6ED00146591 /* QNNRtmp.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163FA1F9DA17700500E6D /* QNNRtmp.m */; }; + 03402A171F9DB6ED00146591 /* QNNTcpPing.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163F31F9DA17700500E6D /* QNNTcpPing.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A181F9DB6ED00146591 /* QNNTcpPing.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163FD1F9DA17700500E6D /* QNNTcpPing.m */; }; + 03402A191F9DB6ED00146591 /* QNNTraceRoute.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163EC1F9DA17600500E6D /* QNNTraceRoute.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A1A1F9DB6ED00146591 /* QNNTraceRoute.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163FE1F9DA17700500E6D /* QNNTraceRoute.m */; }; + 03402A1B1F9DB6ED00146591 /* QNNUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163ED1F9DA17700500E6D /* QNNUtil.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 03402A1C1F9DB6ED00146591 /* QNNUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 035163FF1F9DA17700500E6D /* QNNUtil.m */; }; + 035163E51F9DA15700500E6D /* NetDiag.h in Headers */ = {isa = PBXBuildFile; fileRef = 035163E31F9DA15700500E6D /* NetDiag.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 035164021F9DA18900500E6D /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 035164011F9DA18900500E6D /* libresolv.tbd */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - DF8DFFD51C61DA1B00174DA9 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = DFCEC63D1C2EC01D0058EE65 /* Project object */; - proxyType = 1; - remoteGlobalIDString = DFCEC6441C2EC01D0058EE65; - remoteInfo = NetDiag; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - DFCEC6431C2EC01D0058EE65 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = "include/$(PRODUCT_NAME)"; - dstSubfolderSpec = 16; - files = ( - DFCEC6491C2EC01D0058EE65 /* QNNetDiag.h in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ - 02A06F48990E40305AB91EEC /* Pods-NetDiagTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NetDiagTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests.release.xcconfig"; sourceTree = ""; }; - 886F2F947AFBF178BDADA11B /* libPods-NetDiagTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NetDiagTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - A71873FE0ACF7FD871CA4EC5 /* Pods-NetDiagTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NetDiagTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests.debug.xcconfig"; sourceTree = ""; }; - DF2B76EA1C33702D00643678 /* QNNPing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNPing.h; sourceTree = ""; }; - DF2B76EB1C33702D00643678 /* QNNPing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNPing.m; sourceTree = ""; }; - DF2B76ED1C33706900643678 /* QNNProtocols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNProtocols.h; sourceTree = ""; }; - DF47525D1C740F0100EEAF4B /* PingTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PingTest.m; sourceTree = ""; }; - DF47525F1C743A8600EEAF4B /* ExternalIpTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExternalIpTest.m; sourceTree = ""; }; - DF4752611C747D4A00EEAF4B /* TraceRouteTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TraceRouteTest.m; sourceTree = ""; }; - DF8DFFC31C60951D00174DA9 /* QNNNslookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNNslookup.h; sourceTree = ""; }; - DF8DFFC41C60951D00174DA9 /* QNNNslookup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNNslookup.m; sourceTree = ""; }; - DF8DFFCF1C61DA1B00174DA9 /* NetDiagTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NetDiagTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - DF8DFFD11C61DA1B00174DA9 /* TcpPingTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TcpPingTest.m; sourceTree = ""; }; - DF8DFFD31C61DA1B00174DA9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - DF8DFFDA1C61E6B200174DA9 /* QNNTestLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNTestLogger.h; sourceTree = ""; }; - DF8DFFDB1C61E6B200174DA9 /* QNNTestLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNTestLogger.m; sourceTree = ""; }; - DF9D41F81C57787500486F87 /* QNNTcpPing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNTcpPing.h; sourceTree = ""; }; - DF9D41F91C57787500486F87 /* QNNTcpPing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNTcpPing.m; sourceTree = ""; }; - DF9D41FB1C57789B00486F87 /* QNNUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNUtil.h; sourceTree = ""; }; - DF9D41FC1C57789B00486F87 /* QNNUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNUtil.m; sourceTree = ""; }; - DF9D41FE1C5778B600486F87 /* QNNRtmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNRtmp.h; sourceTree = ""; }; - DF9D41FF1C5778B600486F87 /* QNNRtmp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNRtmp.m; sourceTree = ""; }; - DF9D42011C5778EA00486F87 /* QNNTraceRoute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNTraceRoute.h; sourceTree = ""; }; - DF9D42021C5778EA00486F87 /* QNNTraceRoute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNTraceRoute.m; sourceTree = ""; }; - DF9D42071C57BEFD00486F87 /* QNNExternalIp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNExternalIp.h; sourceTree = ""; }; - DF9D42081C57BEFD00486F87 /* QNNExternalIp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNExternalIp.m; sourceTree = ""; }; - DFA9E1741C6B350800C17111 /* QNNHttp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNHttp.h; sourceTree = ""; }; - DFA9E1751C6B350800C17111 /* QNNHttp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNHttp.m; sourceTree = ""; }; - DFA9E1771C6C8FE800C17111 /* RtmpTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RtmpTest.m; sourceTree = ""; }; - DFA9E1791C6DB06D00C17111 /* NslookupTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NslookupTest.m; sourceTree = ""; }; - DFA9E17B1C6DB22C00C17111 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; - DFA9E17D1C708A0000C17111 /* QNNHttpTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNHttpTest.m; sourceTree = ""; }; - DFCEC6451C2EC01D0058EE65 /* libNetDiag.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libNetDiag.a; sourceTree = BUILT_PRODUCTS_DIR; }; - DFCEC6481C2EC01D0058EE65 /* QNNetDiag.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNetDiag.h; sourceTree = ""; }; - FD5C54261DF7180E006C4F17 /* QNNQue.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QNNQue.m; sourceTree = ""; }; - FD5C54281DF71834006C4F17 /* QNNQue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QNNQue.h; sourceTree = ""; }; + 035163E01F9DA15700500E6D /* NetDiag.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = NetDiag.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 035163E31F9DA15700500E6D /* NetDiag.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NetDiag.h; sourceTree = ""; }; + 035163E41F9DA15700500E6D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 035163EC1F9DA17600500E6D /* QNNTraceRoute.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNTraceRoute.h; sourceTree = ""; }; + 035163ED1F9DA17700500E6D /* QNNUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNUtil.h; sourceTree = ""; }; + 035163EE1F9DA17700500E6D /* QNNHttp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNHttp.m; sourceTree = ""; }; + 035163EF1F9DA17700500E6D /* QNNPing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNPing.m; sourceTree = ""; }; + 035163F01F9DA17700500E6D /* QNNExternalIp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNExternalIp.m; sourceTree = ""; }; + 035163F11F9DA17700500E6D /* QNNProtocols.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNProtocols.h; sourceTree = ""; }; + 035163F21F9DA17700500E6D /* QNNRtmp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNRtmp.h; sourceTree = ""; }; + 035163F31F9DA17700500E6D /* QNNTcpPing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNTcpPing.h; sourceTree = ""; }; + 035163F41F9DA17700500E6D /* QNNQue.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNQue.m; sourceTree = ""; }; + 035163F51F9DA17700500E6D /* QNNPing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNPing.h; sourceTree = ""; }; + 035163F61F9DA17700500E6D /* QNNNslookup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNNslookup.m; sourceTree = ""; }; + 035163F81F9DA17700500E6D /* QNNExternalIp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNExternalIp.h; sourceTree = ""; }; + 035163F91F9DA17700500E6D /* QNNNslookup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNNslookup.h; sourceTree = ""; }; + 035163FA1F9DA17700500E6D /* QNNRtmp.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNRtmp.m; sourceTree = ""; }; + 035163FB1F9DA17700500E6D /* QNNQue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNQue.h; sourceTree = ""; }; + 035163FC1F9DA17700500E6D /* QNNHttp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QNNHttp.h; sourceTree = ""; }; + 035163FD1F9DA17700500E6D /* QNNTcpPing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNTcpPing.m; sourceTree = ""; }; + 035163FE1F9DA17700500E6D /* QNNTraceRoute.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNTraceRoute.m; sourceTree = ""; }; + 035163FF1F9DA17700500E6D /* QNNUtil.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QNNUtil.m; sourceTree = ""; }; + 035164011F9DA18900500E6D /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - DF8DFFCC1C61DA1B00174DA9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - DF8DFFD41C61DA1B00174DA9 /* libNetDiag.a in Frameworks */, - D65003BADD975D200E6110A1 /* libPods-NetDiagTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DFCEC6421C2EC01D0058EE65 /* Frameworks */ = { + 035163DC1F9DA15700500E6D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 035164021F9DA18900500E6D /* libresolv.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0C89E1473FBE347E3F476144 /* Pods */ = { + 035163D61F9DA15700500E6D = { isa = PBXGroup; children = ( - A71873FE0ACF7FD871CA4EC5 /* Pods-NetDiagTests.debug.xcconfig */, - 02A06F48990E40305AB91EEC /* Pods-NetDiagTests.release.xcconfig */, + 035163E21F9DA15700500E6D /* NetDiag */, + 035163E11F9DA15700500E6D /* Products */, + 035164001F9DA18800500E6D /* Frameworks */, ); - name = Pods; sourceTree = ""; }; - 7EC51E005E7B857726052BEF /* Frameworks */ = { + 035163E11F9DA15700500E6D /* Products */ = { isa = PBXGroup; children = ( - DFA9E17B1C6DB22C00C17111 /* libresolv.tbd */, - 886F2F947AFBF178BDADA11B /* libPods-NetDiagTests.a */, + 035163E01F9DA15700500E6D /* NetDiag.framework */, ); - name = Frameworks; - sourceTree = ""; - }; - DF8DFFD01C61DA1B00174DA9 /* NetDiagTests */ = { - isa = PBXGroup; - children = ( - DF8DFFD11C61DA1B00174DA9 /* TcpPingTest.m */, - DF8DFFD31C61DA1B00174DA9 /* Info.plist */, - DF8DFFDA1C61E6B200174DA9 /* QNNTestLogger.h */, - DF8DFFDB1C61E6B200174DA9 /* QNNTestLogger.m */, - DFA9E1771C6C8FE800C17111 /* RtmpTest.m */, - DFA9E1791C6DB06D00C17111 /* NslookupTest.m */, - DFA9E17D1C708A0000C17111 /* QNNHttpTest.m */, - DF47525D1C740F0100EEAF4B /* PingTest.m */, - DF47525F1C743A8600EEAF4B /* ExternalIpTest.m */, - DF4752611C747D4A00EEAF4B /* TraceRouteTest.m */, - ); - path = NetDiagTests; + name = Products; sourceTree = ""; }; - DFCEC63C1C2EC01D0058EE65 = { + 035163E21F9DA15700500E6D /* NetDiag */ = { isa = PBXGroup; children = ( - DFCEC6471C2EC01D0058EE65 /* NetDiag */, - DF8DFFD01C61DA1B00174DA9 /* NetDiagTests */, - DFCEC6461C2EC01D0058EE65 /* Products */, - 7EC51E005E7B857726052BEF /* Frameworks */, - 0C89E1473FBE347E3F476144 /* Pods */, + 035163EB1F9DA15C00500E6D /* Library */, + 035163E31F9DA15700500E6D /* NetDiag.h */, + 035163E41F9DA15700500E6D /* Info.plist */, ); + path = NetDiag; sourceTree = ""; }; - DFCEC6461C2EC01D0058EE65 /* Products */ = { + 035163EB1F9DA15C00500E6D /* Library */ = { isa = PBXGroup; children = ( - DFCEC6451C2EC01D0058EE65 /* libNetDiag.a */, - DF8DFFCF1C61DA1B00174DA9 /* NetDiagTests.xctest */, - ); - name = Products; + 035163F81F9DA17700500E6D /* QNNExternalIp.h */, + 035163F01F9DA17700500E6D /* QNNExternalIp.m */, + 035163FC1F9DA17700500E6D /* QNNHttp.h */, + 035163EE1F9DA17700500E6D /* QNNHttp.m */, + 035163F91F9DA17700500E6D /* QNNNslookup.h */, + 035163F61F9DA17700500E6D /* QNNNslookup.m */, + 035163F51F9DA17700500E6D /* QNNPing.h */, + 035163EF1F9DA17700500E6D /* QNNPing.m */, + 035163F11F9DA17700500E6D /* QNNProtocols.h */, + 035163FB1F9DA17700500E6D /* QNNQue.h */, + 035163F41F9DA17700500E6D /* QNNQue.m */, + 035163F21F9DA17700500E6D /* QNNRtmp.h */, + 035163FA1F9DA17700500E6D /* QNNRtmp.m */, + 035163F31F9DA17700500E6D /* QNNTcpPing.h */, + 035163FD1F9DA17700500E6D /* QNNTcpPing.m */, + 035163EC1F9DA17600500E6D /* QNNTraceRoute.h */, + 035163FE1F9DA17700500E6D /* QNNTraceRoute.m */, + 035163ED1F9DA17700500E6D /* QNNUtil.h */, + 035163FF1F9DA17700500E6D /* QNNUtil.m */, + ); + path = Library; sourceTree = ""; }; - DFCEC6471C2EC01D0058EE65 /* NetDiag */ = { + 035164001F9DA18800500E6D /* Frameworks */ = { isa = PBXGroup; children = ( - DFCEC6481C2EC01D0058EE65 /* QNNetDiag.h */, - DF2B76EA1C33702D00643678 /* QNNPing.h */, - DF2B76EB1C33702D00643678 /* QNNPing.m */, - DF2B76ED1C33706900643678 /* QNNProtocols.h */, - DF9D41F81C57787500486F87 /* QNNTcpPing.h */, - DF9D41F91C57787500486F87 /* QNNTcpPing.m */, - DF9D41FB1C57789B00486F87 /* QNNUtil.h */, - DF9D41FC1C57789B00486F87 /* QNNUtil.m */, - DF9D41FE1C5778B600486F87 /* QNNRtmp.h */, - DF9D41FF1C5778B600486F87 /* QNNRtmp.m */, - DF9D42011C5778EA00486F87 /* QNNTraceRoute.h */, - DF9D42021C5778EA00486F87 /* QNNTraceRoute.m */, - DF9D42071C57BEFD00486F87 /* QNNExternalIp.h */, - DF9D42081C57BEFD00486F87 /* QNNExternalIp.m */, - DF8DFFC31C60951D00174DA9 /* QNNNslookup.h */, - DF8DFFC41C60951D00174DA9 /* QNNNslookup.m */, - DFA9E1741C6B350800C17111 /* QNNHttp.h */, - DFA9E1751C6B350800C17111 /* QNNHttp.m */, - FD5C54261DF7180E006C4F17 /* QNNQue.m */, - FD5C54281DF71834006C4F17 /* QNNQue.h */, + 035164011F9DA18900500E6D /* libresolv.tbd */, ); - path = NetDiag; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ -/* Begin PBXNativeTarget section */ - DF8DFFCE1C61DA1B00174DA9 /* NetDiagTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = DF8DFFD71C61DA1B00174DA9 /* Build configuration list for PBXNativeTarget "NetDiagTests" */; - buildPhases = ( - 2BC639100A21D41EC8EB8480 /* [CP] Check Pods Manifest.lock */, - 9F9B0470989AE72C26C6B154 /* [CP] Check Pods Manifest.lock */, - DF8DFFCB1C61DA1B00174DA9 /* Sources */, - DF8DFFCC1C61DA1B00174DA9 /* Frameworks */, - DF8DFFCD1C61DA1B00174DA9 /* Resources */, - 6360AC3809EC45C17B6B9A39 /* [CP] Embed Pods Frameworks */, - 7EB1F7F29D34632701B40C83 /* [CP] Copy Pods Resources */, - D1E68BCE0991EB5A44C81ED8 /* Embed Pods Frameworks */, - 3317CC6757C386790A56DF6E /* Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - DF8DFFD61C61DA1B00174DA9 /* PBXTargetDependency */, +/* Begin PBXHeadersBuildPhase section */ + 035163DD1F9DA15700500E6D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 03402A121F9DB6ED00146591 /* QNNProtocols.h in Headers */, + 03402A0A1F9DB6ED00146591 /* QNNExternalIp.h in Headers */, + 03402A131F9DB6ED00146591 /* QNNQue.h in Headers */, + 03402A1B1F9DB6ED00146591 /* QNNUtil.h in Headers */, + 03402A101F9DB6ED00146591 /* QNNPing.h in Headers */, + 035163E51F9DA15700500E6D /* NetDiag.h in Headers */, + 03402A0C1F9DB6ED00146591 /* QNNHttp.h in Headers */, + 03402A171F9DB6ED00146591 /* QNNTcpPing.h in Headers */, + 03402A0E1F9DB6ED00146591 /* QNNNslookup.h in Headers */, + 03402A191F9DB6ED00146591 /* QNNTraceRoute.h in Headers */, + 03402A151F9DB6ED00146591 /* QNNRtmp.h in Headers */, ); - name = NetDiagTests; - productName = NetDiagTests; - productReference = DF8DFFCF1C61DA1B00174DA9 /* NetDiagTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; + runOnlyForDeploymentPostprocessing = 0; }; - DFCEC6441C2EC01D0058EE65 /* NetDiag */ = { +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 035163DF1F9DA15700500E6D /* NetDiag */ = { isa = PBXNativeTarget; - buildConfigurationList = DFCEC64E1C2EC01D0058EE65 /* Build configuration list for PBXNativeTarget "NetDiag" */; + buildConfigurationList = 035163E81F9DA15700500E6D /* Build configuration list for PBXNativeTarget "NetDiag" */; buildPhases = ( - DFCEC6411C2EC01D0058EE65 /* Sources */, - DFCEC6421C2EC01D0058EE65 /* Frameworks */, - DFCEC6431C2EC01D0058EE65 /* CopyFiles */, + 035163DB1F9DA15700500E6D /* Sources */, + 035163DC1F9DA15700500E6D /* Frameworks */, + 035163DD1F9DA15700500E6D /* Headers */, + 035163DE1F9DA15700500E6D /* Resources */, ); buildRules = ( ); @@ -234,46 +168,43 @@ ); name = NetDiag; productName = NetDiag; - productReference = DFCEC6451C2EC01D0058EE65 /* libNetDiag.a */; - productType = "com.apple.product-type.library.static"; + productReference = 035163E01F9DA15700500E6D /* NetDiag.framework */; + productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - DFCEC63D1C2EC01D0058EE65 /* Project object */ = { + 035163D71F9DA15700500E6D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "Qiniu Cloud Storage"; + LastUpgradeCheck = 0900; + ORGANIZATIONNAME = "JR Apps Pty. Ltd."; TargetAttributes = { - DF8DFFCE1C61DA1B00174DA9 = { - CreatedOnToolsVersion = 7.2; - }; - DFCEC6441C2EC01D0058EE65 = { - CreatedOnToolsVersion = 7.2; + 035163DF1F9DA15700500E6D = { + CreatedOnToolsVersion = 9.0; + ProvisioningStyle = Automatic; }; }; }; - buildConfigurationList = DFCEC6401C2EC01D0058EE65 /* Build configuration list for PBXProject "NetDiag" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + buildConfigurationList = 035163DA1F9DA15700500E6D /* Build configuration list for PBXProject "NetDiag" */; + compatibilityVersion = "Xcode 8.0"; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, ); - mainGroup = DFCEC63C1C2EC01D0058EE65; - productRefGroup = DFCEC6461C2EC01D0058EE65 /* Products */; + mainGroup = 035163D61F9DA15700500E6D; + productRefGroup = 035163E11F9DA15700500E6D /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - DFCEC6441C2EC01D0058EE65 /* NetDiag */, - DF8DFFCE1C61DA1B00174DA9 /* NetDiagTests */, + 035163DF1F9DA15700500E6D /* NetDiag */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - DF8DFFCD1C61DA1B00174DA9 /* Resources */ = { + 035163DE1F9DA15700500E6D /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -282,195 +213,62 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 2BC639100A21D41EC8EB8480 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - 3317CC6757C386790A56DF6E /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 6360AC3809EC45C17B6B9A39 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 7EB1F7F29D34632701B40C83 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 9F9B0470989AE72C26C6B154 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - D1E68BCE0991EB5A44C81ED8 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-NetDiagTests/Pods-NetDiagTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ - DF8DFFCB1C61DA1B00174DA9 /* Sources */ = { + 035163DB1F9DA15700500E6D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - DFA9E17A1C6DB06D00C17111 /* NslookupTest.m in Sources */, - DF4752621C747D4A00EEAF4B /* TraceRouteTest.m in Sources */, - DF8DFFDC1C61E6B200174DA9 /* QNNTestLogger.m in Sources */, - DFA9E17E1C708A0000C17111 /* QNNHttpTest.m in Sources */, - DF4752601C743A8600EEAF4B /* ExternalIpTest.m in Sources */, - DF47525E1C740F0100EEAF4B /* PingTest.m in Sources */, - DFA9E1781C6C8FE800C17111 /* RtmpTest.m in Sources */, - DF8DFFD21C61DA1B00174DA9 /* TcpPingTest.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - DFCEC6411C2EC01D0058EE65 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - DF8DFFC51C60951D00174DA9 /* QNNNslookup.m in Sources */, - DF2B76EC1C33702D00643678 /* QNNPing.m in Sources */, - DF9D41FA1C57787500486F87 /* QNNTcpPing.m in Sources */, - FD5C54271DF7180E006C4F17 /* QNNQue.m in Sources */, - DF9D42091C57BEFD00486F87 /* QNNExternalIp.m in Sources */, - DF9D42001C5778B600486F87 /* QNNRtmp.m in Sources */, - DF9D41FD1C57789B00486F87 /* QNNUtil.m in Sources */, - DF9D42031C5778EA00486F87 /* QNNTraceRoute.m in Sources */, - DFA9E1761C6B350800C17111 /* QNNHttp.m in Sources */, + 03402A181F9DB6ED00146591 /* QNNTcpPing.m in Sources */, + 03402A0F1F9DB6ED00146591 /* QNNNslookup.m in Sources */, + 03402A141F9DB6ED00146591 /* QNNQue.m in Sources */, + 03402A161F9DB6ED00146591 /* QNNRtmp.m in Sources */, + 03402A0B1F9DB6ED00146591 /* QNNExternalIp.m in Sources */, + 03402A1A1F9DB6ED00146591 /* QNNTraceRoute.m in Sources */, + 03402A0D1F9DB6ED00146591 /* QNNHttp.m in Sources */, + 03402A111F9DB6ED00146591 /* QNNPing.m in Sources */, + 03402A1C1F9DB6ED00146591 /* QNNUtil.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - DF8DFFD61C61DA1B00174DA9 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = DFCEC6441C2EC01D0058EE65 /* NetDiag */; - targetProxy = DF8DFFD51C61DA1B00174DA9 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - DF8DFFD81C61DA1B00174DA9 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A71873FE0ACF7FD871CA4EC5 /* Pods-NetDiagTests.debug.xcconfig */; - buildSettings = { - INFOPLIST_FILE = NetDiagTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-lresolv", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.NetDiagTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - DF8DFFD91C61DA1B00174DA9 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 02A06F48990E40305AB91EEC /* Pods-NetDiagTests.release.xcconfig */; - buildSettings = { - INFOPLIST_FILE = NetDiagTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - OTHER_LDFLAGS = ( - "$(inherited)", - "-lresolv", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.NetDiagTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - DFCEC64C1C2EC01D0058EE65 /* Debug */ = { + 035163E61F9DA15700500E6D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -484,36 +282,51 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Debug; }; - DFCEC64D1C2EC01D0058EE65 /* Release */ = { + 035163E71F9DA15700500E6D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Developer"; COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; @@ -521,62 +334,79 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.2; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; - DFCEC64F1C2EC01D0058EE65 /* Debug */ = { + 035163E91F9DA15700500E6D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = NetDiag/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.NetDiag; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - DFCEC6501C2EC01D0058EE65 /* Release */ = { + 035163EA1F9DA15700500E6D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - OTHER_LDFLAGS = "-ObjC"; - PRODUCT_NAME = "$(TARGET_NAME)"; + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = NetDiag/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.qiniu.NetDiag; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - DF8DFFD71C61DA1B00174DA9 /* Build configuration list for PBXNativeTarget "NetDiagTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - DF8DFFD81C61DA1B00174DA9 /* Debug */, - DF8DFFD91C61DA1B00174DA9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - DFCEC6401C2EC01D0058EE65 /* Build configuration list for PBXProject "NetDiag" */ = { + 035163DA1F9DA15700500E6D /* Build configuration list for PBXProject "NetDiag" */ = { isa = XCConfigurationList; buildConfigurations = ( - DFCEC64C1C2EC01D0058EE65 /* Debug */, - DFCEC64D1C2EC01D0058EE65 /* Release */, + 035163E61F9DA15700500E6D /* Debug */, + 035163E71F9DA15700500E6D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - DFCEC64E1C2EC01D0058EE65 /* Build configuration list for PBXNativeTarget "NetDiag" */ = { + 035163E81F9DA15700500E6D /* Build configuration list for PBXNativeTarget "NetDiag" */ = { isa = XCConfigurationList; buildConfigurations = ( - DFCEC64F1C2EC01D0058EE65 /* Debug */, - DFCEC6501C2EC01D0058EE65 /* Release */, + 035163E91F9DA15700500E6D /* Debug */, + 035163EA1F9DA15700500E6D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = DFCEC63D1C2EC01D0058EE65 /* Project object */; + rootObject = 035163D71F9DA15700500E6D /* Project object */; } diff --git a/NetDiag.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/NetDiag.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index b86f211..0000000 --- a/NetDiag.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiag.xcscheme b/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiag.xcscheme index c194ef5..45f2815 100644 --- a/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiag.xcscheme +++ b/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiag.xcscheme @@ -1,6 +1,6 @@ @@ -26,28 +26,10 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - - - @@ -55,6 +37,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" @@ -64,8 +47,8 @@ @@ -82,8 +65,8 @@ diff --git a/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiagTests.xcscheme b/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiagTests.xcscheme deleted file mode 100644 index 32d7e92..0000000 --- a/NetDiag.xcodeproj/xcshareddata/xcschemes/NetDiagTests.xcscheme +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NetDiag.xcworkspace/contents.xcworkspacedata b/NetDiag.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index c0a1178..0000000 --- a/NetDiag.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/NetDiag.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/NetDiag.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index 08de0be..0000000 --- a/NetDiag.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded - - - diff --git a/NetDiagTests/Info.plist b/NetDiag/Info.plist similarity index 76% rename from NetDiagTests/Info.plist rename to NetDiag/Info.plist index ba72822..e234e4b 100644 --- a/NetDiagTests/Info.plist +++ b/NetDiag/Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + $(DEVELOPMENT_LANGUAGE) CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,12 +13,12 @@ CFBundleName $(PRODUCT_NAME) CFBundlePackageType - BNDL + FMWK CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? + 1.0.3 CFBundleVersion - 1 + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + diff --git a/NetDiag/QNNExternalIp.h b/NetDiag/Library/QNNExternalIp.h similarity index 88% rename from NetDiag/QNNExternalIp.h rename to NetDiag/Library/QNNExternalIp.h index d4c9735..876c7a3 100644 --- a/NetDiag/QNNExternalIp.h +++ b/NetDiag/Library/QNNExternalIp.h @@ -6,7 +6,7 @@ // Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. // -#import +@import Foundation; @interface QNNExternalIp : NSObject diff --git a/NetDiag/QNNExternalIp.m b/NetDiag/Library/QNNExternalIp.m similarity index 96% rename from NetDiag/QNNExternalIp.m rename to NetDiag/Library/QNNExternalIp.m index 0def350..98c31c9 100644 --- a/NetDiag/QNNExternalIp.m +++ b/NetDiag/Library/QNNExternalIp.m @@ -11,7 +11,7 @@ @implementation QNNExternalIp + (NSString *)externalIp { - NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://whatismyip.akamai.com/"]]; + NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://icanhazip.com/"]]; [urlRequest setHTTPMethod:@"GET"]; NSHTTPURLResponse *response = nil; @@ -26,7 +26,7 @@ + (NSString *)externalIp { if (s == nil) { return @""; } - return s; + return [s stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; } + (NSString *)externalDNS { diff --git a/NetDiag/QNNHttp.h b/NetDiag/Library/QNNHttp.h similarity index 96% rename from NetDiag/QNNHttp.h rename to NetDiag/Library/QNNHttp.h index f21ca2b..18a5e64 100644 --- a/NetDiag/QNNHttp.h +++ b/NetDiag/Library/QNNHttp.h @@ -7,7 +7,7 @@ // #import "QNNProtocols.h" -#import +@import Foundation; @interface QNNHttpResult : NSObject diff --git a/NetDiag/QNNHttp.m b/NetDiag/Library/QNNHttp.m similarity index 100% rename from NetDiag/QNNHttp.m rename to NetDiag/Library/QNNHttp.m diff --git a/NetDiag/QNNNslookup.h b/NetDiag/Library/QNNNslookup.h similarity index 96% rename from NetDiag/QNNNslookup.h rename to NetDiag/Library/QNNNslookup.h index 9610ede..0281388 100644 --- a/NetDiag/QNNNslookup.h +++ b/NetDiag/Library/QNNNslookup.h @@ -7,7 +7,7 @@ // #import "QNNProtocols.h" -#import +@import Foundation; /** * A 记录 diff --git a/NetDiag/QNNNslookup.m b/NetDiag/Library/QNNNslookup.m similarity index 100% rename from NetDiag/QNNNslookup.m rename to NetDiag/Library/QNNNslookup.m diff --git a/NetDiag/QNNPing.h b/NetDiag/Library/QNNPing.h similarity index 97% rename from NetDiag/QNNPing.h rename to NetDiag/Library/QNNPing.h index 6c5f5ef..475fabf 100644 --- a/NetDiag/QNNPing.h +++ b/NetDiag/Library/QNNPing.h @@ -7,7 +7,7 @@ // #import "QNNProtocols.h" -#import +@import Foundation; extern const int kQNNInvalidPingResponse; diff --git a/NetDiag/QNNPing.m b/NetDiag/Library/QNNPing.m similarity index 100% rename from NetDiag/QNNPing.m rename to NetDiag/Library/QNNPing.m diff --git a/NetDiag/QNNProtocols.h b/NetDiag/Library/QNNProtocols.h similarity index 91% rename from NetDiag/QNNProtocols.h rename to NetDiag/Library/QNNProtocols.h index f463989..2342bf6 100644 --- a/NetDiag/QNNProtocols.h +++ b/NetDiag/Library/QNNProtocols.h @@ -6,7 +6,7 @@ // Copyright © 2015年 Qiniu Cloud Storage. All rights reserved. // -#import +@import Foundation; @protocol QNNStopDelegate diff --git a/NetDiag/QNNQue.h b/NetDiag/Library/QNNQue.h similarity index 100% rename from NetDiag/QNNQue.h rename to NetDiag/Library/QNNQue.h diff --git a/NetDiag/QNNQue.m b/NetDiag/Library/QNNQue.m similarity index 100% rename from NetDiag/QNNQue.m rename to NetDiag/Library/QNNQue.m diff --git a/NetDiag/QNNRtmp.h b/NetDiag/Library/QNNRtmp.h similarity index 97% rename from NetDiag/QNNRtmp.h rename to NetDiag/Library/QNNRtmp.h index 9aa0e20..f6750c2 100644 --- a/NetDiag/QNNRtmp.h +++ b/NetDiag/Library/QNNRtmp.h @@ -7,7 +7,7 @@ // #import "QNNProtocols.h" -#import +@import Foundation; extern const int kQNNRtmpServerVersionError; extern const int kQNNRtmpServerSignatureError; diff --git a/NetDiag/QNNRtmp.m b/NetDiag/Library/QNNRtmp.m similarity index 100% rename from NetDiag/QNNRtmp.m rename to NetDiag/Library/QNNRtmp.m diff --git a/NetDiag/QNNTcpPing.h b/NetDiag/Library/QNNTcpPing.h similarity index 97% rename from NetDiag/QNNTcpPing.h rename to NetDiag/Library/QNNTcpPing.h index a5e979f..df125fe 100644 --- a/NetDiag/QNNTcpPing.h +++ b/NetDiag/Library/QNNTcpPing.h @@ -7,7 +7,7 @@ // #import "QNNProtocols.h" -#import +@import Foundation; @interface QNNTcpPingResult : NSObject diff --git a/NetDiag/QNNTcpPing.m b/NetDiag/Library/QNNTcpPing.m similarity index 100% rename from NetDiag/QNNTcpPing.m rename to NetDiag/Library/QNNTcpPing.m diff --git a/NetDiag/QNNTraceRoute.h b/NetDiag/Library/QNNTraceRoute.h similarity index 92% rename from NetDiag/QNNTraceRoute.h rename to NetDiag/Library/QNNTraceRoute.h index d476d9f..7917696 100644 --- a/NetDiag/QNNTraceRoute.h +++ b/NetDiag/Library/QNNTraceRoute.h @@ -6,10 +6,8 @@ // Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. // -#import - #import "QNNProtocols.h" -#import +@import Foundation; @interface QNNTraceRouteResult : NSObject diff --git a/NetDiag/QNNTraceRoute.m b/NetDiag/Library/QNNTraceRoute.m similarity index 97% rename from NetDiag/QNNTraceRoute.m rename to NetDiag/Library/QNNTraceRoute.m index ea2f453..f1558fd 100644 --- a/NetDiag/QNNTraceRoute.m +++ b/NetDiag/Library/QNNTraceRoute.m @@ -131,13 +131,15 @@ - (NSInteger)sendAndRecv:(int)sendSock break; } - struct timeval tv; fd_set readfds; - tv.tv_sec = 3; - tv.tv_usec = 0; + + struct timespec ts; + ts.tv_sec = 3; + ts.tv_nsec = 0; + FD_ZERO(&readfds); FD_SET(icmpSock, &readfds); - select(icmpSock + 1, &readfds, NULL, NULL, &tv); + pselect(icmpSock + 1, &readfds, NULL, NULL, &ts, NULL); if (FD_ISSET(icmpSock, &readfds) > 0) { ssize_t res = recvfrom(icmpSock, buff, sizeof(buff), 0, (struct sockaddr*)&storageAddr, &n); if (res < 0) { diff --git a/NetDiag/QNNUtil.h b/NetDiag/Library/QNNUtil.h similarity index 83% rename from NetDiag/QNNUtil.h rename to NetDiag/Library/QNNUtil.h index 0222222..e2f08c9 100644 --- a/NetDiag/QNNUtil.h +++ b/NetDiag/Library/QNNUtil.h @@ -6,7 +6,7 @@ // Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. // -#import +@import Foundation; @interface QNNUtil : NSObject diff --git a/NetDiag/QNNUtil.m b/NetDiag/Library/QNNUtil.m similarity index 100% rename from NetDiag/QNNUtil.m rename to NetDiag/Library/QNNUtil.m diff --git a/NetDiag/NetDiag.h b/NetDiag/NetDiag.h new file mode 100644 index 0000000..f772304 --- /dev/null +++ b/NetDiag/NetDiag.h @@ -0,0 +1,28 @@ +// +// NetDiag.h +// NetDiag +// +// Created by Josh Luongo on 23/10/17. +// Copyright © 2017 JR Apps Pty. Ltd. All rights reserved. +// + +@import Foundation; + +//! Project version number for NetDiag. +FOUNDATION_EXPORT double NetDiagVersionNumber; + +//! Project version string for NetDiag. +FOUNDATION_EXPORT const unsigned char NetDiagVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/NetDiag/QNNetDiag.h b/NetDiag/QNNetDiag.h deleted file mode 100644 index c49ea70..0000000 --- a/NetDiag/QNNetDiag.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// NetDiag.h -// NetDiag -// -// Created by bailong on 15/12/26. -// Copyright © 2015年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import "QNNProtocols.h" -#import "QNNUtil.h" - -#import "QNNNslookup.h" -#import "QNNPing.h" -#import "QNNTcpPing.h" -#import "QNNTraceRoute.h" - -#import "QNNHttp.h" -#import "QNNRtmp.h" - -#import "QNNExternalIp.h" diff --git a/NetDiagTests/ExternalIpTest.m b/NetDiagTests/ExternalIpTest.m deleted file mode 100644 index b989285..0000000 --- a/NetDiagTests/ExternalIpTest.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// ExternalIpTest.m -// NetDiag -// -// Created by bailong on 16/2/17. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import "QNNExternalIp.h" - -@interface ExternalIpTest : XCTestCase - -@end - -@implementation ExternalIpTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testIpOK { - NSString* ip = [QNNExternalIp externalIp]; - XCTAssertNotNil(ip, @"null ip"); - XCTAssertNotEqualObjects(ip, @"", @"empty ip"); -} - -- (void)testCheckOK { - NSString* data = [QNNExternalIp checkExternal]; - XCTAssertNotNil(data, @"null return"); - XCTAssertNotEqualObjects(data, @"", @"empty data"); - NSLog(@"%@", data); -} - -@end diff --git a/NetDiagTests/NslookupTest.m b/NetDiagTests/NslookupTest.m deleted file mode 100644 index e6f86af..0000000 --- a/NetDiagTests/NslookupTest.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// NslookupTest.m -// NetDiag -// -// Created by bailong on 16/2/12. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import - -#import "QNNNslookup.h" -#import "QNNTestLogger.h" - -@interface NslookupTest : XCTestCase - -@end - -@implementation NslookupTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testOK { - __block BOOL run = NO; - [QNNNslookup start:@"www.baidu.com" output:[[QNNTestLogger alloc] init] complete:^(NSArray* records) { - XCTAssertNotNil(records, @"need result"); - XCTAssert(records.count >= 2, @"max record >= 2"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/NetDiagTests/PingTest.m b/NetDiagTests/PingTest.m deleted file mode 100644 index 1215b32..0000000 --- a/NetDiagTests/PingTest.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// PingTest.m -// NetDiag -// -// Created by bailong on 16/2/17. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import - -#import "QNNPing.h" -#import "QNNTestLogger.h" -#import "QNNTraceRoute.h" - -@interface PingTest : XCTestCase - -@end - -@implementation PingTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testTimeout { - __block BOOL run = NO; - [QNNPing start:@"1.1.1.1" size:100 output:[[QNNTestLogger alloc] init] complete:^(QNNPingResult* r) { - XCTAssertNotNil(r, @"need result"); - run = YES; - }]; - AGWW_WAIT_WHILE(!run, 100.0); - XCTAssert(run, @"PASS"); -} - -- (void)testStop { - __block BOOL run = NO; - id h = [QNNPing start:@"www.qiniu.com" size:100 output:[[QNNTestLogger alloc] init] complete:^(QNNPingResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(kQNNRequestStoped, r.code, @"stop code"); - run = YES; - }]; - [h stop]; - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -- (void)testOK { - __block BOOL run = NO; - [QNNPing start:@"www.baidu.com" size:100 output:[[QNNTestLogger alloc] init] complete:^(QNNPingResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertNotNil(r.ip, @"need ip"); - XCTAssertEqual(0, r.code, @"normal code"); - XCTAssert(r.maxRtt >= r.avgRtt, @"max time >= avg time"); - XCTAssert(r.minRtt <= r.avgRtt, @"min time =< avg time"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/NetDiagTests/QNNHttpTest.m b/NetDiagTests/QNNHttpTest.m deleted file mode 100644 index cdb95aa..0000000 --- a/NetDiagTests/QNNHttpTest.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// QNNHttpTest.m -// NetDiag -// -// Created by bailong on 16/2/14. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import - -#import "QNNHttp.h" -#import "QNNTestLogger.h" - -@interface QNNHttpTest : XCTestCase - -@end - -@implementation QNNHttpTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testOK { - __block BOOL run = NO; - [QNNHttp start:@"http://www.baidu.com/" output:[[QNNTestLogger alloc] init] complete:^(QNNHttpResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertNotNil(r.ip, @"need ip"); - XCTAssertNotNil(r.headers, @"need headers"); - XCTAssertNotNil(r.body, @"need body"); - XCTAssertEqual(200, r.code, @"normal code"); - XCTAssert(r.duration > 0, @"duration > 0"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/NetDiagTests/QNNTestLogger.h b/NetDiagTests/QNNTestLogger.h deleted file mode 100644 index 56677e5..0000000 --- a/NetDiagTests/QNNTestLogger.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// QNTestLogger.h -// NetDiag -// -// Created by bailong on 16/2/3. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import "QNNProtocols.h" - -@interface QNNTestLogger : NSObject - -@end diff --git a/NetDiagTests/QNNTestLogger.m b/NetDiagTests/QNNTestLogger.m deleted file mode 100644 index 93f3df1..0000000 --- a/NetDiagTests/QNNTestLogger.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// QNTestLogger.m -// NetDiag -// -// Created by bailong on 16/2/3. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import "QNNTestLogger.h" - -@implementation QNNTestLogger - -- (void)write:(NSString*)line { - NSLog(@"%@", line); -} - -@end diff --git a/NetDiagTests/RtmpTest.m b/NetDiagTests/RtmpTest.m deleted file mode 100644 index 5f71d47..0000000 --- a/NetDiagTests/RtmpTest.m +++ /dev/null @@ -1,70 +0,0 @@ -// -// RtmpTest.m -// NetDiag -// -// Created by bailong on 16/2/11. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import "QNNRtmp.h" - -#import "QNNTestLogger.h" - -#import - -@interface RtmpTest : XCTestCase - -@end - -@implementation RtmpTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -//- (void)testTimeout { -// __block BOOL run = NO; -// [QNNRtmpHandshake start:@"up.qiniu.com" output:[[QNNTestLogger alloc] init] complete:^(QNNRtmpHandshakeResult* r) { -// XCTAssertNotNil(r, @"need result"); -// XCTAssertEqual(ETIMEDOUT, r.code, @"timeout code"); -// run = YES; -// }]; -// AGWW_WAIT_WHILE(!run, 100.0); -// XCTAssert(run, @"PASS"); -//} - -- (void)testStop { - __block BOOL run = NO; - id h = [QNNRtmpHandshake start:@"www.qiniu.com" output:[[QNNTestLogger alloc] init] complete:^(QNNRtmpHandshakeResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(kQNNRequestStoped, r.code, @"stop code"); - run = YES; - }]; - [h stop]; - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -- (void)testOK { - __block BOOL run = NO; - [QNNRtmpHandshake start:@"live-rtmp.live.miclle.com" output:[[QNNTestLogger alloc] init] complete:^(QNNRtmpHandshakeResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(0, r.code, @"normal code"); - XCTAssert(r.maxTime >= r.avgTime, @"max time >= avg time"); - XCTAssert(r.minTime <= r.avgTime, @"min time =< avg time"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/NetDiagTests/TcpPingTest.m b/NetDiagTests/TcpPingTest.m deleted file mode 100644 index c40967c..0000000 --- a/NetDiagTests/TcpPingTest.m +++ /dev/null @@ -1,72 +0,0 @@ -// -// NetDiagTests.m -// NetDiagTests -// -// Created by bailong on 16/2/3. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import - -#import "QNNTcpPing.h" -#import "QNNTestLogger.h" - -@interface NetDiagTests : XCTestCase - -@end - -@implementation NetDiagTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testFailure { -} - -- (void)testTimeout { - __block BOOL run = NO; - [QNNTcpPing start:@"up.qiniu.com" port:9999 count:2 output:[[QNNTestLogger alloc] init] complete:^(QNNTcpPingResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(ETIMEDOUT, r.code, @"timeout code"); - run = YES; - }]; - AGWW_WAIT_WHILE(!run, 100.0); - XCTAssert(run, @"PASS"); -} - -- (void)testStop { - __block BOOL run = NO; - id h = [QNNTcpPing start:@"www.qiniu.com" output:[[QNNTestLogger alloc] init] complete:^(QNNTcpPingResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(kQNNRequestStoped, r.code, @"stop code"); - run = YES; - }]; - [h stop]; - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -- (void)testOK { - __block BOOL run = NO; - [QNNTcpPing start:@"www.baidu.com" output:[[QNNTestLogger alloc] init] complete:^(QNNTcpPingResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(0, r.code, @"normal code"); - XCTAssert(r.maxTime >= r.avgTime, @"max time >= avg time"); - XCTAssert(r.minTime <= r.avgTime, @"min time =< avg time"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 30.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/NetDiagTests/TraceRouteTest.m b/NetDiagTests/TraceRouteTest.m deleted file mode 100644 index c7be21e..0000000 --- a/NetDiagTests/TraceRouteTest.m +++ /dev/null @@ -1,44 +0,0 @@ -// -// TraceRouteTest.m -// NetDiag -// -// Created by bailong on 16/2/17. -// Copyright © 2016年 Qiniu Cloud Storage. All rights reserved. -// - -#import - -#import - -#import "QNNTestLogger.h" -#import "QNNTraceRoute.h" - -@interface TraceRouteTest : XCTestCase - -@end - -@implementation TraceRouteTest - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testOK { - __block BOOL run = NO; - [QNNTraceRoute start:@"www.akamai.com" output:[[QNNTestLogger alloc] init] complete:^(QNNTraceRouteResult* r) { - XCTAssertNotNil(r, @"need result"); - XCTAssertEqual(0, r.code, @"normal code"); - run = YES; - }]; - - AGWW_WAIT_WHILE(!run, 500.0); - XCTAssert(run, @"PASS"); -} - -@end diff --git a/Podfile b/Podfile deleted file mode 100644 index e105236..0000000 --- a/Podfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' - -target "NetDiagTests" do - pod 'AGAsyncTestHelper/Shorthand' -end - diff --git a/QNNetDiag.podspec b/QNNetDiag.podspec deleted file mode 100644 index 906c684..0000000 --- a/QNNetDiag.podspec +++ /dev/null @@ -1,39 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'QNNetDiag' - s.version = '0.0.6' - s.summary = 'Qiniu Net Diagnostic library' - s.homepage = 'https://github.com/qiniu/iOS-netdiag' - s.social_media_url = 'http://weibo.com/qiniutek' - s.author = 'Qiniu => sdk@qiniu.com' - s.source = {:git => 'https://github.com/qiniu/iOS-netdiag.git', :tag => "v#{s.version}"} - - s.ios.deployment_target = '7.0' - s.libraries = 'resolv' - s.source_files = 'NetDiag/**/*.{h,m}' - s.requires_arc = true - s.license = { :type => 'MIT', :text => <<-LICENSE -The MIT License (MIT) - -Copyright (c) 2012-2016 qiniu.com - -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. - LICENSE - } - -end