react-native-blob-util 0.18.3 → 0.18.4

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 = final X509TrustManager x509TrustManager = new X509TrustManager() {
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 contains any scheme prefix.
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 contains any scheme prefix.
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: number, total: number) => void): StatefulPromise<FetchBlobResponse>;
640
+ progress(callback: (received: string, total: string) => void): StatefulPromise<FetchBlobResponse>;
641
641
 
642
642
  /**
643
643
  * Add an event listener with custom configuration
@@ -29,7 +29,7 @@
29
29
  #import <UIKit/UIKit.h>
30
30
 
31
31
  #if RCT_NEW_ARCH_ENABLED
32
- #import <React-Codegen/ReactNativeBlobUtilSpec/ReactNativeBlobUtilSpec.h>
32
+ #import <ReactNativeBlobUtilSpec/ReactNativeBlobUtilSpec.h>
33
33
  #endif
34
34
 
35
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-blob-util",
3
- "version": "0.18.3",
3
+ "version": "0.18.4",
4
4
  "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5
5
  "main": "index",
6
6
  "scripts": {
@@ -1,7 +1,6 @@
1
1
  require "json"
2
- package = JSON.parse(File.read('package.json'))
3
2
 
4
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
5
4
 
6
5
  Pod::Spec.new do |s|
7
6
  s.name = package['name']
@@ -13,24 +12,9 @@ Pod::Spec.new do |s|
13
12
  s.source = { :git => "https://github.com/RonRadtke/react-native-blob-util" }
14
13
  s.author = 'RonRadtke'
15
14
  s.source_files = 'ios/**/*.{h,m,mm,swift}'
16
- s.platform = :ios, "8.0"
15
+ s.platforms = { :ios => "11.0" }
17
16
  s.framework = 'AssetsLibrary'
18
17
 
19
- s.dependency 'React-Core'
18
+ install_modules_dependencies(s)
20
19
 
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"
35
- end
36
20
  end