├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── RNDnsLookup.podspec
├── android
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── tableau
│ ├── RNDnsLookupModule.java
│ └── RNDnsLookupPackage.java
├── index.d.ts
├── index.js
├── ios
├── RNDnsLookup.h
├── RNDnsLookup.m
├── RNDnsLookup.xcodeproj
│ └── project.pbxproj
└── RNDnsLookup.xcworkspace
│ └── contents.xcworkspacedata
└── package.json
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | # OSX
3 | #
4 | .DS_Store
5 |
6 | # node.js
7 | #
8 | node_modules/
9 | npm-debug.log
10 | yarn-error.log
11 |
12 |
13 | # Xcode
14 | #
15 | build/
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 | xcuserdata
25 | *.xccheckout
26 | *.moved-aside
27 | DerivedData
28 | *.hmap
29 | *.ipa
30 | *.xcuserstate
31 | project.xcworkspace
32 |
33 |
34 | # Android/IntelliJ
35 | #
36 | build/
37 | .idea
38 | .gradle
39 | local.properties
40 | *.iml
41 |
42 | # BUCK
43 | buck-out/
44 | \.buckd/
45 | *.keystore
46 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 Tableau
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # react-native-dns-lookup
2 |
3 | 
4 |
5 | A React Native module that leverages iOS and Android native networking libraries to lookup all of the IP addresses associated with a hostname
6 |
7 | ## Usage
8 | ```javascript
9 | import { getIpAddressesForHostname } from 'react-native-dns-lookup';
10 |
11 | // For a given hostname, returns a promise that resolves with an array of strings
12 | // containing all of the ip addresses associated with the hostname.
13 | getIpAddressesForHostname("github.com").then(ipAddresses => console.log(ipAddresses));
14 |
15 | // Output: ["192.30.255.112", "192.30.255.113"]
16 | ```
17 |
18 | ## Installation
19 | ``` bash
20 | $ npm install react-native-dns-lookup --save
21 | ```
22 |
23 | or
24 |
25 | ``` bash
26 | $ yarn add react-native-dns-lookup --save
27 | ```
28 |
29 | # Contributions
30 |
31 | Code contributions and improvements by the community are welcomed!
32 | See the LICENSE file for current open-source licensing and use information.
33 |
34 | Before we can accept pull requests from contributors, we require a signed [Contributor License Agreement (CLA)](http://tableau.github.io/contributing.html),
35 |
--------------------------------------------------------------------------------
/RNDnsLookup.podspec:
--------------------------------------------------------------------------------
1 | require "json"
2 |
3 | package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4 |
5 | Pod::Spec.new do |s|
6 | s.name = "RNDnsLookup"
7 | s.version = package["version"]
8 | s.summary = "RNDnsLookup"
9 |
10 | s.homepage = "https://github.com/tableau/react-native-dns-lookup#readme"
11 | s.license = "MIT"
12 |
13 | s.author = { "Tableau" => "github@tableau.com" }
14 | s.platform = :ios, "7.0"
15 | s.source = { :git => "https://github.com/author/RNDnsLookup.git", :tag => "master" }
16 | s.source_files = "ios/**/*.{h,m}"
17 | s.requires_arc = true
18 |
19 | s.dependency "React"
20 |
21 | end
22 |
23 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | def safeExtGet(prop, fallback) {
4 | rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
5 | }
6 |
7 | buildscript {
8 | repositories {
9 | jcenter()
10 | }
11 |
12 | dependencies {
13 | classpath 'com.android.tools.build:gradle:1.3.1'
14 | }
15 | }
16 |
17 | android {
18 | compileSdkVersion safeExtGet('compileSdkVersion', 23)
19 | buildToolsVersion safeExtGet('buildToolsVersion', "23.0.1")
20 |
21 | defaultConfig {
22 | minSdkVersion safeExtGet('minSdkVersion', 16)
23 | targetSdkVersion safeExtGet('targetSdkVersion', 22)
24 | versionCode 1
25 | versionName "1.0"
26 | }
27 | lintOptions {
28 | abortOnError false
29 | }
30 | }
31 |
32 | repositories {
33 | mavenCentral()
34 | }
35 |
36 | dependencies {
37 | implementation 'com.facebook.react:react-native:+'
38 | }
39 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/android/src/main/java/com/tableau/RNDnsLookupModule.java:
--------------------------------------------------------------------------------
1 |
2 | package com.tableau;
3 |
4 | import com.facebook.react.bridge.Arguments;
5 | import com.facebook.react.bridge.BaseJavaModule;
6 | import com.facebook.react.bridge.Promise;
7 | import com.facebook.react.bridge.ReactApplicationContext;
8 | import com.facebook.react.bridge.ReactMethod;
9 | import com.facebook.react.bridge.ReadableArray;
10 | import com.facebook.react.bridge.ReadableNativeArray;
11 | import com.facebook.react.bridge.WritableArray;
12 |
13 | import java.net.InetAddress;
14 |
15 | /***
16 | * Class RNDnsLookup is used to get the ip addresses for a hostname.
17 | *
18 | */
19 | public class RNDnsLookupModule extends BaseJavaModule {
20 |
21 |
22 | public RNDnsLookupModule(ReactApplicationContext context) {}
23 |
24 | @ReactMethod
25 | public void getIpAddresses(String hostname, Promise promise) {
26 | if (hostname == null || promise == null) {
27 | promise.reject(new Error("Arguments cannot be null"));
28 | }
29 |
30 | try {
31 | InetAddress[] rawAddresses = InetAddress.getAllByName(hostname);
32 | WritableArray addresses = Arguments.createArray();
33 | for (int i = 0; i < rawAddresses.length; i++) {
34 | addresses.pushString(rawAddresses[i].getHostAddress());
35 | }
36 | promise.resolve(addresses);
37 | } catch (Exception e) {
38 | promise.reject(e);
39 | }
40 | }
41 |
42 | @Override
43 | public String getName() {
44 | return "RNDnsLookup";
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/android/src/main/java/com/tableau/RNDnsLookupPackage.java:
--------------------------------------------------------------------------------
1 |
2 | package com.tableau;
3 |
4 | import com.facebook.react.ReactPackage;
5 | import com.facebook.react.bridge.NativeModule;
6 | import com.facebook.react.bridge.ReactApplicationContext;
7 | import com.facebook.react.uimanager.ViewManager;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Collections;
11 | import java.util.List;
12 |
13 | public class RNDnsLookupPackage implements ReactPackage {
14 | @Override
15 | public List createViewManagers(ReactApplicationContext reactContext) {
16 | return Collections.emptyList();
17 | }
18 |
19 | @Override
20 | public List createNativeModules(ReactApplicationContext reactContext) {
21 | List modules = new ArrayList<>();
22 |
23 | modules.add(new RNDnsLookupModule(reactContext));
24 |
25 | return modules;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/index.d.ts:
--------------------------------------------------------------------------------
1 | declare module 'react-native-dns-lookup' {
2 | export function getIpAddressesForHostname(hostname: string): Promise>;
3 | }
4 |
--------------------------------------------------------------------------------
/index.js:
--------------------------------------------------------------------------------
1 |
2 | import { NativeModules } from 'react-native';
3 |
4 | const { RNDnsLookup } = NativeModules;
5 |
6 | export function getIpAddressesForHostname(hostname) {
7 | return RNDnsLookup.getIpAddresses(hostname);
8 | }
9 |
--------------------------------------------------------------------------------
/ios/RNDnsLookup.h:
--------------------------------------------------------------------------------
1 |
2 | @interface RNDnsLookup : NSObject
3 | @end
4 |
--------------------------------------------------------------------------------
/ios/RNDnsLookup.m:
--------------------------------------------------------------------------------
1 |
2 | #import
3 |
4 | #import
5 | #import
6 | #import
7 | #import
8 | #import
9 | #import
10 | #import
11 |
12 |
13 | #import "RNDnsLookup.h"
14 |
15 | @interface RNDnsLookup ()
16 | @end
17 |
18 | @implementation RNDnsLookup
19 |
20 | RCT_EXPORT_MODULE()
21 |
22 | RCT_EXPORT_METHOD(getIpAddresses: (NSString *) hostname
23 | resolve: (RCTPromiseResolveBlock) resolve
24 | reject: (RCTPromiseRejectBlock) reject)
25 | {
26 | NSLog(@"[RNDnsLookup] Starting DNS lookup on hostname.");
27 |
28 | NSError * error;
29 | NSArray * addresses = [self performDnsLookup:hostname error:&error];
30 |
31 | if (addresses == nil) {
32 | NSLog(@"[RNDnsLookup] %@", error.userInfo[NSDebugDescriptionErrorKey]);
33 | NSString * errorCode = [NSString stringWithFormat:@"%ld", (long) error.code];
34 | reject(errorCode, error.userInfo[NSDebugDescriptionErrorKey], error);
35 | } else {
36 | NSLog(@"[RNDnsLookup] DNS lookup succeeded.");
37 | resolve(addresses);
38 | }
39 | }
40 |
41 |
42 | // Helper method to perform the DNS lookup.
43 | - (NSArray *) performDnsLookup: (NSString *) hostname
44 | error: (NSError ** _Nonnull) error
45 | {
46 | if (hostname == nil) {
47 | *error = [NSError errorWithDomain:NSGenericException code: kCFHostErrorUnknown userInfo: @{ NSDebugDescriptionErrorKey:@"Hostname cannot be null." }];
48 | return nil;
49 | }
50 |
51 | CFHostRef hostRef = CFHostCreateWithName(kCFAllocatorDefault, (__bridge CFStringRef) hostname);
52 | if (hostRef == nil) {
53 | *error = [NSError errorWithDomain:NSGenericException code: kCFHostErrorUnknown userInfo: @{NSDebugDescriptionErrorKey:@"Failed to create host."}];
54 | return nil;
55 | }
56 |
57 | BOOL didStart = CFHostStartInfoResolution(hostRef, kCFHostAddresses, nil);
58 | if (!didStart) {
59 | *error = [NSError errorWithDomain:NSGenericException code: kCFHostErrorUnknown userInfo: @{NSDebugDescriptionErrorKey:@"Failed to start."}];
60 | CFRelease(hostRef);
61 | return nil;
62 | }
63 |
64 | CFArrayRef addressesRef = CFHostGetAddressing(hostRef, nil);
65 | if (addressesRef == nil) {
66 | *error = [NSError errorWithDomain:NSGenericException code: kCFHostErrorUnknown userInfo: @{NSDebugDescriptionErrorKey:@"Failed to get addresses."}];
67 | CFRelease(hostRef);
68 | return nil;
69 | }
70 |
71 | // Convert these addresses into strings.
72 | NSMutableArray * addresses = [NSMutableArray array];
73 | char ipAddress[INET6_ADDRSTRLEN];
74 | CFIndex numAddresses = CFArrayGetCount(addressesRef);
75 | for (CFIndex currentIndex = 0; currentIndex < numAddresses; currentIndex++) {
76 | struct sockaddr *address = (struct sockaddr *)CFDataGetBytePtr(CFArrayGetValueAtIndex(addressesRef, currentIndex));
77 | getnameinfo(address, address->sa_len, ipAddress, INET6_ADDRSTRLEN, nil, 0, NI_NUMERICHOST);
78 | [addresses addObject:[NSString stringWithCString:ipAddress encoding:NSASCIIStringEncoding]];
79 | }
80 | CFRelease(hostRef);
81 | return addresses;
82 | }
83 |
84 | @end
85 |
--------------------------------------------------------------------------------
/ios/RNDnsLookup.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | B3E7B58A1CC2AC0600A0062D /* RNDnsLookup.m in Sources */ = {isa = PBXBuildFile; fileRef = B3E7B5891CC2AC0600A0062D /* RNDnsLookup.m */; };
11 | /* End PBXBuildFile section */
12 |
13 | /* Begin PBXCopyFilesBuildPhase section */
14 | 58B511D91A9E6C8500147676 /* CopyFiles */ = {
15 | isa = PBXCopyFilesBuildPhase;
16 | buildActionMask = 2147483647;
17 | dstPath = "include/$(PRODUCT_NAME)";
18 | dstSubfolderSpec = 16;
19 | files = (
20 | );
21 | runOnlyForDeploymentPostprocessing = 0;
22 | };
23 | /* End PBXCopyFilesBuildPhase section */
24 |
25 | /* Begin PBXFileReference section */
26 | 134814201AA4EA6300B7C361 /* libRNDnsLookup.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNDnsLookup.a; sourceTree = BUILT_PRODUCTS_DIR; };
27 | B3E7B5881CC2AC0600A0062D /* RNDnsLookup.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RNDnsLookup.h; sourceTree = ""; };
28 | B3E7B5891CC2AC0600A0062D /* RNDnsLookup.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNDnsLookup.m; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 58B511D81A9E6C8500147676 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | );
37 | runOnlyForDeploymentPostprocessing = 0;
38 | };
39 | /* End PBXFrameworksBuildPhase section */
40 |
41 | /* Begin PBXGroup section */
42 | 134814211AA4EA7D00B7C361 /* Products */ = {
43 | isa = PBXGroup;
44 | children = (
45 | 134814201AA4EA6300B7C361 /* libRNDnsLookup.a */,
46 | );
47 | name = Products;
48 | sourceTree = "";
49 | };
50 | 58B511D21A9E6C8500147676 = {
51 | isa = PBXGroup;
52 | children = (
53 | B3E7B5881CC2AC0600A0062D /* RNDnsLookup.h */,
54 | B3E7B5891CC2AC0600A0062D /* RNDnsLookup.m */,
55 | 134814211AA4EA7D00B7C361 /* Products */,
56 | );
57 | sourceTree = "";
58 | };
59 | /* End PBXGroup section */
60 |
61 | /* Begin PBXNativeTarget section */
62 | 58B511DA1A9E6C8500147676 /* RNDnsLookup */ = {
63 | isa = PBXNativeTarget;
64 | buildConfigurationList = 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNDnsLookup" */;
65 | buildPhases = (
66 | 58B511D71A9E6C8500147676 /* Sources */,
67 | 58B511D81A9E6C8500147676 /* Frameworks */,
68 | 58B511D91A9E6C8500147676 /* CopyFiles */,
69 | );
70 | buildRules = (
71 | );
72 | dependencies = (
73 | );
74 | name = RNDnsLookup;
75 | productName = RCTDataManager;
76 | productReference = 134814201AA4EA6300B7C361 /* libRNDnsLookup.a */;
77 | productType = "com.apple.product-type.library.static";
78 | };
79 | /* End PBXNativeTarget section */
80 |
81 | /* Begin PBXProject section */
82 | 58B511D31A9E6C8500147676 /* Project object */ = {
83 | isa = PBXProject;
84 | attributes = {
85 | LastUpgradeCheck = 0830;
86 | ORGANIZATIONNAME = Facebook;
87 | TargetAttributes = {
88 | 58B511DA1A9E6C8500147676 = {
89 | CreatedOnToolsVersion = 6.1.1;
90 | };
91 | };
92 | };
93 | buildConfigurationList = 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNDnsLookup" */;
94 | compatibilityVersion = "Xcode 3.2";
95 | developmentRegion = English;
96 | hasScannedForEncodings = 0;
97 | knownRegions = (
98 | en,
99 | );
100 | mainGroup = 58B511D21A9E6C8500147676;
101 | productRefGroup = 58B511D21A9E6C8500147676;
102 | projectDirPath = "";
103 | projectRoot = "";
104 | targets = (
105 | 58B511DA1A9E6C8500147676 /* RNDnsLookup */,
106 | );
107 | };
108 | /* End PBXProject section */
109 |
110 | /* Begin PBXSourcesBuildPhase section */
111 | 58B511D71A9E6C8500147676 /* Sources */ = {
112 | isa = PBXSourcesBuildPhase;
113 | buildActionMask = 2147483647;
114 | files = (
115 | B3E7B58A1CC2AC0600A0062D /* RNDnsLookup.m in Sources */,
116 | );
117 | runOnlyForDeploymentPostprocessing = 0;
118 | };
119 | /* End PBXSourcesBuildPhase section */
120 |
121 | /* Begin XCBuildConfiguration section */
122 | 58B511ED1A9E6C8500147676 /* Debug */ = {
123 | isa = XCBuildConfiguration;
124 | buildSettings = {
125 | ALWAYS_SEARCH_USER_PATHS = NO;
126 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
127 | CLANG_CXX_LIBRARY = "libc++";
128 | CLANG_ENABLE_MODULES = YES;
129 | CLANG_ENABLE_OBJC_ARC = YES;
130 | CLANG_WARN_BOOL_CONVERSION = YES;
131 | CLANG_WARN_CONSTANT_CONVERSION = YES;
132 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
133 | CLANG_WARN_EMPTY_BODY = YES;
134 | CLANG_WARN_ENUM_CONVERSION = YES;
135 | CLANG_WARN_INFINITE_RECURSION = YES;
136 | CLANG_WARN_INT_CONVERSION = YES;
137 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
138 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
139 | CLANG_WARN_UNREACHABLE_CODE = YES;
140 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
141 | COPY_PHASE_STRIP = NO;
142 | ENABLE_STRICT_OBJC_MSGSEND = YES;
143 | ENABLE_TESTABILITY = YES;
144 | GCC_C_LANGUAGE_STANDARD = gnu99;
145 | GCC_DYNAMIC_NO_PIC = NO;
146 | GCC_NO_COMMON_BLOCKS = YES;
147 | GCC_OPTIMIZATION_LEVEL = 0;
148 | GCC_PREPROCESSOR_DEFINITIONS = (
149 | "DEBUG=1",
150 | "$(inherited)",
151 | );
152 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
153 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
154 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
155 | GCC_WARN_UNDECLARED_SELECTOR = YES;
156 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
157 | GCC_WARN_UNUSED_FUNCTION = YES;
158 | GCC_WARN_UNUSED_VARIABLE = YES;
159 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
160 | MTL_ENABLE_DEBUG_INFO = YES;
161 | ONLY_ACTIVE_ARCH = YES;
162 | SDKROOT = iphoneos;
163 | };
164 | name = Debug;
165 | };
166 | 58B511EE1A9E6C8500147676 /* Release */ = {
167 | isa = XCBuildConfiguration;
168 | buildSettings = {
169 | ALWAYS_SEARCH_USER_PATHS = NO;
170 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
171 | CLANG_CXX_LIBRARY = "libc++";
172 | CLANG_ENABLE_MODULES = YES;
173 | CLANG_ENABLE_OBJC_ARC = YES;
174 | CLANG_WARN_BOOL_CONVERSION = YES;
175 | CLANG_WARN_CONSTANT_CONVERSION = YES;
176 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
177 | CLANG_WARN_EMPTY_BODY = YES;
178 | CLANG_WARN_ENUM_CONVERSION = YES;
179 | CLANG_WARN_INFINITE_RECURSION = YES;
180 | CLANG_WARN_INT_CONVERSION = YES;
181 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
182 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
183 | CLANG_WARN_UNREACHABLE_CODE = YES;
184 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
185 | COPY_PHASE_STRIP = YES;
186 | ENABLE_NS_ASSERTIONS = NO;
187 | ENABLE_STRICT_OBJC_MSGSEND = YES;
188 | GCC_C_LANGUAGE_STANDARD = gnu99;
189 | GCC_NO_COMMON_BLOCKS = YES;
190 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
191 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
192 | GCC_WARN_UNDECLARED_SELECTOR = YES;
193 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
194 | GCC_WARN_UNUSED_FUNCTION = YES;
195 | GCC_WARN_UNUSED_VARIABLE = YES;
196 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
197 | MTL_ENABLE_DEBUG_INFO = NO;
198 | SDKROOT = iphoneos;
199 | VALIDATE_PRODUCT = YES;
200 | };
201 | name = Release;
202 | };
203 | 58B511F01A9E6C8500147676 /* Debug */ = {
204 | isa = XCBuildConfiguration;
205 | buildSettings = {
206 | HEADER_SEARCH_PATHS = (
207 | "$(inherited)",
208 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
209 | "$(SRCROOT)/../../../React/**",
210 | "$(SRCROOT)/../../react-native/React/**",
211 | );
212 | LIBRARY_SEARCH_PATHS = "$(inherited)";
213 | OTHER_LDFLAGS = "-ObjC";
214 | PRODUCT_NAME = RNDnsLookup;
215 | SKIP_INSTALL = YES;
216 | };
217 | name = Debug;
218 | };
219 | 58B511F11A9E6C8500147676 /* Release */ = {
220 | isa = XCBuildConfiguration;
221 | buildSettings = {
222 | HEADER_SEARCH_PATHS = (
223 | "$(inherited)",
224 | /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
225 | "$(SRCROOT)/../../../React/**",
226 | "$(SRCROOT)/../../react-native/React/**",
227 | );
228 | LIBRARY_SEARCH_PATHS = "$(inherited)";
229 | OTHER_LDFLAGS = "-ObjC";
230 | PRODUCT_NAME = RNDnsLookup;
231 | SKIP_INSTALL = YES;
232 | };
233 | name = Release;
234 | };
235 | /* End XCBuildConfiguration section */
236 |
237 | /* Begin XCConfigurationList section */
238 | 58B511D61A9E6C8500147676 /* Build configuration list for PBXProject "RNDnsLookup" */ = {
239 | isa = XCConfigurationList;
240 | buildConfigurations = (
241 | 58B511ED1A9E6C8500147676 /* Debug */,
242 | 58B511EE1A9E6C8500147676 /* Release */,
243 | );
244 | defaultConfigurationIsVisible = 0;
245 | defaultConfigurationName = Release;
246 | };
247 | 58B511EF1A9E6C8500147676 /* Build configuration list for PBXNativeTarget "RNDnsLookup" */ = {
248 | isa = XCConfigurationList;
249 | buildConfigurations = (
250 | 58B511F01A9E6C8500147676 /* Debug */,
251 | 58B511F11A9E6C8500147676 /* Release */,
252 | );
253 | defaultConfigurationIsVisible = 0;
254 | defaultConfigurationName = Release;
255 | };
256 | /* End XCConfigurationList section */
257 | };
258 | rootObject = 58B511D31A9E6C8500147676 /* Project object */;
259 | }
260 |
--------------------------------------------------------------------------------
/ios/RNDnsLookup.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 |
3 |
5 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "react-native-dns-lookup",
3 | "version": "1.0.6",
4 | "author": "Tableau",
5 | "license": "MIT",
6 | "description": "Lookup IP Addresses for a hostname",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/tableau/react-native-dns-lookup.git"
10 | },
11 | "homepage": "https://github.com/tableau/react-native-dns-lookup#readme",
12 | "main": "index.js",
13 | "types": "index.d.ts",
14 | "keywords": [
15 | "dns"
16 | ],
17 | "peerDependencies": {
18 | "react-native": "*"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------