@react-native-firebase/remote-config 21.10.0 → 21.10.1
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 +6 -0
- package/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java +28 -25
- package/android/src/reactnative/java/io/invertase/firebase/config/ReactNativeFirebaseConfigModule.java +9 -9
- package/lib/index.js +3 -11
- package/lib/modular/index.d.ts +5 -0
- package/lib/modular/index.js +2 -0
- package/lib/statics.js +12 -0
- package/lib/version.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
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
|
+
## [21.10.1](https://github.com/invertase/react-native-firebase/compare/v21.10.0...v21.10.1) (2025-02-18)
|
7
|
+
|
8
|
+
### Bug Fixes
|
9
|
+
|
10
|
+
- **remote-config:** ensure static objects are exposed for modular API ([#8321](https://github.com/invertase/react-native-firebase/issues/8321)) ([ee033c0](https://github.com/invertase/react-native-firebase/commit/ee033c0f78a8b2d2aa530641931504fe2c10403a))
|
11
|
+
|
6
12
|
## [21.10.0](https://github.com/invertase/react-native-firebase/compare/v21.9.0...v21.10.0) (2025-02-11)
|
7
13
|
|
8
14
|
**Note:** Version bump only for package @react-native-firebase/remote-config
|
package/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java
CHANGED
@@ -206,31 +206,34 @@ public class UniversalFirebaseConfigModule extends UniversalFirebaseModule {
|
|
206
206
|
|
207
207
|
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
|
208
208
|
|
209
|
-
getExecutor()
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
209
|
+
getExecutor()
|
210
|
+
.execute(
|
211
|
+
() -> {
|
212
|
+
try {
|
213
|
+
CustomSignals.Builder customSignals = new CustomSignals.Builder();
|
214
|
+
for (Map.Entry<String, Object> entry : customSignalsMap.entrySet()) {
|
215
|
+
Object value = entry.getValue();
|
216
|
+
if (value instanceof String) {
|
217
|
+
customSignals.put(entry.getKey(), (String) value);
|
218
|
+
} else if (value instanceof Long) {
|
219
|
+
customSignals.put(entry.getKey(), (Long) value);
|
220
|
+
} else if (value instanceof Integer) {
|
221
|
+
customSignals.put(entry.getKey(), ((Integer) value).longValue());
|
222
|
+
} else if (value instanceof Double) {
|
223
|
+
customSignals.put(entry.getKey(), (Double) value);
|
224
|
+
} else if (value == null) {
|
225
|
+
customSignals.put(entry.getKey(), null);
|
226
|
+
}
|
227
|
+
}
|
228
|
+
|
229
|
+
Tasks.await(
|
230
|
+
FirebaseRemoteConfig.getInstance(firebaseApp)
|
231
|
+
.setCustomSignals(customSignals.build()));
|
232
|
+
taskCompletionSource.setResult(null);
|
233
|
+
} catch (Exception e) {
|
234
|
+
taskCompletionSource.setException(e);
|
235
|
+
}
|
236
|
+
});
|
234
237
|
|
235
238
|
return taskCompletionSource.getTask();
|
236
239
|
}
|
@@ -258,15 +258,15 @@ public class ReactNativeFirebaseConfigModule extends ReactNativeFirebaseModule {
|
|
258
258
|
@ReactMethod
|
259
259
|
public void setCustomSignals(String appName, ReadableMap customSignals, Promise promise) {
|
260
260
|
module
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
261
|
+
.setCustomSignals(appName, customSignals.toHashMap())
|
262
|
+
.addOnCompleteListener(
|
263
|
+
task -> {
|
264
|
+
if (task.isSuccessful()) {
|
265
|
+
promise.resolve(resultWithConstants(task.getResult()));
|
266
|
+
} else {
|
267
|
+
rejectPromiseWithExceptionMap(promise, task.getException());
|
268
|
+
}
|
269
|
+
});
|
270
270
|
}
|
271
271
|
|
272
272
|
private WritableMap resultWithConstants(Object result) {
|
package/lib/index.js
CHANGED
@@ -32,19 +32,11 @@ import {
|
|
32
32
|
import { setReactNativeModule } from '@react-native-firebase/app/lib/internal/nativeModule';
|
33
33
|
import fallBackModule from './web/RNFBConfigModule';
|
34
34
|
import version from './version';
|
35
|
+
import { LastFetchStatus, ValueSource } from './statics';
|
35
36
|
|
36
37
|
const statics = {
|
37
|
-
LastFetchStatus
|
38
|
-
|
39
|
-
FAILURE: 'failure',
|
40
|
-
THROTTLED: 'throttled',
|
41
|
-
NO_FETCH_YET: 'no_fetch_yet',
|
42
|
-
},
|
43
|
-
ValueSource: {
|
44
|
-
REMOTE: 'remote',
|
45
|
-
DEFAULT: 'default',
|
46
|
-
STATIC: 'static',
|
47
|
-
},
|
38
|
+
LastFetchStatus,
|
39
|
+
ValueSource,
|
48
40
|
};
|
49
41
|
|
50
42
|
const namespace = 'remoteConfig';
|
package/lib/modular/index.d.ts
CHANGED
@@ -25,6 +25,11 @@ import ConfigSettings = FirebaseRemoteConfigTypes.ConfigSettings;
|
|
25
25
|
import LastFetchStatusType = FirebaseRemoteConfigTypes.LastFetchStatusType;
|
26
26
|
import RemoteConfigLogLevel = FirebaseRemoteConfigTypes.RemoteConfigLogLevel;
|
27
27
|
import FirebaseApp = ReactNativeFirebase.FirebaseApp;
|
28
|
+
import LastFetchStatusInterface = FirebaseRemoteConfigTypes.LastFetchStatus;
|
29
|
+
import ValueSourceInterface = FirebaseRemoteConfigTypes.ValueSource;
|
30
|
+
|
31
|
+
export const LastFetchStatus: LastFetchStatusInterface;
|
32
|
+
export const ValueSource: ValueSourceInterface;
|
28
33
|
|
29
34
|
/**
|
30
35
|
* Returns a RemoteConfig instance for the given app.
|
package/lib/modular/index.js
CHANGED
package/lib/statics.js
ADDED
package/lib/version.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
// Generated by genversion.
|
2
|
-
module.exports = '21.10.
|
2
|
+
module.exports = '21.10.1';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-native-firebase/remote-config",
|
3
|
-
"version": "21.10.
|
3
|
+
"version": "21.10.1",
|
4
4
|
"author": "Invertase <oss@invertase.io> (http://invertase.io)",
|
5
5
|
"description": "React Native Firebase - React Native Firebase provides native integration with Remote Config, allowing you to change the appearance and/or functionality of your app without requiring an app update.",
|
6
6
|
"main": "lib/index.js",
|
@@ -24,11 +24,11 @@
|
|
24
24
|
"remote-config"
|
25
25
|
],
|
26
26
|
"peerDependencies": {
|
27
|
-
"@react-native-firebase/analytics": "21.10.
|
28
|
-
"@react-native-firebase/app": "21.10.
|
27
|
+
"@react-native-firebase/analytics": "21.10.1",
|
28
|
+
"@react-native-firebase/app": "21.10.1"
|
29
29
|
},
|
30
30
|
"publishConfig": {
|
31
31
|
"access": "public"
|
32
32
|
},
|
33
|
-
"gitHead": "
|
33
|
+
"gitHead": "153637d27bb98b1f44a4b27fe1f8ec133bdbfb6d"
|
34
34
|
}
|