react-native-blob-util 0.18.3 → 0.18.5
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/README.md
CHANGED
|
@@ -924,12 +924,16 @@ ReactNativeBlobUtil.fetch('POST', 'http://example.com/upload', {'Transfer-Encodi
|
|
|
924
924
|
By default, react-native-blob-util does NOT allow connection to unknown certification provider since it's dangerous. To connect a server with self-signed certification, you need to add `trusty` to `config` explicitly. This function is available for version >= `0.5.3`
|
|
925
925
|
In addition since ``0.16.0`` you'll have to define your own trust manager for android.
|
|
926
926
|
````java
|
|
927
|
+
....
|
|
928
|
+
import com.ReactNativeBlobUtil.ReactNativeBlobUtilUtils;
|
|
929
|
+
...
|
|
930
|
+
|
|
927
931
|
public class MainApplication extends Application implements ReactApplication {
|
|
928
932
|
...
|
|
929
933
|
@Override
|
|
930
934
|
public void onCreate() {
|
|
931
935
|
...
|
|
932
|
-
ReactNativeBlobUtilUtils.sharedTrustManager =
|
|
936
|
+
ReactNativeBlobUtilUtils.sharedTrustManager = x509TrustManager = new X509TrustManager() {
|
|
933
937
|
@Override
|
|
934
938
|
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {
|
|
935
939
|
}
|
package/index.d.ts
CHANGED
|
@@ -525,17 +525,17 @@ export interface IOSApi {
|
|
|
525
525
|
/**
|
|
526
526
|
* Open a file in {@link https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller UIDocumentInteractionController},
|
|
527
527
|
* this is the default document viewer of iOS, supports several kinds of files. On Android, there's an similar method {@link android.actionViewIntent}.
|
|
528
|
-
* @param path This is a required field, the path to the document. The path should NOT
|
|
528
|
+
* @param path This is a required field, the path to the document. The path should NOT contain any scheme prefix.
|
|
529
529
|
* @param {string} scheme URI scheme that needs to support, optional
|
|
530
530
|
*/
|
|
531
531
|
previewDocument(path: string, scheme?: string): void;
|
|
532
532
|
|
|
533
533
|
/**
|
|
534
534
|
* Show options menu for interact with the file.
|
|
535
|
-
* @param path This is a required field, the path to the document. The path should NOT
|
|
535
|
+
* @param path This is a required field, the path to the document. The path should NOT contain any scheme prefix.
|
|
536
536
|
* @param {string} scheme URI scheme that needs to support, optional
|
|
537
537
|
*/
|
|
538
|
-
openDocument(path: string, scheme?: string): void
|
|
538
|
+
openDocument(path: string, scheme?: string): Promise<void>;
|
|
539
539
|
|
|
540
540
|
/**
|
|
541
541
|
* Displays an options menu using [UIDocumentInteractionController](https://developer.apple.com/reference/uikit/uidocumentinteractioncontroller).[presentOptionsMenu](https://developer.apple.com/documentation/uikit/uidocumentinteractioncontroller/1616814-presentoptionsmenu)
|
|
@@ -637,7 +637,7 @@ export interface StatefulPromise<T> extends Promise<T> {
|
|
|
637
637
|
/**
|
|
638
638
|
* Add an event listener which triggers when data receiving from server.
|
|
639
639
|
*/
|
|
640
|
-
progress(callback: (received:
|
|
640
|
+
progress(callback: (received: string, total: string) => void): StatefulPromise<FetchBlobResponse>;
|
|
641
641
|
|
|
642
642
|
/**
|
|
643
643
|
* Add an event listener with custom configuration
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require "json"
|
|
2
|
-
package = JSON.parse(File.read('package.json'))
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
fabric_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
4
|
+
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = package['name']
|
|
@@ -13,24 +13,11 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source = { :git => "https://github.com/RonRadtke/react-native-blob-util" }
|
|
14
14
|
s.author = 'RonRadtke'
|
|
15
15
|
s.source_files = 'ios/**/*.{h,m,mm,swift}'
|
|
16
|
-
s.
|
|
16
|
+
s.platforms = { :ios => "11.0" }
|
|
17
17
|
s.framework = 'AssetsLibrary'
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if ENV["RCT_NEW_ARCH_ENABLED"] == "1"
|
|
22
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
23
|
-
s.pod_target_xcconfig = {
|
|
24
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
25
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
26
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
s.dependency "React-Codegen"
|
|
30
|
-
s.dependency "React-RCTFabric"
|
|
31
|
-
s.dependency "RCT-Folly"
|
|
32
|
-
s.dependency "RCTRequired"
|
|
33
|
-
s.dependency "RCTTypeSafety"
|
|
34
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
19
|
+
if fabric_enabled
|
|
20
|
+
install_modules_dependencies(s)
|
|
35
21
|
end
|
|
22
|
+
|
|
36
23
|
end
|