@react-native-firebase/perf 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
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/RNFBPerf.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
|
|
|
@@ -46,7 +47,7 @@ Pod::Spec.new do |s|
|
|
|
46
47
|
end
|
|
47
48
|
|
|
48
49
|
# Firebase dependencies
|
|
49
|
-
s
|
|
50
|
+
firebase_dependency(s, firebase_sdk_version, ['FirebasePerformance'], 'Firebase/Performance')
|
|
50
51
|
|
|
51
52
|
if defined?($RNFirebaseAsStaticFramework)
|
|
52
53
|
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 { FirebasePerformance, HttpMetric, HttpMethod, PerformanceSettings, PerformanceTrace, ScreenTrace } from './types/perf';
|
|
4
|
-
export declare const SDK_VERSION = "26.
|
|
4
|
+
export declare const SDK_VERSION = "26.2.0";
|
|
5
5
|
export declare function getPerformance(app?: FirebaseApp): FirebasePerformance;
|
|
6
6
|
/**
|
|
7
7
|
* Creates a Performance Monitoring instance and applies optional settings.
|
|
@@ -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
|
|
@@ -18,7 +18,23 @@
|
|
|
18
18
|
#import <React/RCTConvert.h>
|
|
19
19
|
#import <React/RCTUtils.h>
|
|
20
20
|
|
|
21
|
+
#if __has_include(<Firebase/Firebase.h>)
|
|
21
22
|
#import <Firebase/Firebase.h>
|
|
23
|
+
#define RNFB_PERF_SDK_AVAILABLE 1
|
|
24
|
+
#elif __has_include(<FirebasePerformance/FirebasePerformance.h>)
|
|
25
|
+
#import <FirebaseCore/FirebaseCore.h>
|
|
26
|
+
#import <FirebasePerformance/FirebasePerformance.h>
|
|
27
|
+
#define RNFB_PERF_SDK_AVAILABLE 1
|
|
28
|
+
#else
|
|
29
|
+
// Product headers absent (typical Mac Catalyst + SPM). Upstream Package.swift
|
|
30
|
+
// omits .macCatalyst from FirebasePerformanceTarget; CocoaPods historically
|
|
31
|
+
// masked this via the Firebase umbrella. Temporary stubs pending
|
|
32
|
+
// https://github.com/firebase/firebase-ios-sdk/pull/16468 (or permanent if
|
|
33
|
+
// upstream declines). Never fall through to @import in this .mm — that
|
|
34
|
+
// requires -fcxx-modules and breaks RN C++/JSI.
|
|
35
|
+
#define RNFB_PERF_SDK_AVAILABLE 0
|
|
36
|
+
#endif
|
|
37
|
+
#import "RNFBApp/RNFBSharedUtils.h"
|
|
22
38
|
#import "RNFBPerfModule.h"
|
|
23
39
|
|
|
24
40
|
static __strong NSMutableDictionary *traces;
|
|
@@ -56,12 +72,28 @@ RCT_EXPORT_MODULE(NativeRNFBTurboPerf)
|
|
|
56
72
|
}
|
|
57
73
|
}
|
|
58
74
|
|
|
75
|
+
#if !RNFB_PERF_SDK_AVAILABLE
|
|
76
|
+
- (void)rejectUnavailable:(RCTPromiseRejectBlock)reject {
|
|
77
|
+
[RNFBSharedUtils rejectPromiseWithUserInfo:reject
|
|
78
|
+
userInfo:(NSMutableDictionary *)@{
|
|
79
|
+
@"code" : @"unsupported",
|
|
80
|
+
@"message" : @"Firebase Performance is not available on "
|
|
81
|
+
@"this platform or dependency configuration.",
|
|
82
|
+
}];
|
|
83
|
+
}
|
|
84
|
+
#endif
|
|
85
|
+
|
|
59
86
|
- (NSDictionary *)perfConstantsDictionary {
|
|
60
87
|
NSMutableDictionary *constants = [NSMutableDictionary new];
|
|
88
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
61
89
|
constants[@"isPerformanceCollectionEnabled"] =
|
|
62
90
|
@([RCTConvert BOOL:@([FIRPerformance sharedInstance].dataCollectionEnabled)]);
|
|
63
91
|
constants[@"isInstrumentationEnabled"] =
|
|
64
92
|
@([RCTConvert BOOL:@([FIRPerformance sharedInstance].instrumentationEnabled)]);
|
|
93
|
+
#else
|
|
94
|
+
constants[@"isPerformanceCollectionEnabled"] = @(NO);
|
|
95
|
+
constants[@"isInstrumentationEnabled"] = @(NO);
|
|
96
|
+
#endif
|
|
65
97
|
return constants;
|
|
66
98
|
}
|
|
67
99
|
|
|
@@ -81,27 +113,45 @@ RCT_EXPORT_MODULE(NativeRNFBTurboPerf)
|
|
|
81
113
|
- (void)setPerformanceCollectionEnabled:(BOOL)enabled
|
|
82
114
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
83
115
|
reject:(RCTPromiseRejectBlock)reject {
|
|
116
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
84
117
|
[FIRPerformance sharedInstance].dataCollectionEnabled = (BOOL)enabled;
|
|
85
118
|
resolve([NSNull null]);
|
|
119
|
+
#else
|
|
120
|
+
(void)enabled;
|
|
121
|
+
(void)resolve;
|
|
122
|
+
[self rejectUnavailable:reject];
|
|
123
|
+
#endif
|
|
86
124
|
}
|
|
87
125
|
|
|
88
126
|
- (void)instrumentationEnabled:(BOOL)enabled
|
|
89
127
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
90
128
|
reject:(RCTPromiseRejectBlock)reject {
|
|
129
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
91
130
|
[FIRPerformance sharedInstance].instrumentationEnabled = (BOOL)enabled;
|
|
92
131
|
resolve([NSNull null]);
|
|
132
|
+
#else
|
|
133
|
+
(void)enabled;
|
|
134
|
+
(void)resolve;
|
|
135
|
+
[self rejectUnavailable:reject];
|
|
136
|
+
#endif
|
|
93
137
|
}
|
|
94
138
|
|
|
95
139
|
- (void)startTrace:(double)id identifier:(NSString *)identifier {
|
|
140
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
96
141
|
FIRTrace *trace = [[FIRPerformance sharedInstance] traceWithName:identifier];
|
|
97
142
|
[trace start];
|
|
98
143
|
|
|
99
144
|
@synchronized([self class]) {
|
|
100
145
|
traces[@((int)id)] = trace;
|
|
101
146
|
}
|
|
147
|
+
#else
|
|
148
|
+
(void)id;
|
|
149
|
+
(void)identifier;
|
|
150
|
+
#endif
|
|
102
151
|
}
|
|
103
152
|
|
|
104
153
|
- (void)stopTrace:(double)id traceData:(JS::NativeRNFBTurboPerf::TraceData &)traceData {
|
|
154
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
105
155
|
FIRTrace *trace;
|
|
106
156
|
@synchronized([self class]) {
|
|
107
157
|
trace = traces[@((int)id)];
|
|
@@ -124,17 +174,25 @@ RCT_EXPORT_MODULE(NativeRNFBTurboPerf)
|
|
|
124
174
|
@synchronized([self class]) {
|
|
125
175
|
[traces removeObjectForKey:@((int)id)];
|
|
126
176
|
}
|
|
177
|
+
#else
|
|
178
|
+
(void)id;
|
|
179
|
+
(void)traceData;
|
|
180
|
+
#endif
|
|
127
181
|
}
|
|
128
182
|
|
|
129
183
|
- (void)startScreenTrace:(double)id identifier:(NSString *)identifier {
|
|
130
184
|
// Custom screen traces are not supported on iOS.
|
|
185
|
+
(void)id;
|
|
186
|
+
(void)identifier;
|
|
131
187
|
}
|
|
132
188
|
|
|
133
189
|
- (void)stopScreenTrace:(double)id {
|
|
134
190
|
// Custom screen traces are not supported on iOS.
|
|
191
|
+
(void)id;
|
|
135
192
|
}
|
|
136
193
|
|
|
137
194
|
- (void)startHttpMetric:(double)id url:(NSString *)url httpMethod:(NSString *)httpMethod {
|
|
195
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
138
196
|
FIRHTTPMethod method = FIRHTTPMethodGET;
|
|
139
197
|
NSURL *toNSURL = [NSURL URLWithString:url];
|
|
140
198
|
if ([httpMethod compare:@"put" options:NSCaseInsensitiveSearch] == NSOrderedSame)
|
|
@@ -160,9 +218,15 @@ RCT_EXPORT_MODULE(NativeRNFBTurboPerf)
|
|
|
160
218
|
@synchronized([self class]) {
|
|
161
219
|
httpMetrics[@((int)id)] = httpMetric;
|
|
162
220
|
}
|
|
221
|
+
#else
|
|
222
|
+
(void)id;
|
|
223
|
+
(void)url;
|
|
224
|
+
(void)httpMethod;
|
|
225
|
+
#endif
|
|
163
226
|
}
|
|
164
227
|
|
|
165
228
|
- (void)stopHttpMetric:(double)id metricData:(JS::NativeRNFBTurboPerf::HttpMetricData &)metricData {
|
|
229
|
+
#if RNFB_PERF_SDK_AVAILABLE
|
|
166
230
|
FIRHTTPMetric *httpMetric;
|
|
167
231
|
@synchronized([self class]) {
|
|
168
232
|
httpMetric = httpMetrics[@((int)id)];
|
|
@@ -195,6 +259,10 @@ RCT_EXPORT_MODULE(NativeRNFBTurboPerf)
|
|
|
195
259
|
@synchronized([self class]) {
|
|
196
260
|
[httpMetrics removeObjectForKey:@((int)id)];
|
|
197
261
|
}
|
|
262
|
+
#else
|
|
263
|
+
(void)id;
|
|
264
|
+
(void)metricData;
|
|
265
|
+
#endif
|
|
198
266
|
}
|
|
199
267
|
|
|
200
268
|
@end
|
package/lib/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '26.
|
|
2
|
+
export const version = '26.2.0';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-native-firebase/perf",
|
|
3
|
-
"version": "26.
|
|
3
|
+
"version": "26.2.0",
|
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
|
5
5
|
"description": "React Native Firebase - React Native Firebase provides native integration with Performance Monitoring to gain insight into key performance characteristics within your React Native application.",
|
|
6
6
|
"main": "./dist/module/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint:plugin": "eslint plugin/src/*",
|
|
28
28
|
"prepare": "yarn run build && yarn compile && yarn run build:plugin",
|
|
29
29
|
"codegen": "yarn android:codegen && yarn ios:codegen",
|
|
30
|
-
"android:codegen": "npx @react-native-community/cli codegen --platform android --outputPath=./android/src/reactnative/java/io/invertase/firebase/perf/generated",
|
|
31
|
-
"ios:codegen": "npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
|
|
30
|
+
"android:codegen": "rimraf android/src/reactnative/java/io/invertase/firebase/perf/generated && npx @react-native-community/cli codegen --platform android --outputPath=./android/src/reactnative/java/io/invertase/firebase/perf/generated",
|
|
31
|
+
"ios:codegen": "rimraf ios/generated && npx @react-native-community/cli codegen --platform ios --outputPath=./ios/generated"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
"performance monitoring"
|
|
48
48
|
],
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@react-native-firebase/app": "26.
|
|
50
|
+
"@react-native-firebase/app": "26.2.0",
|
|
51
51
|
"expo": ">=47.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@react-native-firebase/app": "26.
|
|
54
|
+
"@react-native-firebase/app": "26.2.0",
|
|
55
55
|
"expo": "^55.0.18",
|
|
56
56
|
"react-native-builder-bob": "^0.40.13"
|
|
57
57
|
},
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"node_modules/",
|
|
103
103
|
"dist/"
|
|
104
104
|
],
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "b7efa8ca2781b5102975ee5169ee6fc52e9c1588"
|
|
106
106
|
}
|