react-native-nitro-cookies 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitroCookies.podspec +8 -0
- package/ios/NitroCookies.swift +2 -20
- package/package.json +1 -1
package/NitroCookies.podspec
CHANGED
|
@@ -20,6 +20,14 @@ Pod::Spec.new do |s|
|
|
|
20
20
|
"cpp/**/*.{hpp,cpp}",
|
|
21
21
|
]
|
|
22
22
|
|
|
23
|
+
s.pod_target_xcconfig = {
|
|
24
|
+
"HEADER_SEARCH_PATHS" => [
|
|
25
|
+
"${PODS_ROOT}/RCT-Folly",
|
|
26
|
+
],
|
|
27
|
+
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES",
|
|
28
|
+
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
29
|
+
}
|
|
30
|
+
|
|
23
31
|
s.dependency 'React-jsi'
|
|
24
32
|
s.dependency 'React-callinvoker'
|
|
25
33
|
|
package/ios/NitroCookies.swift
CHANGED
|
@@ -211,16 +211,7 @@ public class HybridNitroCookies: HybridNitroCookiesSpec {
|
|
|
211
211
|
let url = try validateURL(urlString)
|
|
212
212
|
try validateDomain(cookie: cookie, url: url)
|
|
213
213
|
|
|
214
|
-
|
|
215
|
-
var cookieWithDefaults = cookie
|
|
216
|
-
if cookieWithDefaults.path == nil {
|
|
217
|
-
cookieWithDefaults.path = "/"
|
|
218
|
-
}
|
|
219
|
-
if cookieWithDefaults.domain == nil {
|
|
220
|
-
cookieWithDefaults.domain = url.host
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
let httpCookie = try makeHTTPCookie(from: cookieWithDefaults, url: url)
|
|
214
|
+
let httpCookie = try makeHTTPCookie(from: cookie, url: url)
|
|
224
215
|
HTTPCookieStorage.shared.setCookie(httpCookie)
|
|
225
216
|
return true
|
|
226
217
|
}
|
|
@@ -271,16 +262,7 @@ public class HybridNitroCookies: HybridNitroCookiesSpec {
|
|
|
271
262
|
let url = try self.validateURL(urlString)
|
|
272
263
|
try self.validateDomain(cookie: cookie, url: url)
|
|
273
264
|
|
|
274
|
-
|
|
275
|
-
var cookieWithDefaults = cookie
|
|
276
|
-
if cookieWithDefaults.path == nil {
|
|
277
|
-
cookieWithDefaults.path = "/"
|
|
278
|
-
}
|
|
279
|
-
if cookieWithDefaults.domain == nil {
|
|
280
|
-
cookieWithDefaults.domain = url.host
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
let httpCookie = try self.makeHTTPCookie(from: cookieWithDefaults, url: url)
|
|
265
|
+
let httpCookie = try self.makeHTTPCookie(from: cookie, url: url)
|
|
284
266
|
|
|
285
267
|
if useWebKit == true {
|
|
286
268
|
// Use WKHTTPCookieStore
|