Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// mlkit().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseMlkitModule,
});
// import mlkit, { firebase } from '@react-native-firebase/mlkit';
// mlkit().X(...);
// firebase.mlkit().X(...);
export const firebase = getFirebaseRoot();
// mlkit().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseMlkitModule,
});
// import mlkit, { firebase } from '@react-native-firebase/mlkit';
// mlkit().X(...);
// firebase.mlkit().X(...);
export const firebase = getFirebaseRoot();
// vision().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: true,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseMlKitVisionModule,
});
// import vision, { firebase } from '@react-native-firebase/ml-vision';
// vision().X(...);
// firebase.vision().X(...);
export const firebase = getFirebaseRoot();
// e.g.
// // import { VisionCloudTextRecognizerModelType } from '@react-native-firebase/ml-vision';
export VisionBarcodeFormat from './VisionBarcodeFormat';
export VisionFaceContourType from './VisionFaceContourType';
export VisionFaceLandmarkType from './VisionFaceLandmarkType';
export VisionBarcodeValueType from './VisionBarcodeValueType';
export VisionBarcodeEmailType from './VisionBarcodeEmailType';
export VisionBarcodePhoneType from './VisionBarcodePhoneType';
export VisionBarcodeAddressType from './VisionBarcodeAddressType';
export VisionFaceDetectorContourMode from './VisionFaceDetectorContourMode';
export VisionFaceDetectorLandmarkMode from './VisionFaceDetectorLandmarkMode';
export VisionBarcodeWifiEncryptionType from './VisionBarcodeWifiEncryptionType';
export VisionFaceDetectorPerformanceMode from './VisionFaceDetectorPerformanceMode';
export VisionCloudTextRecognizerModelType from './VisionCloudTextRecognizerModelType';
export VisionFaceDetectorClassificationMode from './VisionFaceDetectorClassificationMode';
// links().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeEvents,
nativeModuleName,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseLinksModule,
});
// import links, { firebase } from '@react-native-firebase/dynamic-links';
// links().X(...);
// firebase.links().X(...);
export const firebase = getFirebaseRoot();
// indexing().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseIndexingModule,
});
// import indexing, { firebase } from '@react-native-firebase/indexing';
// indexing().X(...);
// firebase.indexing().X(...);
export const firebase = getFirebaseRoot();
// crashlytics().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseCrashlyticsModule,
});
// import crashlytics, { firebase } from '@react-native-firebase/crashlytics';
// crashlytics().X(...);
// firebase.crashlytics().X(...);
export const firebase = getFirebaseRoot();
firebase.crashlytics();
// firestore().X(...);
export default createModuleNamespace({
statics: FirestoreStatics,
version,
namespace,
nativeModuleName,
nativeEvents,
hasMultiAppSupport: true,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseFirestoreModule,
});
// import firestore, { firebase } from '@react-native-firebase/firestore';
// firestore().X(...);
// firebase.firestore().X(...);
export const firebase = getFirebaseRoot();
// naturalLanguage().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: true,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseMlKitLanguageModule,
});
// import naturalLanguage, { firebase } from '@react-native-firebase/mlkit';
// naturalLanguage().X(...);
// firebase.naturalLanguage().X(...);
export const firebase = getFirebaseRoot();
// TODO not available on Firebase iOS until SDK 6.0.0, add in RNFB >6.1
// --------------------------
// LANGUAGE_TRANSLATE
// --------------------------
// translate(text, translationOptions) {
// const _translationOptions = {};
//
// // retrieve the language id integers
// const { sourceLanguage, targetLanguage } = translationOptions;
// _translationOptions.sourceLanguage = this.native.TRANSLATE_LANGUAGES[sourceLanguage];
// _translationOptions.targetLanguage = this.native.TRANSLATE_LANGUAGES[targetLanguage];
// // translationOptions required:
// // sourceLanguage
// // targetLanguage
// return this.native.translate(text, _translationOptions);
// config().X(...);
export default createModuleNamespace({
statics,
version,
namespace,
nativeModuleName,
nativeEvents: false,
hasMultiAppSupport: false,
hasCustomUrlOrRegionSupport: false,
ModuleClass: FirebaseConfigModule,
});
// import config, { firebase } from '@react-native-firebase/remote-config';
// config().X(...);
// firebase.remoteConfig().X(...);
export const firebase = getFirebaseRoot();
static createForAdRequest(adUnitId, requestOptions) {
if (!isString(adUnitId)) {
throw new Error(
`firebase.admob() RewardedAd.createForAdRequest(*) 'adUnitId' expected an string value.`,
);
}
let options = {};
try {
options = validateAdRequestOptions(requestOptions);
} catch (e) {
throw new Error(`firebase.admob() RewardedAd.createForAdRequest(_, *) ${e.message}.`);
}
const requestId = _rewardedRequest++;
const admob = getFirebaseRoot().admob();
return new RewardedAd('rewarded', admob, requestId, adUnitId, options);
}