@react-native-firebase/storage 26.0.0 → 26.2.0
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/CHANGELOG.md +12 -0
- package/RNFBStorage.podspec +9 -1
- package/dist/module/version.js +1 -1
- package/dist/typescript/lib/index.d.ts +1 -1
- package/dist/typescript/lib/version.d.ts +1 -1
- package/ios/RNFBStorage/RNFBStorageCommon.m +11 -0
- package/ios/RNFBStorage/RNFBStorageHelper.h +113 -0
- package/ios/RNFBStorage/RNFBStorageHelper.m +728 -0
- package/ios/RNFBStorage/RNFBStorageModule.mm +62 -596
- package/lib/version.ts +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [26.2.0](https://github.com/invertase/react-native-firebase/compare/v26.1.0...v26.2.0) (2026-08-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- codegen should be wipe-then-regen ([04bc4e4](https://github.com/invertase/react-native-firebase/commit/04bc4e4cdab9870cb366fd212b2ccb331b0289d6))
|
|
11
|
+
|
|
12
|
+
## [26.1.0](https://github.com/invertase/react-native-firebase/compare/v26.0.0...v26.1.0) (2026-08-03)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **ios:** add SPM dependency resolution support alongside CocoaPods ([#8933](https://github.com/invertase/react-native-firebase/issues/8933)) ([44a7a9a](https://github.com/invertase/react-native-firebase/commit/44a7a9ae7b404f412e9766c0417f1df8fa971a0b))
|
|
17
|
+
|
|
6
18
|
## [26.0.0](https://github.com/invertase/react-native-firebase/compare/v25.1.0...v26.0.0) (2026-07-29)
|
|
7
19
|
|
|
8
20
|
### ⚠ BREAKING CHANGES
|
package/RNFBStorage.podspec
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'json'
|
|
2
|
+
require_relative '../app/firebase_spm'
|
|
2
3
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
3
4
|
appPackage = JSON.parse(File.read(File.join('..', 'app', 'package.json')))
|
|
4
5
|
|
|
@@ -55,7 +56,14 @@ Pod::Spec.new do |s|
|
|
|
55
56
|
end
|
|
56
57
|
|
|
57
58
|
# Firebase dependencies
|
|
58
|
-
s
|
|
59
|
+
firebase_dependency(s, firebase_sdk_version, ['FirebaseStorage'], 'Firebase/Storage')
|
|
60
|
+
|
|
61
|
+
# RNFBStorageCommon.m uses PHAsset/PHAssetResource (Photos.framework) for local
|
|
62
|
+
# asset uploads. See RNFBApp.podspec for why this must be declared explicitly
|
|
63
|
+
# rather than relying on Clang autolinking. iOS/macOS only -- PhotoKit doesn't
|
|
64
|
+
# exist on tvOS.
|
|
65
|
+
s.ios.frameworks = 'Photos'
|
|
66
|
+
s.osx.frameworks = 'Photos'
|
|
59
67
|
|
|
60
68
|
if defined?($RNFirebaseAsStaticFramework)
|
|
61
69
|
Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
|
package/dist/module/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FirebaseApp } from '@react-native-firebase/app';
|
|
2
2
|
import './types/internal';
|
|
3
3
|
import type { EmulatorMockTokenOptions, FirebaseStorage, FullMetadata, ListOptions, ListResult, SettableMetadata, StorageReference, Task, UploadMetadata, UploadResult, UploadTask } from './types/storage';
|
|
4
|
-
export declare const SDK_VERSION = "26.
|
|
4
|
+
export declare const SDK_VERSION = "26.2.0";
|
|
5
5
|
export declare function getStorage(app?: FirebaseApp, bucketUrl?: string): FirebaseStorage;
|
|
6
6
|
export type * from './types/storage';
|
|
7
7
|
export { StringFormat, TaskEvent, TaskState } from './StorageStatics';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const version = "26.
|
|
1
|
+
export declare const version = "26.2.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -16,7 +16,18 @@
|
|
|
16
16
|
*
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
+
#if __has_include(<Firebase/Firebase.h>)
|
|
19
20
|
#import <Firebase/Firebase.h>
|
|
21
|
+
#elif __has_include(<FirebaseStorage/FirebaseStorage-Swift.h>)
|
|
22
|
+
// SPM: FirebaseStorage is a pure-Swift module — there is no
|
|
23
|
+
// FirebaseStorage/FirebaseStorage.h. The generated ObjC interface header is
|
|
24
|
+
// the only way to get FIRStorageReference / FIRStorageMetadata etc.
|
|
25
|
+
#import <FirebaseCore/FirebaseCore.h>
|
|
26
|
+
#import <FirebaseStorage/FirebaseStorage-Swift.h>
|
|
27
|
+
#else
|
|
28
|
+
@import FirebaseCore;
|
|
29
|
+
@import FirebaseStorage;
|
|
30
|
+
#endif
|
|
20
31
|
#import <MobileCoreServices/MobileCoreServices.h>
|
|
21
32
|
|
|
22
33
|
#import "RNFBSharedUtils.h"
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-present Invertase Limited & Contributors
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this library except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#import <Foundation/Foundation.h>
|
|
19
|
+
#import <React/RCTBridgeModule.h>
|
|
20
|
+
|
|
21
|
+
// Plain Objective-C helper (see docs/ios-spm.mdx and
|
|
22
|
+
// okf-bundle/ios-spm-native-imports.md) that owns every call touching
|
|
23
|
+
// `FIRStorage`/`FIRStorageReference` for RNFBStorageModule. This keeps
|
|
24
|
+
// RNFBStorageModule.mm free of Firebase Storage imports, which is required
|
|
25
|
+
// because `FirebaseStorage` is a Swift-only SPM product and `@import` for
|
|
26
|
+
// Swift-only products is unusable from Objective-C++ (.mm) files when C++
|
|
27
|
+
// modules are disabled (required by React Native's JSI headers).
|
|
28
|
+
@interface RNFBStorageHelper : NSObject
|
|
29
|
+
|
|
30
|
+
+ (void)invalidate;
|
|
31
|
+
|
|
32
|
+
+ (void)deleteObject:(NSString *)appName
|
|
33
|
+
url:(NSString *)url
|
|
34
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
35
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
36
|
+
|
|
37
|
+
+ (void)getDownloadURL:(NSString *)appName
|
|
38
|
+
url:(NSString *)url
|
|
39
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
40
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
41
|
+
|
|
42
|
+
+ (void)getMetadata:(NSString *)appName
|
|
43
|
+
url:(NSString *)url
|
|
44
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
45
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
46
|
+
|
|
47
|
+
+ (void)updateMetadata:(NSString *)appName
|
|
48
|
+
url:(NSString *)url
|
|
49
|
+
metadata:(NSDictionary *_Nullable)metadata
|
|
50
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
51
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
52
|
+
|
|
53
|
+
+ (void)list:(NSString *)appName
|
|
54
|
+
url:(NSString *)url
|
|
55
|
+
maxResults:(long)maxResults
|
|
56
|
+
pageToken:(NSString *_Nullable)pageToken
|
|
57
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
58
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
59
|
+
|
|
60
|
+
+ (void)listAll:(NSString *)appName
|
|
61
|
+
url:(NSString *)url
|
|
62
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
63
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
64
|
+
|
|
65
|
+
+ (void)setMaxDownloadRetryTime:(NSString *)appName
|
|
66
|
+
milliseconds:(double)milliseconds
|
|
67
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
68
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
69
|
+
|
|
70
|
+
+ (void)setMaxOperationRetryTime:(NSString *)appName
|
|
71
|
+
milliseconds:(double)milliseconds
|
|
72
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
73
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
74
|
+
|
|
75
|
+
+ (void)setMaxUploadRetryTime:(NSString *)appName
|
|
76
|
+
milliseconds:(double)milliseconds
|
|
77
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
78
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
79
|
+
|
|
80
|
+
+ (void)writeToFile:(NSString *)appName
|
|
81
|
+
url:(NSString *)url
|
|
82
|
+
localFilePath:(NSString *)localFilePath
|
|
83
|
+
taskId:(double)taskId
|
|
84
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
85
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
86
|
+
|
|
87
|
+
+ (void)putFile:(NSString *)appName
|
|
88
|
+
url:(NSString *)url
|
|
89
|
+
localFilePath:(NSString *)localFilePath
|
|
90
|
+
metadata:(NSDictionary *_Nullable)metadata
|
|
91
|
+
taskId:(double)taskId
|
|
92
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
93
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
94
|
+
|
|
95
|
+
+ (void)putString:(NSString *)appName
|
|
96
|
+
url:(NSString *)url
|
|
97
|
+
string:(NSString *)string
|
|
98
|
+
format:(NSString *)format
|
|
99
|
+
metadata:(NSDictionary *_Nullable)metadata
|
|
100
|
+
taskId:(double)taskId
|
|
101
|
+
resolve:(RCTPromiseResolveBlock)resolve
|
|
102
|
+
reject:(RCTPromiseRejectBlock)reject;
|
|
103
|
+
|
|
104
|
+
+ (void)useEmulator:(NSString *)appName
|
|
105
|
+
host:(NSString *)host
|
|
106
|
+
port:(double)port
|
|
107
|
+
bucketUrl:(NSString *)bucketUrl;
|
|
108
|
+
|
|
109
|
+
+ (NSNumber *)setTaskStatus:(NSString *)appName taskId:(double)taskId status:(double)status;
|
|
110
|
+
|
|
111
|
+
+ (NSDictionary *)storageConstantsDictionary;
|
|
112
|
+
|
|
113
|
+
@end
|