diff --git a/packages/analytics/__tests__/analytics.test.ts b/packages/analytics/__tests__/analytics.test.ts
index e991a6c413a..0b3d46f7f4c 100644
--- a/packages/analytics/__tests__/analytics.test.ts
+++ b/packages/analytics/__tests__/analytics.test.ts
@@ -46,20 +46,6 @@ describe('Analytics', () => {
});
});
- it('errors if milliseconds not a number', () => {
- // @ts-ignore test
- expect(() => firebase.analytics().setMinimumSessionDuration('123')).toThrowError(
- "'milliseconds' expected a number value",
- );
- });
-
- it('errors if milliseconds is less than 0', () => {
- // @ts-ignore test
- expect(() => firebase.analytics().setMinimumSessionDuration(-100)).toThrowError(
- "'milliseconds' expected a positive number value",
- );
- });
-
it('errors if milliseconds not a number', () => {
// @ts-ignore test
expect(() => firebase.analytics().setSessionTimeoutDuration('123')).toThrowError(
diff --git a/packages/analytics/android/src/main/java/io/invertase/firebase/analytics/UniversalFirebaseAnalyticsModule.java b/packages/analytics/android/src/main/java/io/invertase/firebase/analytics/UniversalFirebaseAnalyticsModule.java
index 6bd845c0db6..7fbb9e60ae4 100644
--- a/packages/analytics/android/src/main/java/io/invertase/firebase/analytics/UniversalFirebaseAnalyticsModule.java
+++ b/packages/analytics/android/src/main/java/io/invertase/firebase/analytics/UniversalFirebaseAnalyticsModule.java
@@ -52,13 +52,6 @@ Task setAnalyticsCollectionEnabled(Boolean enabled) {
});
}
- Task setMinimumSessionDuration(long milliseconds) {
- return Tasks.call(() -> {
- FirebaseAnalytics.getInstance(getContext()).setMinimumSessionDuration(milliseconds);
- return null;
- });
- }
-
Task setSessionTimeoutDuration(long milliseconds) {
return Tasks.call(() -> {
FirebaseAnalytics.getInstance(getContext()).setSessionTimeoutDuration(milliseconds);
diff --git a/packages/analytics/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java b/packages/analytics/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java
index f3ec0947460..cf909b282f6 100644
--- a/packages/analytics/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java
+++ b/packages/analytics/android/src/reactnative/java/io/invertase/firebase/analytics/ReactNativeFirebaseAnalyticsModule.java
@@ -59,17 +59,6 @@ public void setAnalyticsCollectionEnabled(Boolean enabled, Promise promise) {
});
}
- @ReactMethod
- public void setMinimumSessionDuration(double milliseconds, Promise promise) {
- module.setMinimumSessionDuration((long) milliseconds).addOnCompleteListener(task -> {
- if (task.isSuccessful()) {
- promise.resolve(task.getResult());
- } else {
- rejectPromiseWithExceptionMap(promise, task.getException());
- }
- });
- }
-
@ReactMethod
public void setSessionTimeoutDuration(double milliseconds, Promise promise) {
module.setSessionTimeoutDuration((long) milliseconds).addOnCompleteListener(task -> {
diff --git a/packages/analytics/e2e/analytics.e2e.js b/packages/analytics/e2e/analytics.e2e.js
index e6a5dee9007..6b3e25bb6c3 100644
--- a/packages/analytics/e2e/analytics.e2e.js
+++ b/packages/analytics/e2e/analytics.e2e.js
@@ -56,26 +56,6 @@ describe('analytics()', () => {
});
});
- describe('setCurrentScreen()', () => {
- it('screenName only', async () => {
- await firebase.analytics().setCurrentScreen('invertase screen');
- });
-
- it('screenName with screenClassOverride', async () => {
- await firebase.analytics().setCurrentScreen('invertase screen', 'invertase class override');
- });
- });
-
- describe('setMinimumSessionDuration()', () => {
- it('default duration', async () => {
- await firebase.analytics().setMinimumSessionDuration();
- });
-
- it('custom duration', async () => {
- await firebase.analytics().setMinimumSessionDuration(1337);
- });
- });
-
describe('setSessionTimeoutDuration()', () => {
it('default duration', async () => {
await firebase.analytics().setSessionTimeoutDuration();
diff --git a/packages/analytics/ios/RNFBAnalytics/RNFBAnalyticsModule.m b/packages/analytics/ios/RNFBAnalytics/RNFBAnalyticsModule.m
index 0d42fedf3db..1507a532d9f 100644
--- a/packages/analytics/ios/RNFBAnalytics/RNFBAnalyticsModule.m
+++ b/packages/analytics/ios/RNFBAnalytics/RNFBAnalyticsModule.m
@@ -125,16 +125,6 @@ - (dispatch_queue_t)methodQueue {
return resolve([NSNull null]);
}
- RCT_EXPORT_METHOD(setMinimumSessionDuration:
- (double) milliseconds
- resolver:
- (RCTPromiseResolveBlock) resolve
- rejecter:
- (RCTPromiseRejectBlock) reject) {
- // Do nothing - this only exists in android
- return resolve([NSNull null]);
- }
-
RCT_EXPORT_METHOD(setSessionTimeoutDuration:
(double) milliseconds
resolver:
diff --git a/packages/analytics/lib/index.d.ts b/packages/analytics/lib/index.d.ts
index 077706683fb..06bf32ebb93 100644
--- a/packages/analytics/lib/index.d.ts
+++ b/packages/analytics/lib/index.d.ts
@@ -663,39 +663,6 @@ export namespace FirebaseAnalyticsTypes {
*/
setAnalyticsCollectionEnabled(enabled: boolean): Promise;
- /**
- * Sets the current screen name.
- *
- * #### Example
- *
- * ```js
- * await firebase.analytics().setCurrentScreen('ProductScreen', 'ProductScreen');
- * ```
- *
- * > Whilst screenClassOverride is optional, it is recommended it is
- * always sent as your current class name. For example on Android it will always
- * show as 'MainActivity' if you do not specify it.
- *
- * @param screenName A screen name, e.g. Product.
- * @param screenClassOverride On Android, React Native runs in a single activity called
- * 'MainActivity'. Setting this parameter overrides the default name shown on logs.
- * @deprecated
- */
- setCurrentScreen(screenName: string, screenClassOverride?: string): Promise;
- /**
- * Sets the minimum engagement time required before starting a session.
- *
- * #### Example
- *
- * ```js
- * // 20 seconds
- * await firebase.analytics().setMinimumSessionDuration(20000);
- * ```
- *
- * @param milliseconds The default value is 10000 (10 seconds).
- */
- setMinimumSessionDuration(milliseconds?: number): Promise;
-
/**
* Sets the duration of inactivity that terminates the current session.
*
diff --git a/packages/analytics/lib/index.js b/packages/analytics/lib/index.js
index 25d0e0f028d..db8540b3184 100644
--- a/packages/analytics/lib/index.js
+++ b/packages/analytics/lib/index.js
@@ -37,9 +37,20 @@ import version from './version';
import * as structs from './structs';
const ReservedEventNames = [
+ 'ad_reward',
+ 'app_background',
'app_clear_data',
- 'app_uninstall',
+ 'app_exception',
+ 'app_remove',
+ 'app_store_refund',
+ 'app_store_subscription_cancel',
+ 'app_store_subscription_convert',
+ 'app_store_subscription_renew',
'app_update',
+ 'app_upgrade',
+ 'dynamic_link_app_open',
+ 'dynamic_link_app_update',
+ 'dynamic_link_first_open',
'error',
'first_open',
'in_app_purchase',
@@ -49,6 +60,7 @@ const ReservedEventNames = [
'notification_receive',
'os_update',
'session_start',
+ 'session_start_with_rollout',
'user_engagement',
];
@@ -113,22 +125,6 @@ class FirebaseAnalyticsModule extends FirebaseModule {
});
}
- setMinimumSessionDuration(milliseconds = 10000) {
- if (!isNumber(milliseconds)) {
- throw new Error(
- "firebase.analytics().setMinimumSessionDuration(*) 'milliseconds' expected a number value.",
- );
- }
-
- if (milliseconds < 0) {
- throw new Error(
- "firebase.analytics().setMinimumSessionDuration(*) 'milliseconds' expected a positive number value.",
- );
- }
-
- return this.native.setMinimumSessionDuration(milliseconds);
- }
-
setSessionTimeoutDuration(milliseconds = 1800000) {
if (!isNumber(milliseconds)) {
throw new Error(
diff --git a/packages/analytics/type-test.ts b/packages/analytics/type-test.ts
index 7f37af3ed80..c9948578d1c 100644
--- a/packages/analytics/type-test.ts
+++ b/packages/analytics/type-test.ts
@@ -67,7 +67,6 @@ console.log(firebase.analytics().setAnalyticsCollectionEnabled);
console.log(firebase.analytics().logSelectPromotion);
console.log(firebase.analytics().logScreenView);
console.log(firebase.analytics().logViewPromotion);
-console.log(firebase.analytics().setMinimumSessionDuration);
console.log(firebase.analytics().setSessionTimeoutDuration);
console.log(firebase.analytics().setUserId);
console.log(firebase.analytics().setUserProperties);
@@ -110,7 +109,6 @@ console.log(analytics().setAnalyticsCollectionEnabled);
console.log(analytics().logSelectPromotion);
console.log(analytics().logScreenView);
console.log(analytics().logViewPromotion);
-console.log(analytics().setMinimumSessionDuration);
console.log(analytics().setSessionTimeoutDuration);
console.log(analytics().setUserId);
console.log(analytics().setUserProperties);
diff --git a/packages/app/RNFBApp.podspec b/packages/app/RNFBApp.podspec
index 9af3f9b4ea6..94cca2113ad 100644
--- a/packages/app/RNFBApp.podspec
+++ b/packages/app/RNFBApp.podspec
@@ -28,11 +28,4 @@ Pod::Spec.new do |s|
# Firebase dependencies
s.dependency 'Firebase/CoreOnly', firebase_sdk_version
-
- if defined?($RNFirebaseAsStaticFramework)
- Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
- s.static_framework = $RNFirebaseAsStaticFramework
- else
- s.static_framework = false
- end
end
diff --git a/packages/app/android/build.gradle b/packages/app/android/build.gradle
index dc1e5cadc1a..04a224f8dcc 100644
--- a/packages/app/android/build.gradle
+++ b/packages/app/android/build.gradle
@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
- classpath("com.android.tools.build:gradle:4.0.1")
+ classpath("com.android.tools.build:gradle:4.1.0")
}
}
}
diff --git a/packages/app/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java b/packages/app/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java
index 83f13be50a7..cf6e909b90e 100644
--- a/packages/app/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java
+++ b/packages/app/android/src/reactnative/java/io/invertase/firebase/utils/ReactNativeFirebaseUtilsModule.java
@@ -161,8 +161,7 @@ public Map getConstants() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
- File folder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS);
- constants.put(KEY_DOCUMENT_DIRECTORY, folder.getAbsolutePath());
+ constants.put(KEY_DOCUMENT_DIRECTORY, context.getExternalFilesDir(null).getAbsolutePath());
} else {
constants.put(KEY_DOCUMENT_DIRECTORY, context.getFilesDir().getAbsolutePath());
}
diff --git a/packages/app/package.json b/packages/app/package.json
index e689a0e0baa..6f94d571abf 100644
--- a/packages/app/package.json
+++ b/packages/app/package.json
@@ -62,15 +62,14 @@
},
"sdkVersions": {
"ios": {
- "firebase": "~> 6.34.0"
+ "firebase": "~> 7.0.0"
},
"android": {
"minSdk": 16,
- "targetSdk": 29,
- "compileSdk": 29,
- "buildTools": "29.0.3",
- "firebase": "25.12.0",
- "iid": "20.3.0",
+ "targetSdk": 30,
+ "compileSdk": 30,
+ "buildTools": "30.0.2",
+ "firebase": "26.0.0",
"playServicesAuth": "18.1.0"
}
}
diff --git a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m
index cafbc8a4cb6..ad1a7c1e762 100644
--- a/packages/auth/ios/RNFBAuth/RNFBAuthModule.m
+++ b/packages/auth/ios/RNFBAuth/RNFBAuthModule.m
@@ -552,7 +552,7 @@ - (void)invalidate {
}];
}
- [[FIRAuth authWithApp:firebaseApp] signInAndRetrieveDataWithCredential:credential completion:^(
+ [[FIRAuth authWithApp:firebaseApp] signInWithCredential:credential completion:^(
FIRAuthDataResult *authResult,
NSError *error
) {
@@ -624,14 +624,14 @@ - (void)invalidate {
NSMutableDictionary *data = [NSMutableDictionary dictionary];
- if ([info dataForKey:FIRActionCodeEmailKey] != nil) {
- [data setValue:[info dataForKey:FIRActionCodeEmailKey] forKey:keyEmail];
+ if (info.email != nil) {
+ [data setValue:info.email forKey:keyEmail];
} else {
[data setValue:[NSNull null] forKey:keyEmail];
}
- if ([info dataForKey:FIRActionCodeFromEmailKey] != nil) {
- [data setValue:[info dataForKey:FIRActionCodeFromEmailKey] forKey:@"fromEmail"];
+ if (info.previousEmail != nil) {
+ [data setValue:info.previousEmail forKey:@"fromEmail"];
} else {
[data setValue:[NSNull null] forKey:@"fromEmail"];
}
@@ -767,7 +767,7 @@ - (void)invalidate {
FIRAuthCredential *credential =
[[FIRPhoneAuthProvider provider] credentialWithVerificationID:verificationId verificationCode:verificationCode];
- [[FIRAuth authWithApp:firebaseApp] signInAndRetrieveDataWithCredential:credential completion:^(
+ [[FIRAuth authWithApp:firebaseApp] signInWithCredential:credential completion:^(
FIRAuthDataResult *authResult,
NSError *error
) {
@@ -798,7 +798,7 @@ - (void)invalidate {
FIRUser *user = [FIRAuth authWithApp:firebaseApp].currentUser;
if (user) {
- [user linkAndRetrieveDataWithCredential:credential
+ [user linkWithCredential:credential
completion:^(FIRAuthDataResult *_Nullable authResult, NSError *_Nullable error) {
if (error) {
[self promiseRejectAuthException:reject error:error];
@@ -852,7 +852,7 @@ - (void)invalidate {
FIRUser *user = [FIRAuth authWithApp:firebaseApp].currentUser;
if (user) {
- [user reauthenticateAndRetrieveDataWithCredential:credential completion:^(
+ [user reauthenticateWithCredential:credential completion:^(
FIRAuthDataResult *_Nullable authResult,
NSError *_Nullable error
) {
diff --git a/packages/firestore/e2e/firestore.e2e.js b/packages/firestore/e2e/firestore.e2e.js
index 38687b72c7c..865c04d16d6 100644
--- a/packages/firestore/e2e/firestore.e2e.js
+++ b/packages/firestore/e2e/firestore.e2e.js
@@ -364,7 +364,7 @@ describe('firestore()', () => {
});
describe('wait for pending writes', () => {
- it('waits for pending writes', async () => {
+ xit('waits for pending writes', async () => {
const waitForPromiseMs = 500;
const testTimeoutMs = 10000;
diff --git a/packages/iid/android/build.gradle b/packages/iid/android/build.gradle
index 398c2c7c7fa..c9b11af32f4 100644
--- a/packages/iid/android/build.gradle
+++ b/packages/iid/android/build.gradle
@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
- classpath("com.android.tools.build:gradle:4.0.1")
+ classpath("com.android.tools.build:gradle:4.1.0")
}
}
}
@@ -32,12 +32,6 @@ def packageJson = PackageJson.getForProject(project)
def appPackageJson = PackageJson.getForProject(appProject)
def firebaseBomVersion = appPackageJson['sdkVersions']['android']['firebase']
-// TODO Must put the concrete version here as the BoM no longer publishes the IID version, align it with the BoM change above
-// Upstream issue: https://github.com/firebase/firebase-android-sdk/issues/1077
-// Issue: https://github.com/invertase/react-native-firebase/issues/3918
-// Example of where to find concrete version to match BoM: https://firebase.google.com/support/release-notes/android#iid_v20-2-1
-def firebaseIidVersion = appPackageJson['sdkVersions']['android']['iid']
-
def jsonMinSdk = appPackageJson['sdkVersions']['android']['minSdk']
def jsonTargetSdk = appPackageJson['sdkVersions']['android']['targetSdk']
def jsonCompileSdk = appPackageJson['sdkVersions']['android']['compileSdk']
@@ -65,7 +59,6 @@ project.ext {
firebase: [
bom: firebaseBomVersion,
- iid: firebaseIidVersion
],
],
@@ -99,7 +92,7 @@ repositories {
dependencies {
api appProject
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
- implementation "com.google.firebase:firebase-iid:${ReactNative.ext.getVersion("firebase", "iid")}"
+ implementation "com.google.firebase:firebase-iid"
}
ReactNative.shared.applyPackageVersion()
diff --git a/packages/messaging/e2e/messaging.e2e.js b/packages/messaging/e2e/messaging.e2e.js
index 34779adabfe..d315c5e8ec3 100644
--- a/packages/messaging/e2e/messaging.e2e.js
+++ b/packages/messaging/e2e/messaging.e2e.js
@@ -216,30 +216,6 @@ describe('messaging()', () => {
});
});
- describe('onMessageSent()', () => {
- it('throws if listener is not a function', () => {
- try {
- firebase.messaging().onMessageSent(123);
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'listener' expected a function");
- return Promise.resolve();
- }
- });
- });
-
- describe('onSendError()', () => {
- it('throws if listener is not a function', () => {
- try {
- firebase.messaging().onSendError('123');
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'listener' expected a function");
- return Promise.resolve();
- }
- });
- });
-
describe('setBackgroundMessageHandler()', () => {
it('throws if handler is not a function', () => {
try {
diff --git a/packages/messaging/e2e/remoteMessage.e2e.js b/packages/messaging/e2e/remoteMessage.e2e.js
deleted file mode 100644
index 81aafcb2114..00000000000
--- a/packages/messaging/e2e/remoteMessage.e2e.js
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-describe('messaging().sendMessage(*)', () => {
- it('throws if no object provided', () => {
- try {
- firebase.messaging().sendMessage(123);
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage' expected an object value");
- return Promise.resolve();
- }
- });
-
- it('uses default values', async () => {
- firebase.messaging().sendMessage({});
- });
-
- describe('to', () => {
- it('throws if not a string', () => {
- try {
- firebase.messaging().sendMessage({
- to: 123,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.to' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- to: 'foobar',
- });
- });
- });
-
- describe('messageId', () => {
- it('throws if not a string', () => {
- try {
- firebase.messaging().sendMessage({
- messageId: 123,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.messageId' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- messageId: 'foobar',
- });
- });
- });
-
- describe('ttl', () => {
- it('throws if not a number', () => {
- try {
- firebase.messaging().sendMessage({
- ttl: '123',
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("remoteMessage.ttl' expected a number value");
- return Promise.resolve();
- }
- });
-
- it('throws if negative number', () => {
- try {
- firebase.messaging().sendMessage({
- ttl: -2,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.ttl' expected a positive integer value");
- return Promise.resolve();
- }
- });
-
- it('throws if float number', () => {
- try {
- firebase.messaging().sendMessage({
- ttl: 123.4,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.ttl' expected a positive integer value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- ttl: 123,
- });
- });
- });
-
- describe('data', () => {
- it('throws if not an object', () => {
- try {
- firebase.messaging().sendMessage({
- data: 123,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.data' expected an object value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- data: {
- foo: 'bar',
- },
- });
- });
- });
-
- describe('collapseKey', () => {
- it('throws if not a string', () => {
- try {
- firebase.messaging().sendMessage({
- collapseKey: 123,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.collapseKey' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- collapseKey: 'foobar',
- });
- });
- });
-
- describe('messageType', () => {
- it('throws if not a string', () => {
- try {
- firebase.messaging().sendMessage({
- messageType: 123,
- });
- return Promise.reject(new Error('Did not throw Error.'));
- } catch (e) {
- e.message.should.containEql("'remoteMessage.messageType' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('accepts custom value', async () => {
- await firebase.messaging().sendMessage({
- messageType: 'foobar',
- });
- });
- });
-});
diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+FIRMessagingDelegate.m b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+FIRMessagingDelegate.m
index 87f78ab2a34..e0ffa9dd052 100644
--- a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+FIRMessagingDelegate.m
+++ b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+FIRMessagingDelegate.m
@@ -64,14 +64,4 @@ - (void)messaging:(FIRMessaging *)messaging didReceiveRegistrationToken:(NSStrin
}
}
-- (void)messaging:(nonnull FIRMessaging *)messaging didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage {
- // If the users AppDelegate implements messaging:didReceiveMessage: then call it
- SEL messaging_didReceiveMessageSelector =
- NSSelectorFromString(@"messaging:didReceiveMessage:");
- if ([[GULAppDelegateSwizzler sharedApplication].delegate respondsToSelector:messaging_didReceiveMessageSelector]) {
- void (*usersDidReceiveMessageIMP)(id, SEL, FIRMessaging *, FIRMessagingRemoteMessage *) = (typeof(usersDidReceiveMessageIMP)) &objc_msgSend;
- usersDidReceiveMessageIMP([GULAppDelegateSwizzler sharedApplication].delegate, messaging_didReceiveMessageSelector, messaging, remoteMessage);
- }
-}
-
@end
diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+NSNotificationCenter.m b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+NSNotificationCenter.m
index 7872b8042e0..fb2fa179610 100644
--- a/packages/messaging/ios/RNFBMessaging/RNFBMessaging+NSNotificationCenter.m
+++ b/packages/messaging/ios/RNFBMessaging/RNFBMessaging+NSNotificationCenter.m
@@ -51,18 +51,6 @@ - (void)observe {
// ObjC - > Mutates the root React components initialProps to toggle `isHeadless` state
[[NSNotificationCenter defaultCenter] addObserver:strongSelf selector:@selector(application_onDidEnterForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
- // Firebase Messaging
- // JS -> `onSendError` events
- [[NSNotificationCenter defaultCenter] addObserver:strongSelf selector:@selector(messaging_onSendErrorNotification:) name:FIRMessagingSendErrorNotification object:nil];
-
- // Firebase Messaging
- // JS -> `onMessageSent` events
- [[NSNotificationCenter defaultCenter] addObserver:strongSelf selector:@selector(messaging_onSendSuccessNotification:) name:FIRMessagingSendSuccessNotification object:nil];
-
- // Firebase Messaging
- // JS -> `onDeletedMessages` events
- [[NSNotificationCenter defaultCenter] addObserver:strongSelf selector:@selector(messaging_onDeletedMessagesNotification) name:FIRMessagingMessagesDeletedNotification object:nil];
-
});
}
diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m b/packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
index 21c7bf7de53..6199d759852 100644
--- a/packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
+++ b/packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
@@ -306,19 +306,6 @@ - (NSDictionary *)constantsToExport {
}
}
-RCT_EXPORT_METHOD(sendMessage:
- (NSDictionary *) message
- :(RCTPromiseResolveBlock) resolve
- :(RCTPromiseRejectBlock) reject
-) {
- NSString *to = message[@"to"];
- NSNumber *ttl = message[@"ttl"];
- NSDictionary *data = message[@"data"];
- NSString *messageId = message[@"messageId"];
- [[FIRMessaging messaging] sendMessage:data to:to withMessageID:messageId timeToLive:[ttl intValue]];
- resolve(nil);
-}
-
RCT_EXPORT_METHOD(subscribeToTopic:
(NSString *) topic
:(RCTPromiseResolveBlock) resolve
diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.h b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.h
index 344c3df3fb6..8347e076111 100644
--- a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.h
+++ b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.h
@@ -23,8 +23,6 @@
+ (NSString *)APNSTokenFromNSData:(NSData *)tokenData;
-+ (NSDictionary *)remoteMessageToDict:(FIRMessagingRemoteMessage *)remoteMessage;
-
+ (NSDictionary *)notificationToDict:(UNNotification *)notification;
+ (NSDictionary *)remoteMessageUserInfoToDict:(NSDictionary *)userInfo;
diff --git a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
index d4ceb3c9554..a1c1daf70ca 100644
--- a/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
+++ b/packages/messaging/ios/RNFBMessaging/RNFBMessagingSerializer.m
@@ -31,10 +31,6 @@ + (NSString *)APNSTokenFromNSData:(NSData *)tokenData {
return [token copy];
}
-+ (NSDictionary *)remoteMessageToDict:(FIRMessagingRemoteMessage *)remoteMessage {
- return [self remoteMessageUserInfoToDict:remoteMessage.appData];
-}
-
+ (NSDictionary *)notificationToDict:(UNNotification *)notification {
return [self remoteMessageUserInfoToDict:notification.request.content.userInfo];
}
diff --git a/packages/messaging/lib/index.d.ts b/packages/messaging/lib/index.d.ts
index 20fd7a59357..475eb2b1a3d 100644
--- a/packages/messaging/lib/index.d.ts
+++ b/packages/messaging/lib/index.d.ts
@@ -55,7 +55,6 @@ import { ReactNativeFirebase } from '@react-native-firebase/app';
*/
export namespace FirebaseMessagingTypes {
import FirebaseModule = ReactNativeFirebase.FirebaseModule;
- import NativeFirebaseError = ReactNativeFirebase.NativeFirebaseError;
export interface Statics {
AuthorizationStatus: typeof AuthorizationStatus;
@@ -476,29 +475,6 @@ export namespace FirebaseMessagingTypes {
PROVISIONAL = 2,
}
- /**
- * An event that is received when a message fails to send.
- *
- * ### Example
- *
- * ```js
- * firebase.messaging().onSendError(event => {
- * console.log(event.messageId);
- * console.log(event.error);
- * });
- */
- export interface SendErrorEvent {
- /**
- * The id of the message that failed to send
- */
- messageId: string;
-
- /**
- * A native firebase error that indicates the failure reason.
- */
- error: NativeFirebaseError;
- }
-
/**
* The Firebase Messaging service interface.
*
@@ -839,51 +815,12 @@ export namespace FirebaseMessagingTypes {
* unsubscribe();
* ```
*
+ * NOTE: this appears to be Android-only as of firebase-ios-sdk v7+
+ *
* @param listener Called when the FCM deletes pending messages.
*/
onDeletedMessages(listener: () => void): () => void;
- /**
- * When sending a `RemoteMessage`, this listener is called when the message has been sent to FCM.
- *
- * Returns an unsubscribe function to stop listening for sent messages.
- *
- * #### Example
- *
- * ```js
- * const unsubscribe = firebase.messaging().onMessageSent((messageId) => {
- * console.log('Message has been sent to the FCM server', messageId);
- * });
- *
- * // Unsubscribe from message sent events
- * unsubscribe();
- * ```
- *
- * @param listener Called when the FCM sends the remote message to FCM.
- */
- onMessageSent(listener: (messageId: string) => any): () => void;
-
- /**
- * When sending a `RemoteMessage`, this listener is called when an error is thrown and the
- * message could not be sent.
- *
- * Returns an unsubscribe function to stop listening for sent errors.
- *
- * #### Example
- *
- * ```js
- * const unsubscribe = firebase.messaging().onSendError(({ messageId, error }) => {
- * console.log('An error occurred when sending a message to FCM', messageId, error);
- * });
- *
- * // Unsubscribe from message sent error events
- * unsubscribe();
- * ```
- *
- * @param listener
- */
- onSendError(listener: (evt: SendErrorEvent) => any): () => void;
-
/**
* Set a message handler function which is called when the app is in the background
* or terminated. In Android, a headless task is created, allowing you to access the React Native environment
@@ -908,27 +845,6 @@ export namespace FirebaseMessagingTypes {
*/
setBackgroundMessageHandler(handler: (message: RemoteMessage) => Promise): void;
- /**
- * Send a new `RemoteMessage` to the FCM server.
- *
- * The promise resolves when the message has been added to the internal queue. Use `onMessageSent()`
- * and `onSendError()` to determine when the message has been sent to the server.
- *
- * #### Example
- *
- * ```js
- * await firebase.messaging().sendMessage({
- * data: {
- * loggedIn: Date.now(),
- * uid: firebase.auth().currentUser.uid,
- * }
- * });
- * ```
- *
- * @param message A `RemoteMessage` interface.
- */
- sendMessage(message: RemoteMessage): Promise;
-
/**
* Apps can subscribe to a topic, which allows the FCM server to send targeted messages to only those
* devices subscribed to that topic.
diff --git a/packages/messaging/lib/index.js b/packages/messaging/lib/index.js
index bdc05fb06b4..aad48697a4f 100644
--- a/packages/messaging/lib/index.js
+++ b/packages/messaging/lib/index.js
@@ -31,7 +31,6 @@ import {
getFirebaseRoot,
} from '@react-native-firebase/app/lib/internal';
import { AppRegistry } from 'react-native';
-import remoteMessageOptions from './remoteMessageOptions';
import version from './version';
const statics = {
@@ -292,28 +291,6 @@ class FirebaseMessagingModule extends FirebaseModule {
return () => subscription.remove();
}
- // https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/FirebaseMessagingService.html#onMessageSent(java.lang.String)
- onMessageSent(listener) {
- if (!isFunction(listener)) {
- throw new Error("firebase.messaging().onMessageSent(*) 'listener' expected a function.");
- }
-
- const subscription = this.emitter.addListener('messaging_message_sent', listener);
- return () => {
- subscription.remove();
- };
- }
-
- // https://firebase.google.com/docs/reference/android/com/google/firebase/messaging/FirebaseMessagingService.html#onSendError(java.lang.String,%20java.lang.Exception)
- onSendError(listener) {
- if (!isFunction(listener)) {
- throw new Error("firebase.messaging().onSendError(*) 'listener' expected a function.");
- }
-
- const subscription = this.emitter.addListener('messaging_message_send_error', listener);
- return () => subscription.remove();
- }
-
/**
* @platform android
*/
@@ -327,17 +304,6 @@ class FirebaseMessagingModule extends FirebaseModule {
backgroundMessageHandler = handler;
}
- sendMessage(remoteMessage) {
- let options;
- try {
- options = remoteMessageOptions(this.app.options.messagingSenderId, remoteMessage);
- } catch (e) {
- throw new Error(`firebase.messaging().sendMessage(*) ${e.message}.`);
- }
-
- return this.native.sendMessage(options);
- }
-
subscribeToTopic(topic) {
if (!isString(topic)) {
throw new Error("firebase.messaging().subscribeToTopic(*) 'topic' expected a string value.");
@@ -397,10 +363,8 @@ export default createModuleNamespace({
nativeModuleName,
nativeEvents: [
'messaging_token_refresh',
- 'messaging_message_sent',
'messaging_message_deleted',
'messaging_message_received',
- 'messaging_message_send_error',
'messaging_notification_opened',
...(isIOS ? ['messaging_message_received_background'] : []),
],
diff --git a/packages/messaging/lib/remoteMessageOptions.js b/packages/messaging/lib/remoteMessageOptions.js
deleted file mode 100644
index fbc9b636a91..00000000000
--- a/packages/messaging/lib/remoteMessageOptions.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {
- generateFirestoreId,
- hasOwnProperty,
- isInteger,
- isNumber,
- isObject,
- isString,
- isUndefined,
-} from '@react-native-firebase/app/lib/common';
-
-export default function remoteMessageOptions(messagingSenderId, remoteMessage) {
- const out = {};
-
- if (isUndefined(remoteMessage) || !isObject(remoteMessage)) {
- throw new Error("'remoteMessage' expected an object value");
- }
-
- if (!remoteMessage.to) {
- out.to = `${messagingSenderId}@fcm.googleapis.com`;
- } else if (!isString(remoteMessage.to)) {
- throw new Error("'remoteMessage.to' expected a string value");
- } else {
- out.to = remoteMessage.to;
- }
-
- if (!remoteMessage.messageId) {
- out.messageId = generateFirestoreId();
- } else if (!isString(remoteMessage.messageId)) {
- throw new Error("'remoteMessage.messageId' expected a string value");
- } else {
- out.messageId = remoteMessage.messageId;
- }
-
- if (!hasOwnProperty(remoteMessage, 'ttl')) {
- out.ttl = 3600;
- } else {
- if (!isNumber(remoteMessage.ttl)) {
- throw new Error("'remoteMessage.ttl' expected a number value");
- }
- if (remoteMessage.ttl < 0 || !isInteger(remoteMessage.ttl)) {
- throw new Error("'remoteMessage.ttl' expected a positive integer value");
- }
- out.ttl = remoteMessage.ttl;
- }
-
- if (!remoteMessage.data) {
- out.data = {};
- } else if (!isObject(remoteMessage.data)) {
- throw new Error("'remoteMessage.data' expected an object value");
- } else {
- out.data = remoteMessage.data;
- }
-
- if (remoteMessage.collapseKey) {
- if (!isString(remoteMessage.collapseKey)) {
- throw new Error("'remoteMessage.collapseKey' expected a string value");
- }
- out.collapseKey = remoteMessage.collapseKey;
- }
-
- if (remoteMessage.messageType) {
- if (!isString(remoteMessage.messageType)) {
- throw new Error("'remoteMessage.messageType' expected a string value");
- }
- out.messageType = remoteMessage.messageType;
- }
-
- return out;
-}
diff --git a/packages/ml-natural-language/CHANGELOG.md b/packages/ml-natural-language/CHANGELOG.md
deleted file mode 100644
index ee32940bd66..00000000000
--- a/packages/ml-natural-language/CHANGELOG.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# Change Log
-
-All notable changes to this project will be documented in this file.
-See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
-
-## [7.4.10](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.9...@react-native-firebase/ml-natural-language@7.4.10) (2020-10-30)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.9](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.8...@react-native-firebase/ml-natural-language@7.4.9) (2020-10-16)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.8](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.7...@react-native-firebase/ml-natural-language@7.4.8) (2020-09-30)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.7](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.6...@react-native-firebase/ml-natural-language@7.4.7) (2020-09-30)
-
-### Bug Fixes
-
-- **types:** enable TypeScript libCheck & resolve type conflicts ([#4306](https://github.com/invertase/react-native-firebase/issues/4306)) ([aa8ee8b](https://github.com/invertase/react-native-firebase/commit/aa8ee8b7e83443d2c1664993800e15faf4b59b0e))
-
-## [7.4.6](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.5...@react-native-firebase/ml-natural-language@7.4.6) (2020-09-30)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.5](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.4...@react-native-firebase/ml-natural-language@7.4.5) (2020-09-17)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.4](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.3...@react-native-firebase/ml-natural-language@7.4.4) (2020-09-17)
-
-### Bug Fixes
-
-- **ios, podspec:** depend on React-Core instead of React ([#4275](https://github.com/invertase/react-native-firebase/issues/4275)) ([fd1a2be](https://github.com/invertase/react-native-firebase/commit/fd1a2be6b6ab1dec89e5dce1fc237435c3e1d510))
-
-## [7.4.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.2...@react-native-firebase/ml-natural-language@7.4.3) (2020-09-11)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.1...@react-native-firebase/ml-natural-language@7.4.2) (2020-08-28)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.4.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.4.0...@react-native-firebase/ml-natural-language@7.4.1) (2020-08-26)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-# [7.4.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.3.2...@react-native-firebase/ml-natural-language@7.4.0) (2020-08-26)
-
-### Features
-
-- bump firebase sdk versions, add GoogleApi dep, use Android API29 ([#4122](https://github.com/invertase/react-native-firebase/issues/4122)) ([728f418](https://github.com/invertase/react-native-firebase/commit/728f41863832d21230c6eb1f55385284fef03c09))
-
-## [7.3.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.3.1...@react-native-firebase/ml-natural-language@7.3.2) (2020-08-15)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.3.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.3.0...@react-native-firebase/ml-natural-language@7.3.1) (2020-08-03)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-# [7.3.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.2.2...@react-native-firebase/ml-natural-language@7.3.0) (2020-08-03)
-
-### Features
-
-- use latest android & ios Firebase SDKs version ([#3956](https://github.com/invertase/react-native-firebase/issues/3956)) ([e7b4bb3](https://github.com/invertase/react-native-firebase/commit/e7b4bb31b05985c044b1f01625a43e364bb653ef))
-
-## [7.2.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.2.1...@react-native-firebase/ml-natural-language@7.2.2) (2020-07-09)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.2.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.2.0...@react-native-firebase/ml-natural-language@7.2.1) (2020-07-07)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-# [7.2.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.8...@react-native-firebase/ml-natural-language@7.2.0) (2020-07-07)
-
-### Features
-
-- **android,ios:** upgrade native SDK versions ([#3881](https://github.com/invertase/react-native-firebase/issues/3881)) ([6cb68a8](https://github.com/invertase/react-native-firebase/commit/6cb68a8ea808392fac3a28bdb1a76049c7b52e86))
-
-## [7.1.8](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.7...@react-native-firebase/ml-natural-language@7.1.8) (2020-07-05)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.7](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.6...@react-native-firebase/ml-natural-language@7.1.7) (2020-06-30)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.6](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.5...@react-native-firebase/ml-natural-language@7.1.6) (2020-06-26)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.5](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.4...@react-native-firebase/ml-natural-language@7.1.5) (2020-06-22)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.4](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.3...@react-native-firebase/ml-natural-language@7.1.4) (2020-06-10)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.3](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.2...@react-native-firebase/ml-natural-language@7.1.3) (2020-06-03)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.2](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.1...@react-native-firebase/ml-natural-language@7.1.2) (2020-05-29)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.1.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.1.0...@react-native-firebase/ml-natural-language@7.1.1) (2020-05-29)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-# [7.1.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.0.1...@react-native-firebase/ml-natural-language@7.1.0) (2020-05-22)
-
-### Features
-
-- update native Firebase SDK versions ([#3663](https://github.com/invertase/react-native-firebase/issues/3663)) ([4db9dbc](https://github.com/invertase/react-native-firebase/commit/4db9dbc3ec20bf96de0efad15000f00b41e4a799))
-
-## [7.0.1](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.0.0...@react-native-firebase/ml-natural-language@7.0.1) (2020-05-13)
-
-**Note:** Version bump only for package @react-native-firebase/ml-natural-language
-
-## [7.0.0](https://github.com/invertase/react-native-firebase/compare/@react-native-firebase/ml-natural-language@7.0.0...@react-native-firebase/ml-natural-language@7.0.0) (2020-05-13)
-
-- feat!: all packages should depend on core (#3613) ([252a423](https://github.com/invertase/react-native-firebase/commit/252a4239e98a0f2a55c4afcd2d82e4d5f97e65e9)), closes [#3613](https://github.com/invertase/react-native-firebase/issues/3613)
-
-### Features
-
-- **ios:** podspecs now utilize CoreOnly instead of Core ([#3575](https://github.com/invertase/react-native-firebase/issues/3575)) ([35285f1](https://github.com/invertase/react-native-firebase/commit/35285f1655b16d05e6630fc556f95cccfb707ee4))
-
-### BREAKING CHANGES
-
-- breaking change to mark new internal versioning requirements.
diff --git a/packages/ml-natural-language/README.md b/packages/ml-natural-language/README.md
deleted file mode 100644
index 03eb9c44475..00000000000
--- a/packages/ml-natural-language/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
React Native Firebase - ML Kit Natural Language
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
----
-
-Bring powerful machine learning features to your mobile app whether you're new or experienced in ML. Get started easily by using ready-to-use APIs from Firebase for common mobile use cases, or import your own custom models which can be hosted and served to your apps by Firebase. ML Kit APIs can run on-device or in the cloud, depending on the functionality, and some give you both choices.
-
-**This module supports the following APIs:**
-
-| API | Supported |
-|-------------------------------------|-----------|
-| [Language Identification](https://firebase.google.com/docs/ml-kit/identify-languages) | ✅ |
-| [Smart Reply](https://firebase.google.com/docs/ml-kit/generate-smart-replies) | ✅ |
-| [Translate](https://firebase.google.com/docs/ml-kit/translation) | ❌ |
-
-
-[> Learn More](https://firebase.google.com/products/ml-kit/)
-
-## Installation
-
-Requires `@react-native-firebase/app` to be installed.
-
-```bash
-yarn add @react-native-firebase/ml-natural-language
-```
-
-## Documentation
-
-- [Quick Start](https://rnfirebase.io/ml-natural-language/usage)
-- [Reference](https://rnfirebase.io/reference/ml-natural-language)
-
-## License
-
-- See [LICENSE](/LICENSE)
-
----
-
-
-
-
- Built and maintained with 💛 by Invertase .
-
-
-
----
diff --git a/packages/ml-natural-language/RNFBMLNaturalLanguage.podspec b/packages/ml-natural-language/RNFBMLNaturalLanguage.podspec
deleted file mode 100644
index 761e4233690..00000000000
--- a/packages/ml-natural-language/RNFBMLNaturalLanguage.podspec
+++ /dev/null
@@ -1,60 +0,0 @@
-require 'json'
-require '../app/firebase_json'
-package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
-appPackage = JSON.parse(File.read(File.join('..', 'app', 'package.json')))
-
-coreVersionDetected = appPackage['version']
-coreVersionRequired = package['peerDependencies'][appPackage['name']]
-firebase_sdk_version = appPackage['sdkVersions']['ios']['firebase']
-if coreVersionDetected != coreVersionRequired
- Pod::UI.warn "NPM package '#{package['name']}' depends on '#{appPackage['name']}' v#{coreVersionRequired} but found v#{coreVersionDetected}, this might cause build issues or runtime crashes."
-end
-
-Pod::Spec.new do |s|
- s.name = "RNFBMLNaturalLanguage"
- s.version = package["version"]
- s.description = package["description"]
- s.summary = <<-DESC
- A well tested feature rich Firebase implementation for React Native, supporting iOS & Android.
- DESC
- s.homepage = "http://invertase.io/oss/react-native-firebase"
- s.license = package['license']
- s.authors = "Invertase Limited"
- s.source = { :git => "https://github.com/invertase/react-native-firebase.git", :tag => "v#{s.version}" }
- s.social_media_url = 'http://twitter.com/invertaseio'
- s.ios.deployment_target = "9.0"
- s.source_files = 'ios/**/*.{h,m}'
-
- # React Native dependencies
- s.dependency 'React-Core'
- s.dependency 'RNFBApp'
-
- if defined?($FirebaseSDKVersion)
- Pod::UI.puts "#{s.name}: Using user specified Firebase SDK version '#{$FirebaseSDKVersion}'"
- firebase_sdk_version = $FirebaseSDKVersion
- end
-
- # Firebase dependencies
- s.dependency 'Firebase/MLNaturalLanguage', firebase_sdk_version
-
- if FirebaseJSON::Config.get_value_or_default('ml_natural_language_language_id_model', false)
- s.dependency 'Firebase/MLNLLanguageID', firebase_sdk_version
- end
-
- # ignore until after v6 release, add support in a feature release
- # if FirebaseJSON::Config.get_value_or_default('ml_natural_language_translate_model', false)
- # s.dependency 'Firebase/MLNLTranslate', firebase_sdk_version
- # end
-
- if FirebaseJSON::Config.get_value_or_default('ml_natural_language_smart_reply_model', false)
- s.dependency 'Firebase/MLCommon', firebase_sdk_version
- s.dependency 'Firebase/MLNLSmartReply', firebase_sdk_version
- end
-
- if defined?($RNFirebaseAsStaticFramework)
- Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
- s.static_framework = $RNFirebaseAsStaticFramework
- else
- s.static_framework = false
- end
-end
diff --git a/packages/ml-natural-language/android/build.gradle b/packages/ml-natural-language/android/build.gradle
deleted file mode 100644
index 4d50f2f91a0..00000000000
--- a/packages/ml-natural-language/android/build.gradle
+++ /dev/null
@@ -1,105 +0,0 @@
-import io.invertase.gradle.common.PackageJson
-
-buildscript {
- // The Android Gradle plugin is only required when opening the android folder stand-alone.
- // This avoids unnecessary downloads and potential conflicts when the library is included as a
- // module dependency in an application project.
- if (project == rootProject) {
- repositories {
- google()
- jcenter()
- }
-
- dependencies {
- classpath("com.android.tools.build:gradle:4.0.1")
- }
- }
-}
-
-plugins {
- id "io.invertase.gradle.build" version "1.4"
-}
-
-def appProject
-if (findProject(':@react-native-firebase_app')) {
- appProject = project(':@react-native-firebase_app')
-} else if (findProject(':react-native-firebase_app')) {
- appProject = project(':react-native-firebase_app')
-} else {
- throw new GradleException('Could not find the react-native-firebase/app package, have you installed it?')
-}
-def packageJson = PackageJson.getForProject(project)
-def appPackageJson = PackageJson.getForProject(appProject)
-def firebaseBomVersion = appPackageJson['sdkVersions']['android']['firebase']
-def jsonMinSdk = appPackageJson['sdkVersions']['android']['minSdk']
-def jsonTargetSdk = appPackageJson['sdkVersions']['android']['targetSdk']
-def jsonCompileSdk = appPackageJson['sdkVersions']['android']['compileSdk']
-def jsonBuildTools = appPackageJson['sdkVersions']['android']['buildTools']
-def coreVersionDetected = appPackageJson['version']
-def coreVersionRequired = packageJson['peerDependencies'][appPackageJson['name']]
-// Only log after build completed so log warning appears at the end
-if (coreVersionDetected != coreVersionRequired) {
- gradle.buildFinished {
- project.logger.warn("ReactNativeFirebase WARNING: NPM package '${packageJson['name']}' depends on '${appPackageJson['name']}' v${coreVersionRequired} but found v${coreVersionDetected}, this might cause build issues or runtime crashes.")
- }
-}
-
-project.ext {
- set('react-native', [
- versions: [
- android : [
- minSdk : jsonMinSdk,
- targetSdk : jsonTargetSdk,
- compileSdk: jsonCompileSdk,
- // optional as gradle.buildTools comes with one by default
- // overriding here though to match the version RN uses
- buildTools: jsonBuildTools
- ],
-
- firebase: [
- bom: firebaseBomVersion,
- ],
- ],
- ])
-}
-
-android {
- defaultConfig {
- multiDexEnabled true
- }
- aaptOptions {
- noCompress "tflite"
- }
- lintOptions {
- disable 'GradleCompatible'
- abortOnError false
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- sourceSets {
- main {
- java.srcDirs = ['src/main/java', 'src/reactnative/java']
- }
- }
-}
-
-repositories {
- google()
- jcenter()
-}
-
-dependencies {
- api appProject
- implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
- implementation "com.google.firebase:firebase-ml-natural-language"
-}
-
-apply from: file("./ml-models.gradle")
-
-ReactNative.shared.applyPackageVersion()
-ReactNative.shared.applyDefaultExcludes()
-ReactNative.module.applyAndroidVersions()
-ReactNative.module.applyReactNativeDependency("api")
diff --git a/packages/ml-natural-language/android/ml-models.gradle b/packages/ml-natural-language/android/ml-models.gradle
deleted file mode 100644
index f4a3786ccb6..00000000000
--- a/packages/ml-natural-language/android/ml-models.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-apply from: file("./../../app/android/firebase-json.gradle")
-
-def mlModels = [
- // TODO not available on iOS until SDK 6.0.0
- // 'ml_natural_language_translate_model',
- 'ml_natural_language_language_id_model',
- 'ml_natural_language_smart_reply_model',
-]
-
-dependencies {
- if (rootProject.ext && rootProject.ext.firebaseJson) {
- mlModels.each { modelFlag ->
- if (rootProject.ext.firebaseJson.isFlagEnabled(modelFlag) == true) {
- rootProject.logger.info ":${project.name} model enabled: '${modelFlag}'"
- implementation "com.google.firebase:firebase-${modelFlag.replaceAll("_", "-")}"
- } else {
- rootProject.logger.warn ":${project.name} model disabled: '${modelFlag}'"
- }
- }
- } else {
- rootProject.logger.warn ":${project.name} skipping optional models as no firebaseJson extension found, you may be missing a firebase.json file in the root of your React Native project, or you've not installed the @react-native-firebase/app package and included it in your app build."
- }
-}
diff --git a/packages/ml-natural-language/android/settings.gradle b/packages/ml-natural-language/android/settings.gradle
deleted file mode 100644
index 9c9c7705f1d..00000000000
--- a/packages/ml-natural-language/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = '@react-native-firebase_ml-natural-language'
diff --git a/packages/ml-natural-language/android/src/main/AndroidManifest.xml b/packages/ml-natural-language/android/src/main/AndroidManifest.xml
deleted file mode 100644
index cc9b0e0efef..00000000000
--- a/packages/ml-natural-language/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageCommon.java b/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageCommon.java
deleted file mode 100644
index 60d7c326bb0..00000000000
--- a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageCommon.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-import com.google.firebase.ml.common.FirebaseMLException;
-
-import javax.annotation.Nullable;
-
-public class UniversalFirebaseMLNaturalLanguageCommon {
-
- static String[] getErrorCodeAndMessageFromException(@Nullable Exception possibleMLException) {
- String code = "unknown";
- String message = "An unknown error has occurred.";
-
- if (possibleMLException != null) {
- message = possibleMLException.getMessage();
- if (possibleMLException instanceof FirebaseMLException) {
- FirebaseMLException mlException = (FirebaseMLException) possibleMLException;
- switch (mlException.getCode()) {
- case FirebaseMLException.ABORTED:
- code = "aborted";
- message = "The operation was aborted, typically due to a concurrency issue like transaction aborts, etc.";
- break;
- case FirebaseMLException.ALREADY_EXISTS:
- code = "already-exists";
- message = "Some resource that we attempted to create already exists.";
- break;
- case FirebaseMLException.CANCELLED:
- code = "cancelled";
- message = "The operation was cancelled (typically by the caller).";
- break;
- case FirebaseMLException.DATA_LOSS:
- code = "data-loss";
- message = "Unrecoverable data loss or corruption.";
- break;
- case FirebaseMLException.DEADLINE_EXCEEDED:
- code = "deadline-exceeded";
- message = "Deadline expired before operation could complete.";
- break;
- case FirebaseMLException.FAILED_PRECONDITION:
- code = "failed-precondition";
- message = "Operation was rejected because the system is not in a state required for the operation's execution.";
- break;
- case FirebaseMLException.INTERNAL:
- code = "internal";
- message = "Internal errors.";
- break;
- case FirebaseMLException.INVALID_ARGUMENT:
- code = "invalid-argument";
- message = "Client specified an invalid argument.";
- break;
- case FirebaseMLException.MODEL_HASH_MISMATCH:
- code = "model-hash-mismatch";
- message = "The downloaded model's hash doesn't match the expected value.";
- break;
- case FirebaseMLException.MODEL_INCOMPATIBLE_WITH_TFLITE:
- code = "model-incompatible-with-tflite";
- message = "The downloaded model isn't compatible with the TFLite runtime.";
- break;
- case FirebaseMLException.NOT_ENOUGH_SPACE:
- code = "not-enough-space";
- message = "There is not enough space left on the device.";
- break;
- case FirebaseMLException.NOT_FOUND:
- code = "not-found";
- message = "Some requested resource was not found.";
- break;
- case FirebaseMLException.OUT_OF_RANGE:
- code = "out-of-range";
- message = "Operation was attempted past the valid range.";
- break;
- case FirebaseMLException.PERMISSION_DENIED:
- code = "permission-denied";
- message = "The caller does not have permission to execute the specified operation.";
- break;
- case FirebaseMLException.RESOURCE_EXHAUSTED:
- code = "resource-exhausted";
- message = "Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.";
- break;
- case FirebaseMLException.UNAUTHENTICATED:
- code = "unauthenticated";
- message = "The request does not have valid authentication credentials for the operation.";
- break;
- case FirebaseMLException.UNAVAILABLE:
- code = "unavailable";
- message = "The service is currently unavailable.";
- break;
- case FirebaseMLException.UNIMPLEMENTED:
- code = "unimplemented";
- message = "Operation is not implemented or not supported/enabled.";
- break;
- }
- }
- }
-
- return new String[]{code, message, possibleMLException != null ? possibleMLException.getMessage() : ""};
- }
-}
diff --git a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageIdModule.java b/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageIdModule.java
deleted file mode 100644
index f87b72236b6..00000000000
--- a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageIdModule.java
+++ /dev/null
@@ -1,126 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import android.content.Context;
-import android.os.Bundle;
-
-import com.google.android.gms.tasks.Task;
-import com.google.android.gms.tasks.Tasks;
-import com.google.firebase.FirebaseApp;
-import com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage;
-import com.google.firebase.ml.naturallanguage.languageid.FirebaseLanguageIdentification;
-import com.google.firebase.ml.naturallanguage.languageid.FirebaseLanguageIdentificationOptions;
-import com.google.firebase.ml.naturallanguage.languageid.IdentifiedLanguage;
-import com.google.firebase.ml.naturallanguage.translate.FirebaseTranslateLanguage;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import io.invertase.firebase.common.UniversalFirebaseModule;
-
-@SuppressWarnings("WeakerAccess")
-class UniversalFirebaseMLNaturalLanguageIdModule extends UniversalFirebaseModule {
-
- UniversalFirebaseMLNaturalLanguageIdModule(Context context, String serviceName) {
- super(context, serviceName);
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/languageid/FirebaseLanguageIdentification.html#identifyLanguage(java.lang.String)
- */
- public Task identifyLanguage(
- String appName,
- String text,
- Bundle identificationOptionsBundle
- ) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseNaturalLanguage naturalLanguage = FirebaseNaturalLanguage.getInstance(firebaseApp);
-
- FirebaseLanguageIdentificationOptions identificationOptions = getOptions(
- identificationOptionsBundle
- );
-
- FirebaseLanguageIdentification languageIdentification = naturalLanguage.getLanguageIdentification(
- identificationOptions);
-
- return Tasks.await(languageIdentification.identifyLanguage(text));
- });
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/languageid/FirebaseLanguageIdentification.html#identifyPossibleLanguages(java.lang.String)
- */
- public Task> identifyPossibleLanguages(
- String appName,
- String text,
- Bundle identificationOptionsBundle
- ) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseNaturalLanguage naturalLanguage = FirebaseNaturalLanguage.getInstance(firebaseApp);
- FirebaseLanguageIdentificationOptions identificationOptions = getOptions(
- identificationOptionsBundle
- );
- FirebaseLanguageIdentification languageIdentification = naturalLanguage.getLanguageIdentification(
- identificationOptions);
-
- List languagesRaw = Tasks.await(languageIdentification.identifyPossibleLanguages(
- text));
-
- List formattedLanguages = new ArrayList<>(languagesRaw.size());
-
-
- for (IdentifiedLanguage identifiedLanguage : languagesRaw) {
- Bundle formattedLanguage = new Bundle(2);
- formattedLanguage.putString("language", identifiedLanguage.getLanguageCode());
- formattedLanguage.putFloat("confidence", identifiedLanguage.getConfidence());
- formattedLanguages.add(formattedLanguage);
- }
-
- return formattedLanguages;
- });
-
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/languageid/FirebaseLanguageIdentificationOptions.html
- */
- private FirebaseLanguageIdentificationOptions getOptions(
- Bundle identificationOptionsBundle
- ) {
- boolean multipleLanguages = identificationOptionsBundle.containsKey("multipleLanguages");
- FirebaseLanguageIdentificationOptions.Builder optionsBuilder = new FirebaseLanguageIdentificationOptions.Builder();
-
- if (identificationOptionsBundle.containsKey("confidenceThreshold")) {
- optionsBuilder.setConfidenceThreshold((float) identificationOptionsBundle.getDouble(
- "confidenceThreshold"));
- } else {
- if (!multipleLanguages) {
- optionsBuilder.setConfidenceThreshold(FirebaseLanguageIdentification.DEFAULT_IDENTIFY_LANGUAGE_CONFIDENCE_THRESHOLD);
- } else {
- optionsBuilder.setConfidenceThreshold(FirebaseLanguageIdentification.DEFAULT_IDENTIFY_POSSIBLE_LANGUAGES_CONFIDENCE_THRESHOLD);
- }
- }
-
- return optionsBuilder.build();
- }
-}
diff --git a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageSmartReplyModule.java b/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageSmartReplyModule.java
deleted file mode 100644
index ff2ecb3daee..00000000000
--- a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageSmartReplyModule.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import android.content.Context;
-import android.os.Bundle;
-import com.google.android.gms.tasks.Task;
-import com.google.android.gms.tasks.Tasks;
-import com.google.firebase.FirebaseApp;
-import com.google.firebase.ml.naturallanguage.FirebaseNaturalLanguage;
-import com.google.firebase.ml.naturallanguage.smartreply.FirebaseTextMessage;
-import com.google.firebase.ml.naturallanguage.smartreply.SmartReplySuggestion;
-import com.google.firebase.ml.naturallanguage.smartreply.SmartReplySuggestionResult;
-import io.invertase.firebase.common.UniversalFirebaseModule;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-@SuppressWarnings({"WeakerAccess", "UnusedReturnValue"})
-class UniversalFirebaseMLNaturalLanguageSmartReplyModule extends UniversalFirebaseModule {
- UniversalFirebaseMLNaturalLanguageSmartReplyModule(Context context, String serviceName) {
- super(context, serviceName);
- }
-
- @Override
- public void onTearDown() {
- super.onTearDown();
- }
-
- @SuppressWarnings("unchecked")
- private List buildFirebaseTextMessagesList(List messages) {
- List firebaseTextMessages = new ArrayList<>(messages.size());
-
- for (Object message : messages) {
- Map messageMap = (Map) message;
-
- Boolean isLocalUser = (Boolean) messageMap.get("isLocalUser");
- long timestamp = (long) ((double) messageMap.get("timestamp"));
- String text = (String) messageMap.get("text");
-
- if (isLocalUser) {
- firebaseTextMessages.add(
- FirebaseTextMessage.createForLocalUser(
- text,
- timestamp
- )
- );
- } else {
- firebaseTextMessages.add(
- FirebaseTextMessage.createForRemoteUser(
- text,
- timestamp,
- (String) messageMap.get("userId")
- )
- );
- }
- }
-
- return firebaseTextMessages;
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseSmartReply.html#public-tasksmartreplysuggestionresultsuggestreplieslistfirebasetextmessage-textmessages
- */
- public Task> suggestReplies(String appName, List messages) {
- return Tasks.call(getExecutor(), () -> {
- List firebaseTextMessages = buildFirebaseTextMessagesList(messages);
- FirebaseNaturalLanguage instance = FirebaseNaturalLanguage.getInstance(FirebaseApp.getInstance(appName));
-
- SmartReplySuggestionResult suggestionResult = Tasks.await(
- instance.getSmartReply().suggestReplies(firebaseTextMessages)
- );
-
- if (suggestionResult == null) return new ArrayList<>(0);
-
- List suggestedRepliesListRaw = suggestionResult.getSuggestions();
- List suggestedRepliesListFormatted = new ArrayList<>(
- suggestedRepliesListRaw.size());
-
-
- for (SmartReplySuggestion suggestedReplyRaw : suggestedRepliesListRaw) {
- Bundle suggestReplyFormatted = new Bundle(2);
- suggestReplyFormatted.putString("text", suggestedReplyRaw.getText());
- // TODO no longer exists - undocumented breaking change
- // suggestReplyFormatted.putFloat("confidence", suggestedReplyRaw.getConfidence());
- suggestedRepliesListFormatted.add(suggestReplyFormatted);
- }
-
- return suggestedRepliesListFormatted;
- });
- }
-}
diff --git a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageTranslateModule.java b/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageTranslateModule.java
deleted file mode 100644
index 5377067c3ec..00000000000
--- a/packages/ml-natural-language/android/src/main/java/io/invertase/firebase/ml/naturallanguage/UniversalFirebaseMLNaturalLanguageTranslateModule.java
+++ /dev/null
@@ -1,158 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import android.content.Context;
-import io.invertase.firebase.common.UniversalFirebaseModule;
-
-@SuppressWarnings("WeakerAccess")
-class UniversalFirebaseMLNaturalLanguageTranslateModule extends UniversalFirebaseModule {
- UniversalFirebaseMLNaturalLanguageTranslateModule(Context context, String serviceName) {
- super(context, serviceName);
- }
-
- // TODO not available on iOS until SDK 6.0.0
-// /**
-// * @url No reference documentation yet...
-// */
-// public Task translate(String appName, String text, Bundle translationOptionsMap) {
-// return Tasks.call(getExecutor(), () -> {
-// FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
-// FirebaseNaturalLanguage naturalLanguage = FirebaseNaturalLanguage.getInstance(firebaseApp);
-// FirebaseTranslatorOptions translatorOptions = getOptions(translationOptionsMap);
-// FirebaseTranslator translator = naturalLanguage.getTranslator(translatorOptions);
-// return Tasks.await(translator.translate(text));
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// public Task>> modelManagerGetAvailableModels(String appName) {
-// return Tasks.call(getExecutor(), () -> {
-// FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
-// FirebaseTranslateModelManager translateModelManager = FirebaseTranslateModelManager.getInstance();
-// Set modelsRaw = Tasks.await(translateModelManager.getAvailableModels(
-// firebaseApp));
-//
-// List> modelsArray = new ArrayList<>(modelsRaw.size());
-// for (FirebaseTranslateRemoteModel modelRaw : modelsRaw) {
-// Map modelMap = new HashMap<>();
-// modelMap.put("language", modelRaw.getLanguage());
-// modelMap.put("languageCode", modelRaw.getLanguageCode());
-// modelMap.put("backendModelName", modelRaw.getModelNameForBackend());
-// modelMap.put("persistUniqueModelName", modelRaw.getUniqueModelNameForPersist());
-// modelsArray.add(modelMap);
-// }
-//
-// return modelsArray;
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// public Task modelManagerDeleteDownloadedModel(String appName, int language) {
-// return Tasks.call(getExecutor(), () -> {
-// FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
-// FirebaseTranslateModelManager translateModelManager = FirebaseTranslateModelManager.getInstance();
-// FirebaseTranslateRemoteModel model = new FirebaseTranslateRemoteModel.Builder(language)
-// .setFirebaseApp(firebaseApp)
-// .build();
-// Tasks.await(translateModelManager.deleteDownloadedModel(model));
-// return null;
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// public Task modelManagerDownloadRemoteModelIfNeeded(
-// String appName,
-// int language,
-// Bundle downloadConditionsBundle
-// ) {
-// return Tasks.call(getExecutor(), () -> {
-// FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
-// FirebaseTranslateModelManager translateModelManager = FirebaseTranslateModelManager.getInstance();
-// FirebaseModelDownloadConditions downloadConditions = getDownloadConditions(
-// downloadConditionsBundle);
-// FirebaseTranslateRemoteModel model = new FirebaseTranslateRemoteModel.Builder(language)
-// .setDownloadConditions(downloadConditions)
-// .setFirebaseApp(firebaseApp)
-// .build();
-// Tasks.await(translateModelManager.downloadRemoteModelIfNeeded(model));
-// return null;
-// });
-// }
-//
-// private FirebaseModelDownloadConditions getDownloadConditions(Bundle downloadConditionsBundle) {
-// FirebaseModelDownloadConditions.Builder conditionsBuilder = new FirebaseModelDownloadConditions.Builder();
-//
-// if (downloadConditionsBundle.containsKey("requireCharging") && downloadConditionsBundle.getBoolean(
-// "requireCharging")) {
-// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
-// conditionsBuilder.requireCharging();
-// }
-// }
-//
-// if (downloadConditionsBundle.containsKey("requireDeviceIdle") && downloadConditionsBundle.getBoolean(
-// "requireDeviceIdle")) {
-// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
-// conditionsBuilder.requireDeviceIdle();
-// }
-// }
-//
-// if (downloadConditionsBundle.containsKey("requireWifi") && downloadConditionsBundle.getBoolean(
-// "requireWifi")) {
-// conditionsBuilder.requireWifi();
-// }
-//
-// return conditionsBuilder.build();
-// }
-//
-// private FirebaseTranslatorOptions getOptions(Bundle translationOptionsBundle) {
-// FirebaseTranslatorOptions.Builder optionsBuilder = new FirebaseTranslatorOptions.Builder();
-//
-// if (translationOptionsBundle.containsKey("sourceLanguage")) {
-// optionsBuilder.setSourceLanguage((int) ((double) translationOptionsBundle.get("sourceLanguage")));
-// } else {
-// optionsBuilder.setSourceLanguage(FirebaseTranslateLanguage.EN);
-// }
-//
-// if (translationOptionsBundle.containsKey("targetLanguage")) {
-// optionsBuilder.setTargetLanguage((int) ((double) translationOptionsBundle.get("targetLanguage")));
-// } else {
-// optionsBuilder.setTargetLanguage(FirebaseTranslateLanguage.EN);
-// }
-//
-// return optionsBuilder.build();
-// }
-//
-// @Override
-// public Map getConstants() {
-// Map constantsMap = new HashMap<>();
-// Map languagesMap = new HashMap<>();
-// Set languages = FirebaseTranslateLanguage.getAllLanguages();
-// for (Integer language : languages) {
-// languagesMap.put(FirebaseTranslateLanguage.languageCodeForLanguage(language), language);
-// }
-// constantsMap.put("TRANSLATE_LANGUAGES", languagesMap);
-// return constantsMap;
-// }
-}
diff --git a/packages/ml-natural-language/android/src/reactnative/AndroidManifest.xml b/packages/ml-natural-language/android/src/reactnative/AndroidManifest.xml
deleted file mode 100644
index cc9b0e0efef..00000000000
--- a/packages/ml-natural-language/android/src/reactnative/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageIdModule.java b/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageIdModule.java
deleted file mode 100644
index 0fdc2d31a7c..00000000000
--- a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageIdModule.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.bridge.Arguments;
-import com.facebook.react.bridge.Promise;
-import com.facebook.react.bridge.ReactApplicationContext;
-import com.facebook.react.bridge.ReactMethod;
-import com.facebook.react.bridge.ReadableMap;
-
-import java.util.Objects;
-
-import io.invertase.firebase.common.ReactNativeFirebaseModule;
-
-class RNFirebaseMLNaturalLanguageIdModule extends ReactNativeFirebaseModule {
- private static final String SERVICE_NAME = "MLNaturalLanguageId";
- private final UniversalFirebaseMLNaturalLanguageIdModule module;
-
- RNFirebaseMLNaturalLanguageIdModule(ReactApplicationContext reactContext) {
- super(reactContext, SERVICE_NAME);
- this.module = new UniversalFirebaseMLNaturalLanguageIdModule(reactContext, SERVICE_NAME);
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/languageid/FirebaseLanguageIdentification.html#identifyLanguage(java.lang.String)
- */
- @ReactMethod
- public void identifyLanguage(
- String appName,
- String text,
- ReadableMap identificationOptionsMap,
- Promise promise
- ) {
- module
- .identifyLanguage(appName, text, Arguments.toBundle(identificationOptionsMap))
- .addOnCompleteListener(task -> {
- if (task.isSuccessful()) {
- promise.resolve(task.getResult());
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/languageid/FirebaseLanguageIdentification.html#identifyPossibleLanguages(java.lang.String)
- */
- @ReactMethod
- public void identifyPossibleLanguages(
- String appName,
- String text,
- ReadableMap identificationOptionsMap,
- Promise promise
- ) {
- module
- .identifyPossibleLanguages(appName, text, Arguments.toBundle(identificationOptionsMap))
- .addOnCompleteListener(task -> {
- if (task.isSuccessful()) {
- promise.resolve(Arguments.fromList(Objects.requireNonNull(task.getResult())));
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-}
diff --git a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageSmartReplyModule.java b/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageSmartReplyModule.java
deleted file mode 100644
index 0b3405ce742..00000000000
--- a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageSmartReplyModule.java
+++ /dev/null
@@ -1,65 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.bridge.*;
-import io.invertase.firebase.common.ReactNativeFirebaseModule;
-
-import java.util.Objects;
-
-class RNFirebaseMLNaturalLanguageSmartReplyModule extends ReactNativeFirebaseModule {
- private static final String SERVICE_NAME = "MLNaturalLanguageSmartReply";
- private final UniversalFirebaseMLNaturalLanguageSmartReplyModule module;
-
- RNFirebaseMLNaturalLanguageSmartReplyModule(ReactApplicationContext reactContext) {
- super(reactContext, SERVICE_NAME);
- this.module = new UniversalFirebaseMLNaturalLanguageSmartReplyModule(
- reactContext,
- SERVICE_NAME
- );
- }
-
- @Override
- public void onCatalystInstanceDestroy() {
- super.onCatalystInstanceDestroy();
- module.onTearDown();
- }
-
- /**
- * @url https://firebase.google.com/docs/reference/android/com/google/firebase/ml/naturallanguage/smartreply/FirebaseSmartReply.html#public-tasksmartreplysuggestionresultsuggestreplieslistfirebasetextmessage-textmessages
- */
- @ReactMethod
- public void suggestReplies(String appName, ReadableArray messages, Promise promise) {
- module
- .suggestReplies(appName, messages.toArrayList())
- .addOnCompleteListener(getExecutor(), task -> {
- if (task.isSuccessful()) {
- promise.resolve(Arguments.fromList(Objects.requireNonNull(task.getResult())));
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-}
diff --git a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageTranslateModule.java b/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageTranslateModule.java
deleted file mode 100644
index b81b861a47d..00000000000
--- a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/RNFirebaseMLNaturalLanguageTranslateModule.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.bridge.ReactApplicationContext;
-import io.invertase.firebase.common.ReactNativeFirebaseModule;
-
-class RNFirebaseMLNaturalLanguageTranslateModule extends ReactNativeFirebaseModule {
- private static final String SERVICE_NAME = "MLNaturalLanguageTranslate";
- private final UniversalFirebaseMLNaturalLanguageTranslateModule module;
-
- RNFirebaseMLNaturalLanguageTranslateModule(ReactApplicationContext reactContext) {
- super(reactContext, SERVICE_NAME);
- this.module = new UniversalFirebaseMLNaturalLanguageTranslateModule(reactContext, SERVICE_NAME);
- }
-
-// TODO not available on iOS until SDK 6.0.0
-
-// /**
-// * @url No reference documentation yet...
-// */
-// @ReactMethod
-// public void translate(
-// String appName,
-// String text,
-// ReadableMap translationOptionsMap,
-// Promise promise
-// ) {
-// module
-// .translate(appName, text, Arguments.toBundle(translationOptionsMap))
-// .addOnCompleteListener(task -> {
-// if (task.isSuccessful()) {
-// promise.resolve(task.getResult());
-// } else {
-// String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
-// task.getException());
-// rejectPromiseWithCodeAndMessage(
-// promise,
-// errorCodeAndMessage[0],
-// errorCodeAndMessage[1],
-// errorCodeAndMessage[2]
-// );
-// }
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// @ReactMethod
-// public void modelManagerGetAvailableModels(String appName, Promise promise) {
-// module.modelManagerGetAvailableModels(appName).addOnCompleteListener(task -> {
-// if (task.isSuccessful()) {
-// promise.resolve(Arguments.fromList(Objects.requireNonNull(task.getResult())));
-// } else {
-// String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
-// task.getException());
-// rejectPromiseWithCodeAndMessage(
-// promise,
-// errorCodeAndMessage[0],
-// errorCodeAndMessage[1],
-// errorCodeAndMessage[2]
-// );
-// }
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// @ReactMethod
-// public void modelManagerDeleteDownloadedModel(String appName, int language, Promise promise) {
-// module.modelManagerDeleteDownloadedModel(appName, language).addOnCompleteListener(task -> {
-// if (task.isSuccessful()) {
-// promise.resolve(task.getResult());
-// } else {
-// String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
-// task.getException());
-// rejectPromiseWithCodeAndMessage(
-// promise,
-// errorCodeAndMessage[0],
-// errorCodeAndMessage[1],
-// errorCodeAndMessage[2]
-// );
-// }
-// });
-// }
-//
-// /**
-// * @url No reference documentation yet...
-// */
-// @ReactMethod
-// public void modelManagerDownloadRemoteModelIfNeeded(
-// String appName,
-// int language,
-// ReadableMap downloadConditionsMap,
-// Promise promise
-// ) {
-// module
-// .modelManagerDownloadRemoteModelIfNeeded(appName, language, Arguments.toBundle(downloadConditionsMap))
-// .addOnCompleteListener(task -> {
-// if (task.isSuccessful()) {
-// promise.resolve(task.getResult());
-// } else {
-// String[] errorCodeAndMessage = UniversalFirebaseMLNaturalLanguageCommon.getErrorCodeAndMessageFromException(
-// task.getException());
-// rejectPromiseWithCodeAndMessage(
-// promise,
-// errorCodeAndMessage[0],
-// errorCodeAndMessage[1],
-// errorCodeAndMessage[2]
-// );
-// }
-// });
-// }
-//
-//
-// @Override
-// public Map getConstants() {
-// return module.getConstants();
-// }
-}
diff --git a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/ReactNativeFirebaseMLNaturalLanguagePackage.java b/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/ReactNativeFirebaseMLNaturalLanguagePackage.java
deleted file mode 100644
index 4b2359d60a5..00000000000
--- a/packages/ml-natural-language/android/src/reactnative/java/io/invertase/firebase/ml/naturallanguage/ReactNativeFirebaseMLNaturalLanguagePackage.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package io.invertase.firebase.ml.naturallanguage;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.ReactPackage;
-import com.facebook.react.bridge.NativeModule;
-import com.facebook.react.bridge.ReactApplicationContext;
-import com.facebook.react.uimanager.ViewManager;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import javax.annotation.Nonnull;
-
-import io.invertase.firebase.common.ReactNativeFirebaseJSON;
-
-@SuppressWarnings("unused")
-public class ReactNativeFirebaseMLNaturalLanguagePackage implements ReactPackage {
- @Nonnull
- @Override
- public List createNativeModules(@Nonnull ReactApplicationContext reactContext) {
- List modules = new ArrayList<>();
-
- if (ReactNativeFirebaseJSON
- .getSharedInstance()
- .getBooleanValue("ml_natural_language_language_id_model", false)) {
- modules.add(new RNFirebaseMLNaturalLanguageIdModule(reactContext));
- }
-
- if (ReactNativeFirebaseJSON
- .getSharedInstance()
- .getBooleanValue("ml_natural_language_translate_model", false)) {
- modules.add(new RNFirebaseMLNaturalLanguageTranslateModule(reactContext));
- }
-
- if (ReactNativeFirebaseJSON
- .getSharedInstance()
- .getBooleanValue("ml_natural_language_smart_reply_model", false)) {
- modules.add(new RNFirebaseMLNaturalLanguageSmartReplyModule(reactContext));
- }
-
- return modules;
- }
-
- @Nonnull
- @Override
- public List createViewManagers(@Nonnull ReactApplicationContext reactContext) {
- return Collections.emptyList();
- }
-}
diff --git a/packages/ml-natural-language/e2e/languageId.e2e.js b/packages/ml-natural-language/e2e/languageId.e2e.js
deleted file mode 100644
index ae7c8002aa4..00000000000
--- a/packages/ml-natural-language/e2e/languageId.e2e.js
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-describe('naturalLanguage() -> Language ID', () => {
- describe('identifyLanguage()', () => {
- it('returns a string of the identified language', async () => {
- const languageDe = await firebase.naturalLanguage().identifyLanguage('Hallo welt');
- const languageEn = await firebase.naturalLanguage().identifyLanguage('Hello world');
- const languageFr = await firebase.naturalLanguage().identifyLanguage('Bonjour le monde');
- should.equal(languageDe, 'de');
- should.equal(languageEn, 'en');
- should.equal(languageFr, 'fr');
- });
-
- it('accepts a `confidenceThreshold` option', async () => {
- const languageDeDefault = await firebase.naturalLanguage().identifyLanguage('Hallo');
- const languageDeLowConfidence = await firebase.naturalLanguage().identifyLanguage('Hallo', {
- confidenceThreshold: 0.2,
- });
- should.equal(languageDeDefault, 'und');
- should.equal(languageDeLowConfidence, 'de');
- });
-
- it('throws an error if text is not a string', async () => {
- try {
- firebase.naturalLanguage().identifyLanguage(false);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql('must be a string value');
- return Promise.resolve();
- }
- });
-
- it('throws an error if options is not an object', async () => {
- try {
- firebase.naturalLanguage().identifyLanguage('hello', false);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql('must be an object');
- return Promise.resolve();
- }
- });
-
- it('throws an error if options.confidenceThreshold is not a float value', async () => {
- try {
- firebase.naturalLanguage().identifyLanguage('hello', { confidenceThreshold: 'boop' });
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql('must be a float value between 0 and 1');
- return Promise.resolve();
- }
- });
-
- it('throws an error if options.confidenceThreshold is greater than 1', async () => {
- try {
- firebase.naturalLanguage().identifyLanguage('hello', { confidenceThreshold: 1.2 });
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql('must be a float value between 0 and 1');
- return Promise.resolve();
- }
- });
-
- it('throws an error if options.confidenceThreshold is less than 0', async () => {
- try {
- firebase.naturalLanguage().identifyLanguage('hello', { confidenceThreshold: -1.2 });
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql('must be a float value between 0 and 1');
- return Promise.resolve();
- }
- });
- });
-
- describe('identifyPossibleLanguages()', () => {
- it('returns an array of the identified languages and their confidence', async () => {
- const languages = await firebase.naturalLanguage().identifyPossibleLanguages('hello');
- languages.should.be.an.Array();
- languages.length.should.be.greaterThan(3);
- languages[0].language.should.equal('en');
- languages[0].confidence.should.be.a.Number();
- languages[0].confidence.should.be.greaterThan(0.7);
- });
-
- it('accepts a `confidenceThreshold` option', async () => {
- const languages = await firebase.naturalLanguage().identifyPossibleLanguages('hello', {
- confidenceThreshold: 0.7,
- });
- languages.should.be.an.Array();
- languages.length.should.equal(1);
- languages[0].language.should.equal('en');
- languages[0].confidence.should.be.a.Number();
- languages[0].confidence.should.be.greaterThan(0.7);
- });
- // arg validation not required, uses same validator as identifyLanguage
- });
-});
diff --git a/packages/ml-natural-language/e2e/mlKitLanguage.e2e.js b/packages/ml-natural-language/e2e/mlKitLanguage.e2e.js
deleted file mode 100644
index 7a10484e3ab..00000000000
--- a/packages/ml-natural-language/e2e/mlKitLanguage.e2e.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-describe('naturalLanguage()', () => {
- describe('namespace', () => {
- it('accessible from firebase.app()', () => {
- const app = firebase.app();
- should.exist(app.naturalLanguage);
- app.naturalLanguage().app.should.equal(app);
- });
-
- it('supports multiple apps', async () => {
- firebase.naturalLanguage().app.name.should.equal('[DEFAULT]');
- firebase
- .naturalLanguage(firebase.app('secondaryFromNative'))
- .app.name.should.equal('secondaryFromNative');
-
- firebase
- .app('secondaryFromNative')
- .naturalLanguage()
- .app.name.should.equal('secondaryFromNative');
- });
-
- it('throws an error if language id native module does not exist', async () => {
- const method = firebase.naturalLanguage().native.identifyLanguage;
- firebase.naturalLanguage()._nativeModule = Object.assign(
- {},
- firebase.naturalLanguage()._nativeModule,
- );
- delete firebase.naturalLanguage()._nativeModule.identifyLanguage;
- try {
- firebase.naturalLanguage().identifyLanguage();
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql(
- "You attempted to use an optional API that's not enabled natively",
- );
- e.message.should.containEql('Language Identification');
- firebase.naturalLanguage()._nativeModule.identifyLanguage = method;
- Object.freeze(firebase.naturalLanguage()._nativeModule);
- return Promise.resolve();
- }
- });
-
- xit('throws an error if smart replies native module does not exist', async () => {
- const method = firebase.naturalLanguage().native.getSuggestedReplies;
- firebase.naturalLanguage()._nativeModule = Object.assign(
- {},
- firebase.naturalLanguage()._nativeModule,
- );
- delete firebase.naturalLanguage()._nativeModule.getSuggestedReplies;
- try {
- firebase.naturalLanguage().newSmartReplyConversation();
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql(
- "You attempted to use an optional API that's not enabled natively",
- );
- e.message.should.containEql('Smart Replies');
- firebase.naturalLanguage()._nativeModule.getSuggestedReplies = method;
- Object.freeze(firebase.naturalLanguage()._nativeModule);
- return Promise.resolve();
- }
- });
- });
-});
diff --git a/packages/ml-natural-language/e2e/smartReply.e2e.js b/packages/ml-natural-language/e2e/smartReply.e2e.js
deleted file mode 100644
index 061d8b64748..00000000000
--- a/packages/ml-natural-language/e2e/smartReply.e2e.js
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-describe('naturalLanguage() -> Smart Replies', () => {
- describe('suggestReplies()', () => {
- it('throws if messages is not an array', () => {
- try {
- firebase.naturalLanguage().suggestReplies({});
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'messages' must be an array value");
- return Promise.resolve();
- }
- });
-
- it('resolves an empty array if empty array if provided', async () => {
- const replies = await firebase.naturalLanguage().suggestReplies([]);
- replies.should.be.Array();
- replies.length.should.eql(0);
- });
-
- it('returns suggested replies', async () => {
- const replies = await firebase.naturalLanguage().suggestReplies([
- { text: 'We should catchup some time!' },
- { text: 'I know right, it has been a while..', userId: 'invertase', isLocalUser: false },
- { text: 'Lets meet up!' },
- {
- text: 'Definitely, how about we go for lunch this week?',
- userId: 'invertase',
- isLocalUser: false,
- },
- ]);
-
- replies.should.be.Array();
- replies.length.should.equal(3);
-
- replies.forEach($ => {
- $.text.should.be.String();
- $.text.length.should.be.greaterThan(0);
- });
-
- const replies2 = await firebase
- .naturalLanguage()
- .suggestReplies([
- { text: replies[0].text },
- { text: 'Great, does Friday work for you?', userId: 'invertase', isLocalUser: false },
- ]);
-
- replies2[0].text.should.be.String();
- replies2[0].text.length.should.be.greaterThan(0);
- });
-
- describe('TextMessage', () => {
- it('throws if message is not an object', () => {
- try {
- firebase.naturalLanguage().suggestReplies([123]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage' expected an object value");
- return Promise.resolve();
- }
- });
-
- describe('.text', () => {
- it('throws if text option not provided', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{}]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.text' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('throws if text option is not a string', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{ text: 123 }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.text' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('throws if text length is zero', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{ text: '' }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.text' expected string value to not be empty");
- return Promise.resolve();
- }
- });
- });
-
- describe('.userId', () => {
- it('throws if local user true and id provided', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{ text: 'foo', userId: 'bar' }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql(
- "'textMessage.userId' expected 'textMessage.isLocalUser' to be false when setting a user ID",
- );
- return Promise.resolve();
- }
- });
-
- it('throws if text userId not provided', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{ text: 'foo', isLocalUser: false }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.userId' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('throws if userId option is not a string', () => {
- try {
- firebase
- .naturalLanguage()
- .suggestReplies([{ text: 'foo', isLocalUser: false, userId: 123 }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.userId' expected a string value");
- return Promise.resolve();
- }
- });
-
- it('throws if userId length is zero', () => {
- try {
- firebase
- .naturalLanguage()
- .suggestReplies([{ text: 'foo', isLocalUser: false, userId: '' }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql(
- "'textMessage.userId' expected string value to not be empty",
- );
- return Promise.resolve();
- }
- });
-
- it('sets a user id', () => {
- firebase
- .naturalLanguage()
- .suggestReplies([{ text: 'foo', isLocalUser: false, userId: 'bar' }]);
- });
- });
-
- describe('.timestamp', () => {
- it('throws if timestamp is not a number', () => {
- try {
- firebase.naturalLanguage().suggestReplies([{ text: 'foo', timestamp: 'baz' }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.timestamp' expected number value");
- return Promise.resolve();
- }
- });
-
- it('sets a timestamp', () => {
- firebase.naturalLanguage().suggestReplies([{ text: 'foo', timestamp: Date.now() + 123 }]);
- });
- });
-
- describe('.isLocalUser', () => {
- it('throws if isLocalUser is not a boolean', () => {
- try {
- firebase
- .naturalLanguage()
- .suggestReplies([{ text: 'foo', userId: 'bar', isLocalUser: 'baz' }]);
- return Promise.reject(new Error('Did not throw'));
- } catch (e) {
- e.message.should.containEql("'textMessage.isLocalUser' expected boolean value");
- return Promise.resolve();
- }
- });
- });
- });
- });
-});
diff --git a/packages/ml-natural-language/e2e/translate.e2e.js b/packages/ml-natural-language/e2e/translate.e2e.js
deleted file mode 100644
index 71b19bf61f1..00000000000
--- a/packages/ml-natural-language/e2e/translate.e2e.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// TODO not available on iOS until SDK 6.0.0
-// xdescribe('naturalLanguage() -> Translate', () => {
-// before(async () => {
-// await firebase.naturalLanguage().translateModelManager.downloadRemoteModelIfNeeded('de');
-// });
-//
-// describe('translate()', () => {
-// it('translates test from the specified sourceLanguage to targetLanguage', async () => {
-// const translatedText = await firebase
-// .naturalLanguage()
-// .translate('Hello world', { sourceLanguage: 'en', targetLanguage: 'de' });
-// translatedText.should.equal('Hallo Welt');
-// });
-// });
-//
-// describe('translateModelManager()', () => {
-// it('returns a new instance of TranslateModelManager', async () => {
-// const { translateModelManager } = firebase.naturalLanguage();
-// translateModelManager.should.be.instanceOf(
-// jet.require('packages/ml-natural-language/lib/TranslateModelManager'),
-// );
-// });
-// });
-//
-// describe('TranslateModelManager', () => {
-// describe('downloadRemoteModelIfNeeded()', () => {
-// it('downloads the specified language model', async () => {
-// const { translateModelManager } = firebase.naturalLanguage();
-// await translateModelManager.downloadRemoteModelIfNeeded('de');
-// });
-// });
-// });
-// });
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.pbxproj b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.pbxproj
deleted file mode 100644
index f99e91f0d00..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,371 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 48;
- objects = {
-
-/* Begin PBXBuildFile section */
- 27038A8322A16C43001E082B /* RCTConvert+FIRLanguageIdentificationOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 27038A8222A16C43001E082B /* RCTConvert+FIRLanguageIdentificationOptions.m */; };
- 2744B98621F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 2744B98521F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.m */; };
- 27760EA1229ED5D000F5F127 /* RNFBMLNaturalLanguageTranslateModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 27760EA0229ED5D000F5F127 /* RNFBMLNaturalLanguageTranslateModule.m */; };
- 27760EA4229ED74E00F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 27760EA3229ED74E00F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.m */; };
- 27760EA722A0064100F5F127 /* RCTConvert+FIRTextMessageArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 27760EA622A0064100F5F127 /* RCTConvert+FIRTextMessageArray.m */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 2744B98021F45429004F8E3F /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 16;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 27038A8122A16C31001E082B /* RCTConvert+FIRLanguageIdentificationOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+FIRLanguageIdentificationOptions.h"; sourceTree = ""; };
- 27038A8222A16C43001E082B /* RCTConvert+FIRLanguageIdentificationOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+FIRLanguageIdentificationOptions.m"; sourceTree = ""; };
- 2744B98221F45429004F8E3F /* libRNFBMLNaturalLanguage.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRNFBMLNaturalLanguage.a; sourceTree = BUILT_PRODUCTS_DIR; };
- 2744B98421F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RNFBMLNaturalLanguageIdModule.h; path = RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.h; sourceTree = SOURCE_ROOT; };
- 2744B98521F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = RNFBMLNaturalLanguageIdModule.m; path = RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.m; sourceTree = SOURCE_ROOT; };
- 27760E9F229ED5B400F5F127 /* RNFBMLNaturalLanguageTranslateModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBMLNaturalLanguageTranslateModule.h; sourceTree = ""; };
- 27760EA0229ED5D000F5F127 /* RNFBMLNaturalLanguageTranslateModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBMLNaturalLanguageTranslateModule.m; sourceTree = ""; };
- 27760EA2229ED5F600F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNFBMLNaturalLanguageSmartReplyModule.h; sourceTree = ""; };
- 27760EA3229ED74E00F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNFBMLNaturalLanguageSmartReplyModule.m; sourceTree = ""; };
- 27760EA522A0064100F5F127 /* RCTConvert+FIRTextMessageArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "RCTConvert+FIRTextMessageArray.h"; path = "RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.h"; sourceTree = SOURCE_ROOT; };
- 27760EA622A0064100F5F127 /* RCTConvert+FIRTextMessageArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+FIRTextMessageArray.m"; sourceTree = ""; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 2744B97F21F45429004F8E3F /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 2744B97521F452B8004F8E3F /* Products */ = {
- isa = PBXGroup;
- children = (
- 2744B98221F45429004F8E3F /* libRNFBMLNaturalLanguage.a */,
- );
- name = Products;
- sourceTree = "";
- };
- 2744B98321F45429004F8E3F /* RNFBMLNaturalLanguage */ = {
- isa = PBXGroup;
- children = (
- 27760EA522A0064100F5F127 /* RCTConvert+FIRTextMessageArray.h */,
- 27760EA622A0064100F5F127 /* RCTConvert+FIRTextMessageArray.m */,
- 2744B98421F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.h */,
- 2744B98521F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.m */,
- 27760E9F229ED5B400F5F127 /* RNFBMLNaturalLanguageTranslateModule.h */,
- 27760EA0229ED5D000F5F127 /* RNFBMLNaturalLanguageTranslateModule.m */,
- 27760EA2229ED5F600F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.h */,
- 27760EA3229ED74E00F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.m */,
- 27038A8122A16C31001E082B /* RCTConvert+FIRLanguageIdentificationOptions.h */,
- 27038A8222A16C43001E082B /* RCTConvert+FIRLanguageIdentificationOptions.m */,
- );
- path = RNFBMLNaturalLanguage;
- sourceTree = "";
- };
- 3323F52AAFE26B7384BE4DE3 = {
- isa = PBXGroup;
- children = (
- 2744B98321F45429004F8E3F /* RNFBMLNaturalLanguage */,
- 2744B97521F452B8004F8E3F /* Products */,
- );
- sourceTree = "";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 2744B98121F45429004F8E3F /* RNFBMLNaturalLanguage */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 2744B98821F45429004F8E3F /* Build configuration list for PBXNativeTarget "RNFBMLNaturalLanguage" */;
- buildPhases = (
- 2744B97E21F45429004F8E3F /* Sources */,
- 2744B97F21F45429004F8E3F /* Frameworks */,
- 2744B98021F45429004F8E3F /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = RNFBMLNaturalLanguage;
- productName = RNFBMLNaturalLanguage;
- productReference = 2744B98221F45429004F8E3F /* libRNFBMLNaturalLanguage.a */;
- productType = "com.apple.product-type.library.static";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 3323F95273A95DB34F55C6D7 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- CLASSPREFIX = RNFBMLNaturalLanguage;
- LastUpgradeCheck = 1010;
- ORGANIZATIONNAME = Invertase;
- TargetAttributes = {
- 2744B98121F45429004F8E3F = {
- CreatedOnToolsVersion = 10.1;
- ProvisioningStyle = Automatic;
- };
- };
- };
- buildConfigurationList = 3323F1C5716BA966BBBB95A4 /* Build configuration list for PBXProject "RNFBMLNaturalLanguage" */;
- compatibilityVersion = "Xcode 8.0";
- developmentRegion = English;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- );
- mainGroup = 3323F52AAFE26B7384BE4DE3;
- productRefGroup = 2744B97521F452B8004F8E3F /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 2744B98121F45429004F8E3F /* RNFBMLNaturalLanguage */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 2744B97E21F45429004F8E3F /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 27760EA4229ED74E00F5F127 /* RNFBMLNaturalLanguageSmartReplyModule.m in Sources */,
- 2744B98621F45429004F8E3F /* RNFBMLNaturalLanguageIdModule.m in Sources */,
- 27038A8322A16C43001E082B /* RCTConvert+FIRLanguageIdentificationOptions.m in Sources */,
- 27760EA722A0064100F5F127 /* RCTConvert+FIRTextMessageArray.m in Sources */,
- 27760EA1229ED5D000F5F127 /* RNFBMLNaturalLanguageTranslateModule.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 2744B98921F45429004F8E3F /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
- MTL_FAST_MATH = YES;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 2744B98A21F45429004F8E3F /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_ENABLE_OBJC_WEAK = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
- CODE_SIGN_IDENTITY = "iPhone Developer";
- CODE_SIGN_STYLE = Automatic;
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- MTL_FAST_MATH = YES;
- OTHER_LDFLAGS = "-ObjC";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SDKROOT = iphoneos;
- SKIP_INSTALL = YES;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 3323F77D701E1896E6D239CF /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "${BUILT_PRODUCTS_DIR}/**",
- "${SRCROOT}/../../../ios/Firebase/**",
- "$(FIREBASE_SEARCH_PATH)/Firebase/**",
- "$(SRCROOT)/../../../ios/Pods/FirebaseMlkitLanguage/Frameworks",
- "$(SRCROOT)/../../../tests/ios/Pods/FirebaseMlkitLanguage/Frameworks",
- );
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(inherited)",
- "$(REACT_SEARCH_PATH)/React/**",
- "$(SRCROOT)/../../react-native/React/**",
- "$(SRCROOT)/../../react-native-firebase/ios/**",
- "$(FIREBASE_SEARCH_PATH)/Firebase/**",
- "${SRCROOT}/../../../ios/Firebase/**",
- "${SRCROOT}/../../../ios/Pods/Headers/Public/**",
- "${SRCROOT}/../../../tests/ios/Pods/Headers/Public/**",
- "$(SRCROOT)/../../../node_modules/react-native/React/**",
- "$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
- "$(SRCROOT)/../../../packages/app/ios/**",
- );
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- MACH_O_TYPE = staticlib;
- OTHER_LDFLAGS = "$(inherited)";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- };
- name = Release;
- };
- 3323F7E33E1559A2B9826720 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "${BUILT_PRODUCTS_DIR}/**",
- "${SRCROOT}/../../../ios/Firebase/**",
- "$(FIREBASE_SEARCH_PATH)/Firebase/**",
- "$(SRCROOT)/../../../ios/Pods/FirebaseMlkitLanguage/Frameworks",
- );
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- "$(inherited)",
- "$(REACT_SEARCH_PATH)/React/**",
- "$(SRCROOT)/../../react-native/React/**",
- "$(SRCROOT)/../../react-native-firebase/ios/**",
- "$(FIREBASE_SEARCH_PATH)/Firebase/**",
- "${SRCROOT}/../../../ios/Firebase/**",
- "${SRCROOT}/../../../ios/Pods/Headers/Public/**",
- "${SRCROOT}/../../../tests/ios/Pods/Headers/Public/**",
- "$(SRCROOT)/../../../node_modules/react-native/React/**",
- "$(SRCROOT)/../../../node_modules/react-native-firebase/ios/**",
- "$(SRCROOT)/../../../packages/app/ios/**",
- );
- IPHONEOS_DEPLOYMENT_TARGET = 10.0;
- LIBRARY_SEARCH_PATHS = "$(inherited)";
- MACH_O_TYPE = staticlib;
- ONLY_ACTIVE_ARCH = YES;
- OTHER_LDFLAGS = "$(inherited)";
- PRODUCT_NAME = "$(TARGET_NAME)";
- SKIP_INSTALL = YES;
- };
- name = Debug;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 2744B98821F45429004F8E3F /* Build configuration list for PBXNativeTarget "RNFBMLNaturalLanguage" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 2744B98921F45429004F8E3F /* Debug */,
- 2744B98A21F45429004F8E3F /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 3323F1C5716BA966BBBB95A4 /* Build configuration list for PBXProject "RNFBMLNaturalLanguage" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 3323F7E33E1559A2B9826720 /* Debug */,
- 3323F77D701E1896E6D239CF /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 3323F95273A95DB34F55C6D7 /* Project object */;
-}
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.h b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.h
deleted file mode 100644
index b6b6eb1a56a..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import
-#import
-
-@interface RCTConvert (FIRLanguageIdentificationOptions)
-#if __has_include()
-
-+ (FIRLanguageIdentificationOptions *)firLanguageIdOptionsFromDict:(NSDictionary *)options;
-
-#endif
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.m b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.m
deleted file mode 100644
index 04bab8bdcbf..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRLanguageIdentificationOptions.m
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import "RCTConvert+FIRLanguageIdentificationOptions.h"
-
-@implementation RCTConvert (FIRApp)
-#if __has_include()
-
-+ (FIRLanguageIdentificationOptions *)firLanguageIdOptionsFromDict:(NSDictionary *)options {
- if (options[@"confidenceThreshold"] == nil) {
- if (options[@"multipleLanguages"] != nil) {
- return [[FIRLanguageIdentificationOptions alloc] initWithConfidenceThreshold:FIRDefaultIdentifyPossibleLanguagesConfidenceThreshold];
- } else {
- return [[FIRLanguageIdentificationOptions alloc] initWithConfidenceThreshold:FIRDefaultIdentifyLanguageConfidenceThreshold];
- }
- }
-
- float confidenceThreshold = [options[@"confidenceThreshold"] floatValue];
- return [[FIRLanguageIdentificationOptions alloc] initWithConfidenceThreshold:confidenceThreshold];
-}
-
-RCT_CUSTOM_CONVERTER(FIRLanguageIdentificationOptions *, FIRLanguageIdentificationOptions, [self firLanguageIdOptionsFromDict:[self NSDictionary:json]]);
-#endif
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.h b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.h
deleted file mode 100644
index 406e0c24b47..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import
-
-#import
-
-@interface RCTConvert (FIRTextMessageArray)
-#if __has_include()
-+ (FIRTextMessage *)FIRTextMessage:(id)json;
-#endif
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.m b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.m
deleted file mode 100644
index 3641b77004e..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RCTConvert+FIRTextMessageArray.m
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import "RCTConvert+FIRTextMessageArray.h"
-
-@implementation RCTConvert (FIRTextMessageArray)
-#if __has_include()
-+ (FIRTextMessage *)FIRTextMessage:(id)json {
- NSDictionary *messageDict = [self NSDictionary:json];
- FIRTextMessage *firTextMessage = [
- [FIRTextMessage alloc]
- initWithText:messageDict[@"text"]
- timestamp:[[messageDict valueForKey:@"timestamp"] doubleValue]
- userID:messageDict[@"userId"] ? messageDict[@"userId"] : @""
- isLocalUser:messageDict[@"isLocalUser"] ? YES : NO
- ];
- return firTextMessage;
-}
-
-RCT_ARRAY_CONVERTER(FIRTextMessage)
-#endif
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.h b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.h
deleted file mode 100644
index 905bdad5528..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import
-#import
-#import
-
-@interface RNFBMLNaturalLanguageIdModule : NSObject
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.m b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.m
deleted file mode 100644
index 5c129d16a86..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageIdModule.m
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import "RNFBMLNaturalLanguageIdModule.h"
-#if __has_include()
-
-#import
-#import "RNFBSharedUtils.h"
-
-
-#define DEPENDENCY_EXISTS=1
-#endif
-
-
-@implementation RNFBMLNaturalLanguageIdModule
-#pragma mark -
-#pragma mark Module Setup
-
-RCT_EXPORT_MODULE();
-
-#pragma mark -
-#pragma mark Firebase Mlkit Language Id Methods
-
-#ifdef DEPENDENCY_EXISTS
-
-RCT_EXPORT_METHOD(identifyLanguage:
- (FIRApp *) firebaseApp
- : (NSString *)text
- : (FIRLanguageIdentificationOptions *)identificationOptions
- : (RCTPromiseResolveBlock)resolve
- : (RCTPromiseRejectBlock)reject
-) {
- FIRNaturalLanguage *nL = [FIRNaturalLanguage naturalLanguageForApp:firebaseApp];
- FIRLanguageIdentification *languageId = [nL languageIdentificationWithOptions:identificationOptions];
- FIRIdentifyLanguageCallback completion = ^(NSString *_Nullable languageCode, NSError *_Nullable error) {
- if (error != nil) {
- [self promiseRejectMLKitException:reject error:error];
- } else {
- resolve(languageCode);
- }
- };
- [languageId identifyLanguageForText:text completion:completion];
-}
-
-RCT_EXPORT_METHOD(identifyPossibleLanguages:
- (FIRApp *) firebaseApp
- : (NSString *)text
- : (FIRLanguageIdentificationOptions *)identificationOptions
- : (RCTPromiseResolveBlock)resolve
- : (RCTPromiseRejectBlock)reject
-) {
- FIRNaturalLanguage *nL = [FIRNaturalLanguage naturalLanguageForApp:firebaseApp];
- FIRLanguageIdentification *languageId = [nL languageIdentificationWithOptions:identificationOptions];
- FIRIdentifyPossibleLanguagesCallback completion = ^(NSArray *identifiedLanguages, NSError *error) {
- if (error != nil) {
- [self promiseRejectMLKitException:reject error:error];
- } else {
- NSMutableArray *languages = [[NSMutableArray alloc] initWithCapacity:identifiedLanguages.count];
- for (FIRIdentifiedLanguage *identifiedLanguage in identifiedLanguages) {
- [languages addObject:@{
- @"language": identifiedLanguage.languageCode,
- @"confidence": @(identifiedLanguage.confidence)
- }];
- }
- resolve(languages);
- }
- };
- [languageId identifyPossibleLanguagesForText:text completion:completion];
-}
-
-- (void)promiseRejectMLKitException:(RCTPromiseRejectBlock)reject error:(NSError *)error {
- // TODO no way to distinguish between the error codes like Android supports
- [RNFBSharedUtils rejectPromiseWithUserInfo:reject userInfo:(NSMutableDictionary *) @{
- @"code": @"unknown",
- @"message": [error localizedDescription],
- }];
-}
-
-#endif
-
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.h b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.h
deleted file mode 100644
index b6a0510774e..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import
-
-#import
-
-@interface RNFBMLNaturalLanguageSmartReplyModule : NSObject
-
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.m b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.m
deleted file mode 100644
index 9fb79b90bf9..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageSmartReplyModule.m
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#import "RNFBMLNaturalLanguageSmartReplyModule.h"
-
-#if __has_include()
-#import
-#import "RNFBSharedUtils.h"
-#define DEPENDENCY_EXISTS=1
-#endif
-
-@implementation RNFBMLNaturalLanguageSmartReplyModule
-#pragma mark -
-#pragma mark Module Setup
-
-RCT_EXPORT_MODULE();
-
-#pragma mark -
-#pragma mark Firebase Mlkit Smart Reply Methods
-
-#ifdef DEPENDENCY_EXISTS
-RCT_EXPORT_METHOD(suggestReplies:
- (FIRApp *) firebaseApp
- : (NSArray *)messages
- : (RCTPromiseResolveBlock)resolve
- : (RCTPromiseRejectBlock)reject
-) {
- FIRNaturalLanguage *naturalLanguage = [FIRNaturalLanguage naturalLanguage];
- FIRSmartReply *smartReply = [naturalLanguage smartReply];
-
- FIRSmartReplyCallback completion = ^(
- FIRSmartReplySuggestionResult *_Nullable result,
- NSError *_Nullable error
- ) {
- if (error != nil) {
- [self promiseRejectMLKitException:reject error:error];
- return;
- }
-
- if (result.status == FIRSmartReplyResultStatusSuccess) {
- NSMutableArray *smartReplies = [[NSMutableArray alloc] initWithCapacity:result.suggestions.count];
-
- for (FIRSmartReplySuggestion *suggestion in result.suggestions) {
- NSMutableDictionary *smartReplyDict = [NSMutableDictionary dictionary];
- smartReplyDict[@"text"] = suggestion.text;
- [smartReplies addObject:smartReplyDict];
- }
-
- resolve(smartReplies);
- } else {
- resolve(@[]);
- }
- };
-
- [smartReply suggestRepliesForMessages:messages completion:completion];
-}
-
-- (void)promiseRejectMLKitException:(RCTPromiseRejectBlock)reject error:(NSError *)error {
- // TODO no way to distinguish between the error codes like Android supports
- [RNFBSharedUtils rejectPromiseWithUserInfo:reject userInfo:(NSMutableDictionary *) @{
- @"code": @"unknown",
- @"message": [error localizedDescription],
- }];
-}
-#endif
-
-@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.h b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.h
deleted file mode 100644
index d17b0c0dcbe..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-// TODO not supported until SDK 6.0.0
-//
-//#import
-//#import
-//
-//@interface RNFBMLNaturalLanguageTranslateModule : NSObject
-//@end
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.m b/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.m
deleted file mode 100644
index 840d5c22cb2..00000000000
--- a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage/RNFBMLNaturalLanguageTranslateModule.m
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-// TODO not supported until SDK 6.0.0
-//
-//
-//#import
-//#import "RNFBMLNaturalLanguageTranslateModule.h"
-//
-//
-//@implementation RNFBMLNaturalLanguageTranslateModule
-//#pragma mark -
-//#pragma mark Module Setup
-//
-//RCT_EXPORT_MODULE();
-//
-//- (dispatch_queue_t)methodQueue {
-// return dispatch_get_main_queue();
-//}
-//
-//#pragma mark -
-//#pragma mark Firebase Mlkit Translate Methods
-//@end
diff --git a/packages/ml-natural-language/lib/TranslateModelManager.js b/packages/ml-natural-language/lib/TranslateModelManager.js
deleted file mode 100644
index cd3f731ceb0..00000000000
--- a/packages/ml-natural-language/lib/TranslateModelManager.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// TODO not available on iOS until SDK 6.0.0
-// export default class TranslateModelManager {
-// constructor(ml) {
-// this.ml = ml;
-// }
-//
-// downloadRemoteModelIfNeeded(language, downloadConditions = {}) {
-// // TODO(salakar) arg validation + tests
-// // downloadConditions:
-// // requireCharging
-// // requireDeviceIdle
-// // requireDeviceIdle
-// const languageId = this.ml.native.TRANSLATE_LANGUAGES[language];
-// return this.ml.native.modelManagerDownloadRemoteModelIfNeeded(languageId, downloadConditions);
-// }
-//
-// // TODO no ios support until SDK v6.0.0
-// deleteDownloadedModel(language) {
-// return this.ml.native.modelManagerDeleteDownloadedModel(language);
-// }
-//
-// getAvailableModels() {
-// return this.ml.native.modelManagerGetAvailableModels();
-// }
-// }
diff --git a/packages/ml-natural-language/lib/index.d.ts b/packages/ml-natural-language/lib/index.d.ts
deleted file mode 100644
index ef4e4e12e67..00000000000
--- a/packages/ml-natural-language/lib/index.d.ts
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { ReactNativeFirebase } from '@react-native-firebase/app';
-
-/**
- * Firebase ML Kit package for React Native.
- *
- * #### Example 1
- *
- * Access the firebase export from the `naturalLanguage` package:
- *
- * ```js
- * import { firebase } from '@react-native-firebase/ml-natural-language';
- *
- * // firebase.naturalLanguage().X
- * ```
- *
- * #### Example 2
- *
- * Using the default export from the `naturalLanguage` package:
- *
- * ```js
- * import naturalLanguage from '@react-native-firebase/ml-natural-language';
- *
- * // naturalLanguage().X
- * ```
- *
- * #### Example 3
- *
- * Using the default export from the `app` package:
- *
- * ```js
- * import firebase from '@react-native-firebase/app';
- * import '@react-native-firebase/ml-natural-language';
- *
- * // firebase.naturalLanguage().X
- * ```
- *
- * @firebase ml-natural-language
- */
-export namespace FirebaseLanguageTypes {
- import FirebaseModule = ReactNativeFirebase.FirebaseModule;
-
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- export interface Statics {}
-
- /**
- * An interface representing the language identification options to be used with the
- * `identifyLanguage` and `identifyPossibleLanguages` methods.
- */
- export interface LanguageIdentificationOptions {
- /**
- * The confidence threshold for language identification. The identified languages will have a
- * confidence higher or equal to the confidence threshold. The value should be between 0 and 1, e.g. 0.5.
- *
- * If no value is set, a default value is used instead.
- *
- */
- confidenceThreshold?: number;
- }
-
- /**
- * An identified language for the given input text. Returned as an Array of IdentifiedLanguage from
- * `identifyPossibleLanguages`.
- */
- export interface IdentifiedLanguage {
- /**
- * The [BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag) for the language, e.g. 'en'.
- */
- language: string;
-
- /**
- * The confidence score of the language. A float value between 0 and 1.
- */
- confidence: number;
- }
-
- /**
- * An interface representing a suggested reply, an array of these are returned from `suggestReplies`.
- *
- * #### Example
- *
- * ```js
- * const replies = await firebase.naturalLanguage().suggestReplies([
- * { text: "Hey, long time no speak!", },
- * { text: 'I know right, it has been a while..', userId: 'xxxx', isLocalUser: false },
- * { text: 'We should catchup some time!', },
- * { text: 'Definitely, how about we go for lunch this week?', userId: 'xxxx', isLocalUser: false },
- * ]);
- *
- * replies.forEach(reply => {
- * console.log(reply.text);
- * });
- *
- * ```
- *
- */
- export interface SuggestedReply {
- /**
- * The smart reply text.
- */
- text: string;
- }
-
- /**
- * The Firebase ML Kit service interface.
- *
- * > This module is available for the default app only.
- *
- * #### Example
- *
- * Get the ML Kit service for the default app:
- *
- * ```js
- * const defaultAppMLKit = firebase.naturalLanguage();
- * ```
- */
- export class Module extends FirebaseModule {
- /**
- * Identifies the main language for the given text.
- *
- * Returns a promise that resolves with a [BCP-47 language code](https://en.wikipedia.org/wiki/IETF_language_tag) of the detected language.
- *
- * If the language was undetected or unknown the code returned is `und`.
- *
- * #### Example
- *
- * ```js
- * const language = await firebase.naturalLanguage().identifyLanguage('Hello there. General Kenobi.');
- * console.warn(language); // en
- *
- * const unknownLanguage = await firebase.naturalLanguage().identifyLanguage('foo bar baz', { confidenceThreshold: 0.9 });
- * console.warn(language); // und
- * ```
- *
- * @param text The input text to use for identifying the language. Inputs longer than 200 characters are truncated to 200 characters, as longer input does not improve the detection accuracy.
- * @param options See `LanguageIdentificationOptions`.
- */
- identifyLanguage(text: string, options?: LanguageIdentificationOptions): Promise;
-
- /**
- * Identifies possible languages for the given text.
- *
- * #### Example
- *
- * ```js
- * const identifiedLanguages = firebase.naturalLanguage().identifyPossibleLanguages('hello world');
- * console.warn(identifiedLanguages[0].language); // en
- * ```
- *
- * @param text The input text to use for identifying the language. Inputs longer than 200 characters are truncated to 200 characters, as longer input does not improve the detection accuracy.
- * @param options See `LanguageIdentificationOptions`.
- */
- identifyPossibleLanguages(
- text: string,
- options?: LanguageIdentificationOptions,
- ): Promise;
-
- /**
- * Returns suggested replies for a conversation.
- *
- * #### Example
- *
- * ```js
- * const replies = await firebase.naturalLanguage().suggestReplies([
- * { text: "Hey, long time no speak!", },
- * { text: 'I know right, it has been a while..', userId: 'xxxx', isLocalUser: false },
- * { text: 'We should catchup some time!', },
- * { text: 'Definitely, how about we go for lunch this week?', userId: 'xxxx', isLocalUser: false },
- * ]);
- * ```
- *
- * @param messages An array of `TextMessage` interfaces.
- */
- suggestReplies(messages: TextMessage[]): Promise;
- }
-
- /**
- * A `TextMessage` interface provided to `suggestReplies()`.
- */
- export interface TextMessage {
- /**
- * The message text.
- *
- * This is required and must not be an empty string.
- */
- text: string;
-
- /**
- * Whether the message is a local user. If false, a `userId` must be provided for the message.
- *
- * Defaults to true.
- */
- isLocalUser?: boolean;
-
- /**
- * A user ID of a remote user.
- *
- * Used to help better identify users to provide more accurate replies.
- */
- userId?: string;
-
- /**
- * The timestamp of the message in milliseconds.
- *
- * Defaults to now (`Date.now()`).
- */
- timestamp?: number;
- }
-}
-
-declare const defaultExport: ReactNativeFirebase.FirebaseModuleWithStaticsAndApp<
- FirebaseLanguageTypes.Module,
- FirebaseLanguageTypes.Statics
->;
-
-export const firebase: ReactNativeFirebase.Module & {
- naturalLanguage: typeof defaultExport;
- app(
- name?: string,
- ): ReactNativeFirebase.FirebaseApp & { naturalLanguage(): FirebaseLanguageTypes.Module };
-};
-
-export default defaultExport;
-
-/**
- * Attach namespace to `firebase.` and `FirebaseApp.`.
- */
-declare module '@react-native-firebase/app' {
- namespace ReactNativeFirebase {
- import FirebaseModuleWithStaticsAndApp = ReactNativeFirebase.FirebaseModuleWithStaticsAndApp;
-
- interface Module {
- naturalLanguage: FirebaseModuleWithStaticsAndApp<
- FirebaseLanguageTypes.Module,
- FirebaseLanguageTypes.Statics
- >;
- }
-
- interface FirebaseApp {
- naturalLanguage(): FirebaseLanguageTypes.Module;
- }
-
- interface FirebaseJsonConfig {
- /**
- * If `true`, the Language ID Model will be installed onto the device.
- */
- ml_natural_language_language_id_model: boolean;
-
- /**
- * If `true`, the Smart Reply Model will be installed onto the device.
- */
- ml_natural_language_smart_reply_model: boolean;
- }
- }
-}
diff --git a/packages/ml-natural-language/lib/index.js b/packages/ml-natural-language/lib/index.js
deleted file mode 100644
index f619d4e8064..00000000000
--- a/packages/ml-natural-language/lib/index.js
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {
- isArray,
- isNumber,
- isObject,
- isString,
- isUndefined,
- validateOptionalNativeDependencyExists,
-} from '@react-native-firebase/app/lib/common';
-import {
- createModuleNamespace,
- FirebaseModule,
- getFirebaseRoot,
-} from '@react-native-firebase/app/lib/internal';
-import validateTextMessage from './validateTextMessage';
-import version from './version';
-
-// TODO not available on iOS until SDK 6.0.0
-// import TranslateModelManager from './TranslateModelManager';
-
-const statics = {};
-const namespace = 'naturalLanguage';
-const nativeModuleName = [
- 'RNFBMLNaturalLanguageIdModule',
- 'RNFBMLNaturalLanguageTranslateModule',
- 'RNFBMLNaturalLanguageSmartReplyModule',
-];
-
-function validateIdentifyLanguageArgs(text, options, methodName) {
- if (!isString(text)) {
- throw new Error(
- `firebase.naturalLanguage().${methodName}(*, _) 'text' must be a string value.`,
- );
- }
-
- if (!isObject(options)) {
- throw new Error(
- `firebase.naturalLanguage().${methodName}(_, *) 'options' must be an object or undefined.`,
- );
- }
-
- if (
- !isUndefined(options.confidenceThreshold) &&
- (!isNumber(options.confidenceThreshold) ||
- options.confidenceThreshold < 0 ||
- options.confidenceThreshold > 1)
- ) {
- throw new Error(
- `firebase.naturalLanguage().${methodName}(_, *) 'options.confidenceThreshold' must be a float value between 0 and 1.`,
- );
- }
-}
-
-class FirebaseMlKitLanguageModule extends FirebaseModule {
- identifyLanguage(text, options = {}) {
- validateOptionalNativeDependencyExists(
- 'ml_natural_language_language_id_model',
- 'ML Kit Language Identification',
- !!this.native.identifyLanguage,
- );
- validateIdentifyLanguageArgs(text, options, 'identifyLanguage');
- return this.native.identifyLanguage(text.slice(0, 200), options);
- }
-
- identifyPossibleLanguages(text, options = {}) {
- validateOptionalNativeDependencyExists(
- 'ml_natural_language_language_id_model',
- 'ML Kit Language Identification',
- !!this.native.identifyPossibleLanguages,
- );
- validateIdentifyLanguageArgs(text, options, 'identifyPossibleLanguages');
- return this.native.identifyPossibleLanguages(
- text.slice(0, 200),
- Object.assign({}, options, { multipleLanguages: true }),
- );
- }
-
- suggestReplies(messages) {
- if (!isArray(messages)) {
- throw new Error(
- "firebase.naturalLanguage().suggestReplies(*) 'messages' must be an array value.",
- );
- }
-
- if (messages.length === 0) {
- return Promise.resolve([]);
- }
-
- const validated = [];
-
- for (let i = 0; i < messages.length; i++) {
- try {
- validated.push(validateTextMessage(messages[i]));
- } catch (e) {
- throw new Error(
- `firebase.naturalLanguage().suggestReplies(*) 'messages' object at index ${i} threw an error. ${e.message}.`,
- );
- }
- }
-
- return this.native.suggestReplies(validated);
- }
-}
-
-// import { SDK_VERSION } from '@react-native-firebase/mlkit';
-export const SDK_VERSION = version;
-
-// import naturalLanguage from '@react-native-firebase/mlkit';
-// 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);
-// }
-//
-// get translateModelManager() {
-// return new TranslateModelManager(this);
-// }
diff --git a/packages/ml-natural-language/lib/validateTextMessage.js b/packages/ml-natural-language/lib/validateTextMessage.js
deleted file mode 100644
index 9b39f474628..00000000000
--- a/packages/ml-natural-language/lib/validateTextMessage.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {
- hasOwnProperty,
- isBoolean,
- isNumber,
- isObject,
- isString,
-} from '@react-native-firebase/app/lib/common';
-
-export default function validateTextMessage(textMessage) {
- if (!isObject(textMessage)) {
- throw new Error("'textMessage' expected an object value");
- }
-
- const out = {
- timestamp: Date.now(),
- isLocalUser: true,
- };
-
- if (!isString(textMessage.text)) {
- throw new Error("'textMessage.text' expected a string value");
- }
-
- if (textMessage.text.length === 0) {
- throw new Error("'textMessage.text' expected string value to not be empty");
- }
-
- out.text = textMessage.text;
-
- if (hasOwnProperty(textMessage, 'timestamp')) {
- if (!isNumber(textMessage.timestamp)) {
- throw new Error("'textMessage.timestamp' expected number value (milliseconds)");
- }
-
- out.timestamp = textMessage.timestamp;
- }
-
- if (hasOwnProperty(textMessage, 'isLocalUser')) {
- if (!isBoolean(textMessage.isLocalUser)) {
- throw new Error("'textMessage.isLocalUser' expected boolean value");
- }
-
- out.isLocalUser = textMessage.isLocalUser;
- }
-
- if (out.isLocalUser && hasOwnProperty(textMessage, 'userId')) {
- throw new Error(
- "'textMessage.userId' expected 'textMessage.isLocalUser' to be false when setting a user ID.",
- );
- } else if (!out.isLocalUser && !hasOwnProperty(textMessage, 'userId')) {
- throw new Error("'textMessage.userId' expected a string value");
- } else if (!out.isLocalUser && hasOwnProperty(textMessage, 'userId')) {
- if (!isString(textMessage.userId)) {
- throw new Error("'textMessage.userId' expected a string value");
- }
-
- if (textMessage.userId.length === 0) {
- throw new Error("'textMessage.userId' expected string value to not be empty");
- }
-
- out.userId = textMessage.userId;
- }
-
- return out;
-}
diff --git a/packages/ml-natural-language/package.json b/packages/ml-natural-language/package.json
deleted file mode 100644
index 353a1d4eb9f..00000000000
--- a/packages/ml-natural-language/package.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "name": "@react-native-firebase/ml-natural-language",
- "version": "7.4.10",
- "author": "Invertase (http://invertase.io)",
- "description": "React Native Firebase - Firebase ML Kit brings the power of machine learning to your React Native application, supporting both Android & iOS.",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "genversion --semi lib/version.js",
- "build:clean": "rimraf android/build && rimraf ios/build",
- "prepare": "yarn run build"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/invertase/react-native-firebase/tree/master/packages/ml-natural-language"
- },
- "license": "Apache-2.0",
- "keywords": [
- "react",
- "react-native",
- "firebase",
- "mlkit",
- "identify language",
- "smart replies",
- "machine learning",
- "barcode",
- "label",
- "natural language",
- "nlp",
- "vision"
- ],
- "peerDependencies": {
- "@react-native-firebase/app": "8.4.7"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/ml-natural-language/type-test.ts b/packages/ml-natural-language/type-test.ts
deleted file mode 100644
index bee7bb9abcf..00000000000
--- a/packages/ml-natural-language/type-test.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import firebase from '@react-native-firebase/app';
-import * as language from '@react-native-firebase/ml-natural-language';
-
-console.log(language.default().app);
-
-// checks module exists at root
-console.log(firebase.naturalLanguage().app.name);
-
-// checks module exists at app level
-console.log(firebase.app().naturalLanguage().app.name);
-
-// checks statics exist
-console.log(firebase.naturalLanguage.SDK_VERSION);
-
-// checks statics exist on defaultExport
-console.log(firebase.SDK_VERSION);
-
-// checks root exists
-console.log(firebase.SDK_VERSION);
-
-// checks firebase named export exists on module
-console.log(language.firebase.SDK_VERSION);
-
-// checks multi-app support exists
-console.log(firebase.naturalLanguage(firebase.app()).app.name);
-
-firebase
- .naturalLanguage()
- .identifyLanguage('foo', {
- confidenceThreshold: 0.3,
- })
- .then(str => str.replace);
-
-firebase
- .naturalLanguage()
- .identifyPossibleLanguages('foo', {
- confidenceThreshold: 0.3,
- })
- .then(languages => languages.forEach($ => $.confidence));
-
-firebase
- .naturalLanguage()
- .suggestReplies([
- {
- text: 'foo',
- isLocalUser: true,
- userId: '123',
- timestamp: 123,
- },
- ])
- .then(replies => {
- replies.forEach($ => $.text);
- });
diff --git a/packages/ml-vision/.npmignore b/packages/ml-vision/.npmignore
deleted file mode 100644
index 29e5aa19bbf..00000000000
--- a/packages/ml-vision/.npmignore
+++ /dev/null
@@ -1,66 +0,0 @@
-# Built application files
-android/*/build/
-
-# Crashlytics configuations
-android/com_crashlytics_export_strings.xml
-
-# Local configuration file (sdk path, etc)
-android/local.properties
-
-# Gradle generated files
-android/.gradle/
-
-# Signing files
-android/.signing/
-
-# User-specific configurations
-android/.idea/gradle.xml
-android/.idea/libraries/
-android/.idea/workspace.xml
-android/.idea/tasks.xml
-android/.idea/.name
-android/.idea/compiler.xml
-android/.idea/copyright/profiles_settings.xml
-android/.idea/encodings.xml
-android/.idea/misc.xml
-android/.idea/modules.xml
-android/.idea/scopes/scope_settings.xml
-android/.idea/vcs.xml
-android/*.iml
-
-# Xcode
-*.pbxuser
-*.mode1v3
-*.mode2v3
-*.perspectivev3
-*.xcuserstate
-ios/Pods
-ios/build
-*project.xcworkspace*
-*xcuserdata*
-
-# OS-specific files
-.DS_Store
-.DS_Store?
-._*
-.Spotlight-V100
-.Trashes
-ehthumbs.db
-Thumbs.dbandroid/gradle
-android/gradlew
-android/build
-android/gradlew.bat
-android/gradle/
-
-.idea
-coverage
-yarn.lock
-e2e/
-.github
-.vscode
-.nyc_output
-android/.settings
-*.coverage.json
-.circleci
-.eslintignore
-type-test.ts
diff --git a/packages/ml-vision/LICENSE b/packages/ml-vision/LICENSE
deleted file mode 100644
index ef3ed44f066..00000000000
--- a/packages/ml-vision/LICENSE
+++ /dev/null
@@ -1,32 +0,0 @@
-Apache-2.0 License
-------------------
-
-Copyright (c) 2016-present Invertase Limited & Contributors
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this library except in compliance with the License.
-
-You may obtain a copy of the Apache-2.0 License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
-Creative Commons Attribution 3.0 License
-----------------------------------------
-
-Copyright (c) 2016-present Invertase Limited & Contributors
-
-Documentation and other instructional materials provided for this project
-(including on a separate documentation repository or it's documentation website) are
-licensed under the Creative Commons Attribution 3.0 License. Code samples/blocks
-contained therein are licensed under the Apache License, Version 2.0 (the "License"), as above.
-
-You may obtain a copy of the Creative Commons Attribution 3.0 License at
-
- https://creativecommons.org/licenses/by/3.0/
diff --git a/packages/ml-vision/README.md b/packages/ml-vision/README.md
deleted file mode 100644
index 616b6652207..00000000000
--- a/packages/ml-vision/README.md
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
React Native Firebase - ML Kit Vision
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
----
-
-Bring powerful machine learning vision APIs to your mobile app whether you're new or experienced in ML. Get started easily by using ready-to-use APIs from Firebase for common mobile use cases, or import your own custom models which can be hosted and served to your apps by Firebase. ML Kit APIs can run on-device or in the cloud, depending on the functionality, and some give you both choices.
-
-This module currently supports the following Firebase ML Kit Vision APIs:
-
-| API | Cloud Model | On Device |
-|-------------------------------------|-------------|-----------|
-| [Text Recognition](https://firebase.google.com/docs/ml-kit/recognize-text) | ✅ | ✅ |
-| [Document Text Recognition](https://firebase.google.com/docs/ml-kit/recognize-text)) | ✅ | |
-| [Face Detection](https://firebase.google.com/docs/ml-kit/detect-faces) | | ✅ |
-| [Barcode Scanning](https://firebase.google.com/docs/ml-kit/read-barcodes) | | ✅ |
-| [Image Labeling](https://firebase.google.com/docs/ml-kit/label-images) | ✅ | ✅ |
-| [Landmark Recognition](https://firebase.google.com/docs/ml-kit/recognize-landmarks) | | ✅ |
-| [AutoML Vision Edge](https://firebase.google.com/docs/ml-kit/automl-image-labeling) | ❌ | ❌ |
-| [Object Detection/Tracking](https://firebase.google.com/docs/ml-kit/object-detection) | ❌ | ❌ |
-| Image Labeling (with [Custom Model]((https://firebase.google.com/docs/ml-kit/label-images))) | ❌ | ❌ |
-
-[> Learn More](https://firebase.google.com/products/ml-kit/)
-
-## Installation
-
-Requires `@react-native-firebase/app` to be installed.
-
-```bash
-yarn add @react-native-firebase/ml-vision
-```
-
-## Documentation
-
-- [Quick Start](https://rnfirebase.io/ml-vision/usage)
-- [Reference](https://rnfirebase.io/reference/ml-vision)
-
-### Additional Topics
-
-- [Text Recognition](https://rnfirebase.io/ml-vision/text-recognition)
-- [Landmark Recognition](https://rnfirebase.io/ml-vision/landmark-recognition)
-- [Barcode Scanning](https://rnfirebase.io/ml-vision/barcode-scanning)
-- [Image Labeling](https://rnfirebase.io/ml-vision/image-labeling)
-- [Face Detection](https://rnfirebase.io/ml-vision/face-detection)
-
-
-
-## License
-
-- See [LICENSE](/LICENSE)
-
----
-
-
-
-
- Built and maintained with 💛 by Invertase .
-
-
-
----
diff --git a/packages/ml-vision/android/.editorconfig b/packages/ml-vision/android/.editorconfig
deleted file mode 100644
index 670398e9904..00000000000
--- a/packages/ml-vision/android/.editorconfig
+++ /dev/null
@@ -1,10 +0,0 @@
-# editorconfig
-root = true
-
-[*]
-indent_style = space
-indent_size = 2
-end_of_line = lf
-charset = utf-8
-trim_trailing_whitespace = true
-insert_final_newline = true
diff --git a/packages/ml-vision/android/lint.xml b/packages/ml-vision/android/lint.xml
deleted file mode 100644
index c3dd72aca07..00000000000
--- a/packages/ml-vision/android/lint.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/packages/ml-vision/android/ml-models.gradle b/packages/ml-vision/android/ml-models.gradle
deleted file mode 100644
index af7ec7e37f6..00000000000
--- a/packages/ml-vision/android/ml-models.gradle
+++ /dev/null
@@ -1,49 +0,0 @@
-apply from: file("./../../app/android/firebase-json.gradle")
-
-def mlModels = [
- 'ml_vision_face_model',
- 'ml_vision_image_label_model',
- // 'ml_vision_object_detection_model', // object tracking -> TODO 6.1
-]
-
-dependencies {
- if (rootProject.ext && rootProject.ext.firebaseJson) {
- mlModels.each { modelFlag ->
- if (rootProject.ext.firebaseJson.isFlagEnabled(modelFlag) == true) {
- rootProject.logger.info ":${project.name} model enabled: '${modelFlag}'"
- implementation "com.google.firebase:firebase-${modelFlag.replaceAll("_", "-")}"
- } else {
- rootProject.logger.warn ":${project.name} model disabled: '${modelFlag}'"
- }
- }
- } else {
- rootProject.logger.warn ":${project.name} skipping optional models as no firebaseJson extension found, you may be missing a firebase.json file in the root of your React Native project, or you've not installed the @react-native-firebase/app package and included it in your app build."
- }
-}
-
-def manifestModels = [
- 'ml_vision_ocr_model',
- 'ml_vision_face_model',
- 'ml_vision_barcode_model',
- 'ml_vision_label_model',
- // 'ml_vision_ica_model', // object tracking -> TODO 6.1
-]
-
-def manifestModelsString = ""
-
-manifestModels.each { modelFlag ->
- if (rootProject.ext && rootProject.ext.firebaseJson && rootProject.ext.firebaseJson.isFlagEnabled(modelFlag) == true) {
- def modelIdentifier = modelFlag.replace("ml_vision_", "").replace("_model", "")
- if (manifestModelsString.length() > 0) {
- manifestModelsString += "," + modelIdentifier
- } else {
- manifestModelsString += modelIdentifier
- }
- }
-}
-
-android {
- defaultConfig {
- manifestPlaceholders = [visionModels: manifestModelsString]
- }
-}
diff --git a/packages/ml-vision/android/src/main/AndroidManifest.xml b/packages/ml-vision/android/src/main/AndroidManifest.xml
deleted file mode 100644
index ed3a069d689..00000000000
--- a/packages/ml-vision/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionBarcodeDetectorModule.java b/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionBarcodeDetectorModule.java
deleted file mode 100644
index 602fa6f4566..00000000000
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionBarcodeDetectorModule.java
+++ /dev/null
@@ -1,282 +0,0 @@
-package io.invertase.firebase.ml.vision;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-import android.content.Context;
-import android.os.Bundle;
-import com.google.android.gms.tasks.Task;
-import com.google.android.gms.tasks.Tasks;
-import com.google.firebase.FirebaseApp;
-import com.google.firebase.ml.vision.FirebaseVision;
-import com.google.firebase.ml.vision.barcode.FirebaseVisionBarcode;
-import com.google.firebase.ml.vision.barcode.FirebaseVisionBarcodeDetector;
-import com.google.firebase.ml.vision.barcode.FirebaseVisionBarcodeDetectorOptions;
-import com.google.firebase.ml.vision.common.FirebaseVisionImage;
-import io.invertase.firebase.common.SharedUtils;
-import io.invertase.firebase.common.UniversalFirebaseModule;
-
-import java.util.*;
-
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
-
-@SuppressWarnings("ConstantConditions")
-class UniversalFirebaseMLVisionBarcodeDetectorModule extends UniversalFirebaseModule {
-
- UniversalFirebaseMLVisionBarcodeDetectorModule(Context context, String serviceName) {
- super(context, serviceName);
- }
-
- Task>> barcodeDetectorProcessImage(String appName, String stringUri, Bundle barcodeDetectorOptions) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseVisionBarcodeDetectorOptions options = getBarcodeDetectorOptions(barcodeDetectorOptions);
-
- FirebaseVisionBarcodeDetector visionBarcodeDetector = FirebaseVision.getInstance(firebaseApp)
- .getVisionBarcodeDetector(options);
-
- FirebaseVisionImage image = FirebaseVisionImage.fromFilePath(
- getContext(),
- SharedUtils.getUri(stringUri)
- );
-
- List detectedBarcodesRaw = Tasks.await(visionBarcodeDetector.detectInImage(image));
-
- return getBarcodesList(detectedBarcodesRaw);
- });
- }
-
- private List> getBarcodesList(List detectedBarcodesRaw) {
- List> detectedBarcodesFormatted = new ArrayList<>(detectedBarcodesRaw.size());
-
- for (FirebaseVisionBarcode barcode : detectedBarcodesRaw) {
- Map barcodeMap = new HashMap<>();
- barcodeMap.put(KEY_BOUNDING_BOX, SharedUtils.rectToIntArray(barcode.getBoundingBox()));
- barcodeMap.put(KEY_CORNER_POINTS, SharedUtils.pointsToIntsList(barcode.getCornerPoints()));
- barcodeMap.put(KEY_FORMAT, barcode.getFormat());
- barcodeMap.put(KEY_VALUE_TYPE, barcode.getValueType());
- barcodeMap.put(KEY_DISPLAY_VALUE, barcode.getDisplayValue());
- barcodeMap.put(KEY_RAW_VALUE, barcode.getRawValue());
-
- // `calendarEvent`
- addCalendarEventFromBarcodeToMap(barcode, barcodeMap);
-
- // `contactInfo`
- addContactInfoFromBarcodeToMap(barcode, barcodeMap);
-
- // driverLicense
- addDriverLicenseFromBarcodeToMap(barcode, barcodeMap);
-
- // email
- addEmailFromBarcodeToMap(barcode, barcodeMap);
-
- // geoPoint
- addGeoPointFromBarcodeToMap(barcode, barcodeMap);
-
- // phone
- addPhoneFromBarcodeToMap(barcode, barcodeMap);
-
- // sms
- addSmsFromBarcodeToMap(barcode, barcodeMap);
-
- // url
- addUrlFromBarcodeToMap(barcode, barcodeMap);
-
- // wifi
- addWifiFromBarcodeToMap(barcode, barcodeMap);
-
- detectedBarcodesFormatted.add(barcodeMap);
- }
-
- return detectedBarcodesFormatted;
- }
-
- private void addDriverLicenseFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getDriverLicense() == null) return;
- Map driverLicenseMap = new HashMap<>();
- FirebaseVisionBarcode.DriverLicense driverLicense = barcode.getDriverLicense();
- driverLicenseMap.put("addressCity", driverLicense.getAddressCity());
- driverLicenseMap.put("addressState", driverLicense.getAddressState());
- driverLicenseMap.put("addressStreet", driverLicense.getAddressStreet());
- driverLicenseMap.put("addressZip", driverLicense.getAddressZip());
- driverLicenseMap.put("birthDate", driverLicense.getBirthDate());
- driverLicenseMap.put("documentType", driverLicense.getDocumentType());
- driverLicenseMap.put("expiryDate", driverLicense.getExpiryDate());
- driverLicenseMap.put("firstName", driverLicense.getFirstName());
- driverLicenseMap.put("gender", driverLicense.getGender());
- driverLicenseMap.put("issueDate", driverLicense.getIssueDate());
- driverLicenseMap.put("issuingCountry", driverLicense.getIssuingCountry());
- driverLicenseMap.put("lastName", driverLicense.getLastName());
- driverLicenseMap.put("licenseNumber", driverLicense.getLicenseNumber());
- driverLicenseMap.put("middleName", driverLicense.getMiddleName());
- barcodeMap.put("driverLicense", driverLicenseMap);
- }
-
- private void addGeoPointFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getGeoPoint() == null) return;
- List latLng = new ArrayList<>(2);
- FirebaseVisionBarcode.GeoPoint geoPoint = barcode.getGeoPoint();
- latLng.add(geoPoint.getLat());
- latLng.add(geoPoint.getLng());
- barcodeMap.put(KEY_GEO_POINT, latLng);
- }
-
- private void addSmsFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getSms() == null) return;
- Map smsMap = new HashMap<>();
- FirebaseVisionBarcode.Sms sms = barcode.getSms();
- smsMap.put("message", sms.getMessage());
- smsMap.put("phoneNumber", sms.getPhoneNumber());
- barcodeMap.put(KEY_SMS, smsMap);
- }
-
- private void addUrlFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getUrl() == null) return;
- Map urlMap = new HashMap<>();
- FirebaseVisionBarcode.UrlBookmark url = barcode.getUrl();
- urlMap.put("title", url.getTitle());
- urlMap.put("url", url.getUrl());
- barcodeMap.put(KEY_URL, urlMap);
- }
-
- private void addWifiFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getWifi() == null) return;
- Map wifiMap = new HashMap<>();
- FirebaseVisionBarcode.WiFi wiFi = barcode.getWifi();
- wifiMap.put("encryptionType", wiFi.getEncryptionType());
- wifiMap.put("password", wiFi.getPassword());
- wifiMap.put("ssid", wiFi.getSsid());
- barcodeMap.put(KEY_WIFI, wifiMap);
- }
-
- private void addEmailFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getEmail() == null) return;
- barcodeMap.put(KEY_EMAIL, getEmailMap(barcode.getEmail()));
- }
-
- private void addPhoneFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getPhone() == null) return;
- barcodeMap.put(KEY_PHONE, getPhoneMap(barcode.getPhone()));
- }
-
- private void addCalendarEventFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getCalendarEvent() == null) return;
- Map calendarEventMap = new HashMap<>();
- FirebaseVisionBarcode.CalendarEvent calendarEvent = barcode.getCalendarEvent();
- calendarEventMap.put("description", calendarEvent.getDescription());
- calendarEventMap.put("end", calendarEvent.getEnd().getRawValue());
- calendarEventMap.put("location", calendarEvent.getLocation());
- calendarEventMap.put("organizer", calendarEvent.getOrganizer());
- calendarEventMap.put("start", calendarEvent.getStart().getRawValue());
- calendarEventMap.put("status", calendarEvent.getStatus());
- calendarEventMap.put("summary", calendarEvent.getSummary());
- barcodeMap.put(KEY_CALENDAR_EVENT, calendarEventMap);
- }
-
- private void addContactInfoFromBarcodeToMap(FirebaseVisionBarcode barcode, Map barcodeMap) {
- if (barcode.getContactInfo() == null) return;
- FirebaseVisionBarcode.ContactInfo contactInfo = barcode.getContactInfo();
- Map contactInfoMap = new HashMap<>();
-
- contactInfoMap.put("title", contactInfo.getTitle());
- contactInfoMap.put("organization", contactInfo.getOrganization());
- if (contactInfo.getUrls() == null) {
- contactInfoMap.put("urls", new String[]{});
- } else {
- contactInfoMap.put("urls", contactInfo.getUrls());
- }
-
- // phones
- List phonesListRaw = contactInfo.getPhones();
- List> phonesListFormatted = new ArrayList<>(phonesListRaw.size());
- for (FirebaseVisionBarcode.Phone phone : phonesListRaw) {
- phonesListFormatted.add(getPhoneMap(phone));
- }
- contactInfoMap.put("phones", phonesListFormatted);
-
- // emails
- List emailsListRaw = contactInfo.getEmails();
- List> emailsListFormatted = new ArrayList<>(emailsListRaw.size());
- for (FirebaseVisionBarcode.Email email : emailsListRaw) {
- emailsListFormatted.add(getEmailMap(email));
- }
- contactInfoMap.put("emails", emailsListFormatted);
-
- // person name
- contactInfoMap.put("name", getPersonNameMap(contactInfo.getName()));
-
- // addresses
- List addressListRaw = contactInfo.getAddresses();
- List> addressListFormatted = new ArrayList<>(addressListRaw.size());
- for (FirebaseVisionBarcode.Address email : addressListRaw) {
- addressListFormatted.add(getAddressMap(email));
- }
- contactInfoMap.put("addresses", addressListFormatted);
-
- barcodeMap.put(KEY_CONTACT_INFO, contactInfoMap);
- }
-
- private Map getAddressMap(FirebaseVisionBarcode.Address address) {
- Map addressMap = new HashMap<>();
- addressMap.put("lines", address.getAddressLines());
- addressMap.put("type", address.getType());
- return addressMap;
- }
-
- private Map getPersonNameMap(FirebaseVisionBarcode.PersonName personName) {
- Map personNameMap = new HashMap<>(7);
- personNameMap.put("first", personName.getFirst());
- personNameMap.put("formatted", personName.getFormattedName());
- personNameMap.put("last", personName.getLast());
- personNameMap.put("middle", personName.getMiddle());
- personNameMap.put("prefix", personName.getPrefix());
- personNameMap.put("pronunciation", personName.getPronunciation());
- personNameMap.put("suffix", personName.getSuffix());
- return personNameMap;
- }
-
- private Map getEmailMap(FirebaseVisionBarcode.Email email) {
- Map emailMap = new HashMap<>(3);
- emailMap.put("address", email.getAddress());
- emailMap.put("body", email.getBody());
- emailMap.put("subject", email.getSubject());
- return emailMap;
- }
-
- private Map getPhoneMap(FirebaseVisionBarcode.Phone phone) {
- Map phoneMap = new HashMap<>();
- phoneMap.put("number", phone.getNumber());
- phoneMap.put("type", phone.getType());
- return phoneMap;
- }
-
- private FirebaseVisionBarcodeDetectorOptions getBarcodeDetectorOptions(Bundle barcodeDetectorOptionsBundle) {
- FirebaseVisionBarcodeDetectorOptions.Builder builder = new FirebaseVisionBarcodeDetectorOptions.Builder();
-
- int[] formats = barcodeDetectorOptionsBundle.getIntArray("barcodeFormats");
- if (formats == null) return builder.build();
-
- if (formats.length == 1) {
- builder.setBarcodeFormats(formats[0]);
- } else if (formats.length > 1) {
- builder.setBarcodeFormats(formats[0], Arrays.copyOfRange(formats, 1, formats.length));
- }
-
- return builder.build();
- }
-}
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionFaceDetectorModule.java b/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionFaceDetectorModule.java
deleted file mode 100644
index 72d6768b56f..00000000000
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionFaceDetectorModule.java
+++ /dev/null
@@ -1,275 +0,0 @@
-package io.invertase.firebase.ml.vision;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
-import android.content.Context;
-import android.os.Bundle;
-import com.google.android.gms.tasks.Task;
-import com.google.android.gms.tasks.Tasks;
-import com.google.firebase.FirebaseApp;
-import com.google.firebase.ml.vision.FirebaseVision;
-import com.google.firebase.ml.vision.common.FirebaseVisionImage;
-import com.google.firebase.ml.vision.common.FirebaseVisionPoint;
-import com.google.firebase.ml.vision.face.*;
-import io.invertase.firebase.common.SharedUtils;
-import io.invertase.firebase.common.UniversalFirebaseModule;
-
-import java.util.*;
-
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
-
-class UniversalFirebaseMLVisionFaceDetectorModule extends UniversalFirebaseModule {
- UniversalFirebaseMLVisionFaceDetectorModule(Context context, String serviceName) {
- super(context, serviceName);
- }
-
- Task>> faceDetectorProcessImage(
- String appName,
- String stringUri,
- Bundle faceDetectorOptionsBundle
- ) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseVisionFaceDetectorOptions options = getFaceDetectorOptions(faceDetectorOptionsBundle);
- FirebaseVisionFaceDetector visionFaceDetector = FirebaseVision.getInstance(firebaseApp)
- .getVisionFaceDetector(options);
- FirebaseVisionImage image = FirebaseVisionImage.fromFilePath(
- getContext(),
- SharedUtils.getUri(stringUri)
- );
-
- List visionFacesRaw = Tasks.await(visionFaceDetector.detectInImage(image));
- List> visionFacesFormatted = new ArrayList<>(visionFacesRaw.size());
-
- for (FirebaseVisionFace visionFaceRaw : visionFacesRaw) {
- Map visionFaceFormatted = new HashMap<>();
-
- visionFaceFormatted.put(
- KEY_BOUNDING_BOX,
- SharedUtils.rectToIntArray(visionFaceRaw.getBoundingBox())
- );
- visionFaceFormatted.put(KEY_HEAD_EULER_ANGLE_Y, visionFaceRaw.getHeadEulerAngleY());
- visionFaceFormatted.put(KEY_HEAD_EULER_ANGLE_Z, visionFaceRaw.getHeadEulerAngleZ());
- visionFaceFormatted.put(
- KEY_LEFT_EYE_OPEN_PROBABILITY,
- visionFaceRaw.getLeftEyeOpenProbability()
- );
- visionFaceFormatted.put(
- KEY_RIGHT_EYE_OPEN_PROBABILITY,
- visionFaceRaw.getRightEyeOpenProbability()
- );
-
- visionFaceFormatted.put(KEY_SMILING_PROBABILITY, visionFaceRaw.getSmilingProbability());
- visionFaceFormatted.put(KEY_TRACKING_ID, visionFaceRaw.getTrackingId());
-
- List> faceContoursFormatted;
-
- if (options.getContourMode() == FirebaseVisionFaceDetectorOptions.NO_CONTOURS) {
- faceContoursFormatted = new ArrayList<>(0);
- } else {
- faceContoursFormatted = new ArrayList<>(14);
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.ALL_POINTS)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.FACE)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.LEFT_EYEBROW_TOP)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.LEFT_EYEBROW_BOTTOM)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.RIGHT_EYEBROW_TOP)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.RIGHT_EYEBROW_BOTTOM)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.LEFT_EYE)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.RIGHT_EYE)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.UPPER_LIP_TOP)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.UPPER_LIP_BOTTOM)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.LOWER_LIP_TOP)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.LOWER_LIP_BOTTOM)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.NOSE_BRIDGE)));
- faceContoursFormatted.add(getContourMap(visionFaceRaw.getContour(FirebaseVisionFaceContour.NOSE_BOTTOM)));
- }
-
- visionFaceFormatted.put(KEY_FACE_CONTOURS, faceContoursFormatted);
-
- List> faceLandmarksFormatted = new ArrayList<>(14);
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_BOTTOM) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_BOTTOM)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_RIGHT) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_RIGHT)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_LEFT) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.MOUTH_LEFT)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_EYE) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_EYE)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_EYE) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_EYE)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_EAR) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_EAR)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_EAR) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_EAR)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_CHEEK) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.RIGHT_CHEEK)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_CHEEK) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.LEFT_CHEEK)))
- );
- }
-
- if (visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.NOSE_BASE) != null) {
- faceLandmarksFormatted.add(getLandmarkMap(
- Objects.requireNonNull(visionFaceRaw.getLandmark(FirebaseVisionFaceLandmark.NOSE_BASE)))
- );
- }
-
- visionFaceFormatted.put(KEY_LANDMARKS, faceLandmarksFormatted);
- visionFacesFormatted.add(visionFaceFormatted);
- }
-
- return visionFacesFormatted;
- });
- }
-
- private Map getLandmarkMap(FirebaseVisionFaceLandmark visionFaceLandmark) {
- Map visionFaceLandmarkMap = new HashMap<>();
- visionFaceLandmarkMap.put(KEY_TYPE, visionFaceLandmark.getLandmarkType());
- visionFaceLandmarkMap.put(KEY_POSITION, getVisionPointMap(visionFaceLandmark.getPosition()));
- return visionFaceLandmarkMap;
- }
-
- private float[] getVisionPointMap(FirebaseVisionPoint visionPoint) {
- return new float[]{visionPoint.getX(), visionPoint.getY()};
- }
-
- private Map getContourMap(FirebaseVisionFaceContour visionFaceContour) {
- Map visionFaceContourMap = new HashMap<>();
-
- List pointsListRaw = visionFaceContour.getPoints();
- List pointsListFormatted = new ArrayList<>(pointsListRaw.size());
- for (FirebaseVisionPoint pointRaw : pointsListRaw) {
- pointsListFormatted.add(getVisionPointMap(pointRaw));
- }
-
- visionFaceContourMap.put(KEY_TYPE, visionFaceContour.getFaceContourType());
- visionFaceContourMap.put(KEY_POINTS, pointsListFormatted);
-
- return visionFaceContourMap;
- }
-
-
- private FirebaseVisionFaceDetectorOptions getFaceDetectorOptions(Bundle faceDetectorOptionsBundle) {
- FirebaseVisionFaceDetectorOptions.Builder builder = new FirebaseVisionFaceDetectorOptions.Builder();
-
- if (faceDetectorOptionsBundle.getBoolean(KEY_ENABLE_TRACKING)) {
- builder.enableTracking();
- }
-
- if (faceDetectorOptionsBundle.containsKey(KEY_CLASSIFICATION_MODE)) {
- int classificationMode = (int) faceDetectorOptionsBundle.getDouble(KEY_CLASSIFICATION_MODE);
- switch (classificationMode) {
- case FirebaseVisionFaceDetectorOptions.NO_CLASSIFICATIONS:
- builder.setClassificationMode(FirebaseVisionFaceDetectorOptions.NO_CLASSIFICATIONS);
- break;
- case FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS:
- builder.setClassificationMode(FirebaseVisionFaceDetectorOptions.ALL_CLASSIFICATIONS);
- break;
- default:
- throw new IllegalArgumentException(
- "Invalid 'classificationMode' Face Detector option, must be either 1 or 2.");
- }
- }
-
- if (faceDetectorOptionsBundle.containsKey(KEY_CONTOUR_MODE)) {
- int contourMode = (int) faceDetectorOptionsBundle.getDouble(KEY_CONTOUR_MODE);
- switch (contourMode) {
- case FirebaseVisionFaceDetectorOptions.NO_CONTOURS:
- builder.setContourMode(FirebaseVisionFaceDetectorOptions.NO_CONTOURS);
- break;
- case FirebaseVisionFaceDetectorOptions.ALL_CONTOURS:
- builder.setContourMode(FirebaseVisionFaceDetectorOptions.ALL_CONTOURS);
- break;
- default:
- throw new IllegalArgumentException(
- "Invalid 'contourMode' Face Detector option, must be either 1 or 2.");
- }
- }
-
- if (faceDetectorOptionsBundle.containsKey(KEY_LANDMARK_MODE)) {
- int landmarkMode = (int) faceDetectorOptionsBundle.getDouble(KEY_LANDMARK_MODE);
- switch (landmarkMode) {
- case FirebaseVisionFaceDetectorOptions.NO_LANDMARKS:
- builder.setLandmarkMode(FirebaseVisionFaceDetectorOptions.NO_LANDMARKS);
- break;
- case FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS:
- builder.setLandmarkMode(FirebaseVisionFaceDetectorOptions.ALL_LANDMARKS);
- break;
- default:
- throw new IllegalArgumentException(
- "Invalid 'landmarkMode' Face Detector option, must be either 1 or 2.");
- }
- }
-
- if (faceDetectorOptionsBundle.containsKey(KEY_MIN_FACE_SIZE)) {
- float minFaceSize = (float) faceDetectorOptionsBundle.getDouble(KEY_MIN_FACE_SIZE);
- builder.setMinFaceSize(minFaceSize);
- }
-
- if (faceDetectorOptionsBundle.containsKey(KEY_PERFORMANCE_MODE)) {
- int performanceMode = (int) faceDetectorOptionsBundle.getDouble(KEY_PERFORMANCE_MODE);
- switch (performanceMode) {
- case FirebaseVisionFaceDetectorOptions.FAST:
- builder.setPerformanceMode(FirebaseVisionFaceDetectorOptions.FAST);
- break;
- case FirebaseVisionFaceDetectorOptions.ACCURATE:
- builder.setPerformanceMode(FirebaseVisionFaceDetectorOptions.ACCURATE);
- break;
- default:
- throw new IllegalArgumentException(
- "Invalid 'performanceMode' Face Detector option, must be either 1 or 2.");
- }
- }
-
- return builder.build();
- }
-}
diff --git a/packages/ml-vision/android/src/reactnative/AndroidManifest.xml b/packages/ml-vision/android/src/reactnative/AndroidManifest.xml
deleted file mode 100644
index 35065179e96..00000000000
--- a/packages/ml-vision/android/src/reactnative/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionBarcodeDetectorModule.java b/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionBarcodeDetectorModule.java
deleted file mode 100644
index cacba5626a2..00000000000
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionBarcodeDetectorModule.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package io.invertase.firebase.ml.vision;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.bridge.*;
-import io.invertase.firebase.common.ReactNativeFirebaseModule;
-
-public class RNFirebaseMLVisionBarcodeDetectorModule extends ReactNativeFirebaseModule {
- private static final String SERVICE_NAME = "MLVisionBarcodeDetector";
- private final UniversalFirebaseMLVisionBarcodeDetectorModule module;
-
- RNFirebaseMLVisionBarcodeDetectorModule(ReactApplicationContext reactContext) {
- super(reactContext, SERVICE_NAME);
- this.module = new UniversalFirebaseMLVisionBarcodeDetectorModule(reactContext, SERVICE_NAME);
- }
-
- @ReactMethod
- public void barcodeDetectorProcessImage(String appName, String stringUri, ReadableMap barcodeDetectorOptions, Promise promise) {
- module.barcodeDetectorProcessImage(appName, stringUri, Arguments.toBundle(barcodeDetectorOptions))
- .addOnCompleteListener(getExecutor(), task -> {
- if (task.isSuccessful()) {
- promise.resolve(Arguments.makeNativeArray(task.getResult()));
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLVisionCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-
-}
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionFaceDetectorModule.java b/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionFaceDetectorModule.java
deleted file mode 100644
index e2bafafa8d1..00000000000
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionFaceDetectorModule.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package io.invertase.firebase.ml.vision;
-
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import com.facebook.react.bridge.*;
-import io.invertase.firebase.common.ReactNativeFirebaseModule;
-
-public class RNFirebaseMLVisionFaceDetectorModule extends ReactNativeFirebaseModule {
- private static final String SERVICE_NAME = "MLVisionFaceDetector";
- private final UniversalFirebaseMLVisionFaceDetectorModule module;
-
- RNFirebaseMLVisionFaceDetectorModule(ReactApplicationContext reactContext) {
- super(reactContext, SERVICE_NAME);
- this.module = new UniversalFirebaseMLVisionFaceDetectorModule(reactContext, SERVICE_NAME);
- }
-
- @ReactMethod
- public void faceDetectorProcessImage(
- String appName,
- String stringUri,
- ReadableMap faceDetectorOptionsMap,
- Promise promise
- ) {
- module.faceDetectorProcessImage(appName, stringUri, Arguments.toBundle(faceDetectorOptionsMap))
- .addOnCompleteListener(getExecutor(), task -> {
- if (task.isSuccessful()) {
- promise.resolve(
- Arguments.makeNativeArray(task.getResult())
- );
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLVisionCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-
-}
diff --git a/packages/ml-vision/e2e/barcode.e2e.js b/packages/ml-vision/e2e/barcode.e2e.js
deleted file mode 100644
index eb471ce4271..00000000000
--- a/packages/ml-vision/e2e/barcode.e2e.js
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-let testImageFile;
-
-function barcodeValidate(barcode) {
- barcode.should.be.Object();
-
- barcode.boundingBox.should.be.Array();
- barcode.boundingBox.length.should.eql(4);
- barcode.boundingBox.forEach($ => $.should.be.Number());
-
- barcode.cornerPoints.should.be.Array();
- barcode.cornerPoints.length.should.eql(4);
- barcode.cornerPoints.forEach($ => {
- $.should.be.Array();
- $.length.should.eql(2);
- $.forEach(_ => _.should.be.Number());
- });
-
- barcode.format.should.be.Number();
- barcode.valueType.should.be.Number();
-
- barcode.displayValue.should.be.String();
- barcode.rawValue.should.be.String();
-}
-
-describe('mlkit.vision.barcode', () => {
- before(async () => {
- testImageFile = `${firebase.utils.FilePath.DOCUMENT_DIRECTORY}/barcode.png`;
- await firebase
- .storage()
- .ref('vision/barcode.png')
- .writeToFile(testImageFile);
- });
-
- describe('barcodeDetectorProcessImage()', () => {
- it('should throw if image path is not a string', () => {
- try {
- firebase.vision().barcodeDetectorProcessImage(123);
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'localImageFilePath' expected a string local file path");
- return Promise.resolve();
- }
- });
-
- it('should return a valid response', async () => {
- const res = await firebase.vision().barcodeDetectorProcessImage(testImageFile);
-
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
- res.forEach($ => barcodeValidate($));
- });
- });
-
- describe('VisionBarcodeDetectorOptions', () => {
- it('throws if not an object', async () => {
- try {
- await firebase.vision().barcodeDetectorProcessImage(testImageFile, '123');
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'barcodeDetectorOptions' expected an object value");
- return Promise.resolve();
- }
- });
-
- describe('barcodeFormats', () => {
- it('should throw if not an array', async () => {
- try {
- await firebase.vision().barcodeDetectorProcessImage(testImageFile, {
- barcodeFormats: 'foo',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'barcodeDetectorOptions.barcodeFormats' must be an array of VisionBarcodeFormat types",
- );
- return Promise.resolve();
- }
- });
-
- it('should throw if array item is invalid type', async () => {
- try {
- await firebase.vision().barcodeDetectorProcessImage(testImageFile, {
- barcodeFormats: [firebase.vision.VisionBarcodeFormat.AZTEC, 'foobar'],
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'barcodeDetectorOptions.barcodeFormats' type at index 1 is invalid",
- );
- return Promise.resolve();
- }
- });
-
- it('sets formats', async () => {
- await firebase.vision().barcodeDetectorProcessImage(testImageFile, {
- barcodeFormats: [
- firebase.vision.VisionBarcodeFormat.AZTEC,
- firebase.vision.VisionBarcodeFormat.DATA_MATRIX,
- ],
- });
- });
- });
- });
-});
diff --git a/packages/ml-vision/e2e/face.e2e.js b/packages/ml-vision/e2e/face.e2e.js
deleted file mode 100644
index 5727021246d..00000000000
--- a/packages/ml-vision/e2e/face.e2e.js
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-let testImageFile;
-
-describe('mlkit.vision.face', () => {
- before(async () => {
- testImageFile = `${firebase.utils.FilePath.DOCUMENT_DIRECTORY}/faces.jpg`;
- await firebase
- .storage()
- .ref('vision/faces.jpg')
- .writeToFile(testImageFile);
- });
-
- describe('faceDetectorProcessImage()', () => {
- it('should throw if image path is not a string', () => {
- try {
- firebase.vision().faceDetectorProcessImage(123);
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'localImageFilePath' expected a string local file path");
- return Promise.resolve();
- }
- });
-
- it('returns basic face object with no options enabled', async () => {
- const res = await firebase.vision().faceDetectorProcessImage(testImageFile);
-
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- // Currently disabled
- i.trackingId.should.eql(-1);
-
- i.rightEyeOpenProbability.should.eql(-1);
- i.leftEyeOpenProbability.should.eql(-1);
- i.smilingProbability.should.eql(-1);
-
- i.landmarks.length.should.eql(0);
- i.faceContours.length.should.eql(0);
-
- i.boundingBox.length.should.eql(4);
-
- i.headEulerAngleZ.should.be.Number();
- i.headEulerAngleY.should.be.Number();
- });
- });
-
- it('returns classifications if enabled', async () => {
- const res = await firebase.vision().faceDetectorProcessImage(testImageFile, {
- classificationMode: 2,
- });
-
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- i.rightEyeOpenProbability.should.greaterThan(-1);
- i.leftEyeOpenProbability.should.greaterThan(-1);
- i.smilingProbability.should.greaterThan(-1);
- });
- });
-
- it('returns landmarks if enabled', async () => {
- const res = await firebase.vision().faceDetectorProcessImage(testImageFile, {
- landmarkMode: 2,
- });
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- i.landmarks.length.should.be.greaterThan(0);
-
- i.landmarks.forEach(l => {
- l.type.should.be.Number();
- l.type.should.be.greaterThan(-1);
- l.position.length.should.be.eql(2);
- l.position.forEach(p => p.should.be.Number());
- });
- });
- });
-
- it('returns contours if enabled', async () => {
- const res = await firebase.vision().faceDetectorProcessImage(testImageFile, {
- contourMode: 2,
- });
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- i.faceContours.length.should.be.greaterThan(0);
-
- i.faceContours.forEach(l => {
- l.type.should.be.Number();
- l.type.should.be.greaterThan(-1);
- l.points.length.should.be.greaterThan(1);
- l.points.forEach(p => {
- p.should.be.Array();
- p.length.should.be.eql(2);
- });
- });
- });
- });
- });
-
- describe('VisionFaceDetectorOptions', () => {
- it('throws if not an object', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, '123');
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'faceDetectorOptions' expected an object value");
- return Promise.resolve();
- }
- });
-
- describe('classificationMode', () => {
- it('throws if mode is incorrect', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- classificationMode: 'foo',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'faceDetectorOptions.classificationMode' invalid classification mode",
- );
- return Promise.resolve();
- }
- });
-
- it('sets classificationMode', async () => {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- classificationMode:
- firebase.vision.VisionFaceDetectorClassificationMode.NO_CLASSIFICATIONS,
- });
-
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- classificationMode:
- firebase.vision.VisionFaceDetectorClassificationMode.ALL_CLASSIFICATIONS,
- });
- });
- });
-
- describe('contourMode', () => {
- it('throws if mode is incorrect', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- contourMode: 'foo',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'faceDetectorOptions.contourMode' invalid contour mode");
- return Promise.resolve();
- }
- });
-
- it('sets contourMode', async () => {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- contourMode: firebase.vision.VisionFaceDetectorContourMode.NO_CONTOURS,
- });
-
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- contourMode: firebase.vision.VisionFaceDetectorContourMode.ALL_CONTOURS,
- });
- });
- });
-
- describe('performanceMode', () => {
- it('throws if mode is incorrect', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- performanceMode: 'foo',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'faceDetectorOptions.performanceMode' invalid performance mode",
- );
- return Promise.resolve();
- }
- });
-
- it('sets performanceMode', async () => {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- performanceMode: firebase.vision.VisionFaceDetectorPerformanceMode.FAST,
- });
-
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- performanceMode: firebase.vision.VisionFaceDetectorPerformanceMode.ACCURATE,
- });
- });
- });
-
- describe('landmarkMode', () => {
- it('throws if mode is incorrect', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- landmarkMode: 'foo',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'faceDetectorOptions.landmarkMode' invalid landmark mode",
- );
- return Promise.resolve();
- }
- });
-
- it('sets landmarkMode', async () => {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- landmarkMode: firebase.vision.VisionFaceDetectorLandmarkMode.NO_LANDMARKS,
- });
-
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- landmarkMode: firebase.vision.VisionFaceDetectorLandmarkMode.ALL_LANDMARKS,
- });
- });
- });
-
- describe('minFaceSize', () => {
- it('throws if size is not a number', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- minFaceSize: '0.1',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'faceDetectorOptions.minFaceSize' expected a number value between 0 & 1",
- );
- return Promise.resolve();
- }
- });
-
- it('throws if size is not valid', async () => {
- try {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- minFaceSize: -1,
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'faceDetectorOptions.minFaceSize' expected value to be between 0 & 1",
- );
- return Promise.resolve();
- }
- });
-
- it('sets minFaceSize', async () => {
- await firebase.vision().faceDetectorProcessImage(testImageFile, {
- minFaceSize: 0.3,
- });
- });
- });
- });
-});
diff --git a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 919434a6254..00000000000
--- a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
diff --git a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d6..00000000000
--- a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
- IDEDidComputeMac32BitWarning
-
-
-
diff --git a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index 0c67376ebac..00000000000
--- a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/xcshareddata/IDETemplateMacros.plist b/packages/ml-vision/ios/RNFBMLVision.xcodeproj/xcshareddata/IDETemplateMacros.plist
deleted file mode 100644
index 63f0a6e5dd8..00000000000
--- a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/xcshareddata/IDETemplateMacros.plist
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- FILEHEADER
-
-/**
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-
diff --git a/packages/ml-vision/lib/visionBarcodeDetectorOptions.js b/packages/ml-vision/lib/visionBarcodeDetectorOptions.js
deleted file mode 100644
index 0321f5fa59e..00000000000
--- a/packages/ml-vision/lib/visionBarcodeDetectorOptions.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import { isArray, isObject, isUndefined } from '@react-native-firebase/app/lib/common';
-import VisionBarcodeFormat from './VisionBarcodeFormat';
-
-export default function visionBarcodeDetectorOptions(barcodeDetectorOptions) {
- const out = {
- barcodeFormats: [VisionBarcodeFormat.ALL_FORMATS],
- };
-
- if (isUndefined(barcodeDetectorOptions)) {
- return out;
- }
-
- if (!isObject(barcodeDetectorOptions)) {
- throw new Error("'barcodeDetectorOptions' expected an object value.");
- }
-
- if (barcodeDetectorOptions.barcodeFormats) {
- if (!isArray(barcodeDetectorOptions.barcodeFormats)) {
- throw new Error(
- "'barcodeDetectorOptions.barcodeFormats' must be an array of VisionBarcodeFormat types.",
- );
- }
-
- const validFormats = Object.values(VisionBarcodeFormat);
-
- for (let i = 0; i < barcodeDetectorOptions.barcodeFormats.length; i++) {
- if (!validFormats.includes(barcodeDetectorOptions.barcodeFormats[i])) {
- throw new Error(
- `'barcodeDetectorOptions.barcodeFormats' type at index ${i} is invalid. Expected a VisionBarcodeFormat type.`,
- );
- }
- }
-
- out.barcodeFormats = barcodeDetectorOptions.barcodeFormats;
- }
-
- return out;
-}
diff --git a/packages/ml-vision/lib/visionFaceDetectorOptions.js b/packages/ml-vision/lib/visionFaceDetectorOptions.js
deleted file mode 100644
index 2b5e9ebe8ac..00000000000
--- a/packages/ml-vision/lib/visionFaceDetectorOptions.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {
- hasOwnProperty,
- isNumber,
- isObject,
- isUndefined,
-} from '@react-native-firebase/app/lib/common';
-import VisionFaceDetectorClassificationMode from './VisionFaceDetectorClassificationMode';
-import VisionFaceDetectorContourMode from './VisionFaceDetectorContourMode';
-import VisionFaceDetectorLandmarkMode from './VisionFaceDetectorLandmarkMode';
-import VisionFaceDetectorPerformanceMode from './VisionFaceDetectorPerformanceMode';
-
-export default function visionFaceDetectorOptions(faceDetectorOptions) {
- const out = {
- classificationMode: VisionFaceDetectorClassificationMode.NO_CLASSIFICATIONS,
- contourMode: VisionFaceDetectorContourMode.NO_CONTOURS,
- landmarkMode: VisionFaceDetectorLandmarkMode.NO_LANDMARKS,
- minFaceSize: 0.1,
- performanceMode: VisionFaceDetectorPerformanceMode.FAST,
- };
-
- if (isUndefined(faceDetectorOptions)) {
- return out;
- }
-
- if (!isObject(faceDetectorOptions)) {
- throw new Error("'faceDetectorOptions' expected an object value.");
- }
-
- if (faceDetectorOptions.classificationMode) {
- if (
- faceDetectorOptions.classificationMode !==
- VisionFaceDetectorClassificationMode.NO_CLASSIFICATIONS &&
- faceDetectorOptions.classificationMode !==
- VisionFaceDetectorClassificationMode.ALL_CLASSIFICATIONS
- ) {
- throw new Error(
- "'faceDetectorOptions.classificationMode' invalid classification mode. Expected VisionFaceDetectorClassificationMode.NO_CLASSIFICATIONS or VisionFaceDetectorClassificationMode.ALL_CLASSIFICATIONS.",
- );
- }
-
- out.classificationMode = faceDetectorOptions.classificationMode;
- }
-
- if (faceDetectorOptions.contourMode) {
- if (
- faceDetectorOptions.contourMode !== VisionFaceDetectorContourMode.NO_CONTOURS &&
- faceDetectorOptions.contourMode !== VisionFaceDetectorContourMode.ALL_CONTOURS
- ) {
- throw new Error(
- "'faceDetectorOptions.contourMode' invalid contour mode. Expected VisionFaceDetectorContourMode.NO_CONTOURS or VisionFaceDetectorContourMode.ALL_CONTOURS.",
- );
- }
-
- out.contourMode = faceDetectorOptions.contourMode;
- }
-
- if (faceDetectorOptions.landmarkMode) {
- if (
- faceDetectorOptions.landmarkMode !== VisionFaceDetectorLandmarkMode.NO_LANDMARKS &&
- faceDetectorOptions.landmarkMode !== VisionFaceDetectorLandmarkMode.ALL_LANDMARKS
- ) {
- throw new Error(
- "'faceDetectorOptions.landmarkMode' invalid landmark mode. Expected VisionFaceDetectorLandmarkMode.NO_LANDMARKS or VisionFaceDetectorLandmarkMode.ALL_LANDMARKS.",
- );
- }
-
- out.landmarkMode = faceDetectorOptions.landmarkMode;
- }
-
- if (hasOwnProperty(faceDetectorOptions, 'minFaceSize')) {
- if (!isNumber(faceDetectorOptions.minFaceSize)) {
- throw new Error("'faceDetectorOptions.minFaceSize' expected a number value between 0 & 1.");
- }
-
- if (faceDetectorOptions.minFaceSize < 0 || faceDetectorOptions.minFaceSize > 1) {
- throw new Error("'faceDetectorOptions.minFaceSize' expected value to be between 0 & 1.");
- }
-
- out.minFaceSize = faceDetectorOptions.minFaceSize;
- }
-
- if (faceDetectorOptions.performanceMode) {
- if (
- faceDetectorOptions.performanceMode !== VisionFaceDetectorPerformanceMode.FAST &&
- faceDetectorOptions.performanceMode !== VisionFaceDetectorPerformanceMode.ACCURATE
- ) {
- throw new Error(
- "'faceDetectorOptions.performanceMode' invalid performance mode. Expected VisionFaceDetectorPerformanceMode.FAST or VisionFaceDetectorPerformanceMode.ACCURATE.",
- );
- }
-
- out.performanceMode = faceDetectorOptions.performanceMode;
- }
-
- return out;
-}
diff --git a/packages/ml-vision/lib/visionImageLabelerOptions.js b/packages/ml-vision/lib/visionImageLabelerOptions.js
deleted file mode 100644
index 27f5104eed9..00000000000
--- a/packages/ml-vision/lib/visionImageLabelerOptions.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2016-present Invertase Limited & Contributors
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this library except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-import {
- hasOwnProperty,
- isNumber,
- isObject,
- isUndefined,
-} from '@react-native-firebase/app/lib/common';
-
-export default function visionImageLabelerOptions(imageLabelerOptions) {
- const out = {
- confidenceThreshold: 0.5,
- };
-
- if (isUndefined(imageLabelerOptions)) {
- return out;
- }
-
- if (!isObject(imageLabelerOptions)) {
- throw new Error("'imageLabelerOptions' expected an object value.");
- }
-
- if (hasOwnProperty(imageLabelerOptions, 'confidenceThreshold')) {
- if (!isNumber(imageLabelerOptions.confidenceThreshold)) {
- throw new Error(
- "'imageLabelerOptions.confidenceThreshold' expected a number value between 0 & 1.",
- );
- }
-
- if (
- imageLabelerOptions.confidenceThreshold < 0 ||
- imageLabelerOptions.confidenceThreshold > 1
- ) {
- throw new Error(
- "'imageLabelerOptions.confidenceThreshold' expected a number value between 0 & 1.",
- );
- }
-
- out.confidenceThreshold = imageLabelerOptions.confidenceThreshold;
- }
-
- return out;
-}
diff --git a/packages/ml-natural-language/.npmignore b/packages/ml/.npmignore
similarity index 100%
rename from packages/ml-natural-language/.npmignore
rename to packages/ml/.npmignore
diff --git a/packages/ml-vision/CHANGELOG.md b/packages/ml/CHANGELOG.md
similarity index 100%
rename from packages/ml-vision/CHANGELOG.md
rename to packages/ml/CHANGELOG.md
diff --git a/packages/ml-natural-language/LICENSE b/packages/ml/LICENSE
similarity index 100%
rename from packages/ml-natural-language/LICENSE
rename to packages/ml/LICENSE
diff --git a/packages/ml/README.md b/packages/ml/README.md
new file mode 100644
index 00000000000..94c80f4a91c
--- /dev/null
+++ b/packages/ml/README.md
@@ -0,0 +1,102 @@
+
+
+
+
+
React Native Firebase - ML
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+---
+
+Firebase Machine Learning is a mobile SDK that brings Google's machine learning expertise to Android and iOS apps in a powerful yet easy-to-use package. Whether you're new or experienced in machine learning, you can implement the functionality you need in just a few lines of code. There's no need to have deep knowledge of neural networks or model optimization to get started. On the other hand, if you are an experienced ML developer, Firebase ML provides convenient APIs that help you use your custom TensorFlow Lite models in your mobile apps.
+
+## Cloud vs. on-device
+
+Firebase ML has APIs that work either in the in the cloud or on the device. When we describe an ML API as being a cloud API or on-device API, we are describing which machine performs inference: that is, which machine uses the ML model to discover insights about the data you provide it. In Firebase ML, this happens either on Google Cloud, or on your users' mobile devices.
+
+The text recognition, image labeling, and landmark recognition APIs perform inference in the cloud. These models have more computational power and memory available to them than a comparable on-device model, and as a result, can perform inference with greater accuracy and precision than an on-device model. On the other hand, every request to these APIs requires a network round-trip, which makes them unsuitable for real-time and low-latency applications such as video processing.
+
+The custom model APIs and AutoML Vision Edge deal with ML models that run on the device. The models used and produced by these features are TensorFlow Lite models, which are optimized to run on mobile devices. The biggest advantage to these models is that they don't require a network connection and can run very quickly—fast enough, for example, to process frames of video in real time.
+
+Firebase ML provides two key capabilities around on-device custom models:
+
+- Custom model deployment: Deploy custom models to your users' devices by uploading them to our servers. Your Firebase-enabled app will download the model to the device on demand. This allows you to keep your app's initial install size small, and you can swap the ML model without having to republish your app.
+
+- AutoML Vision Edge: This service helps you create your own on-device custom image classification models with an easy-to-use web interface. Then, you can seamlessly host the models you create with the service mentioned above.
+
+## ML Kit: Ready-to-use on-device models
+
+> On June 3, 2020, Google started offering ML Kit's on-device APIs through a [new standalone SDK](https://developers.google.com/ml-kit). Cloud APIs, AutoML Vision Edge, and custom model deployment will continue to be available through Firebase Machine Learning.
+
+If you're looking for pre-trained models that run on the device, check out [the new standalone ML Kit](https://developers.google.com/ml-kit). At time of this writing there is not yet a react-native wrapper for it, but ML Kit is available for iOS and Android, and has APIs for many use cases:
+
+- Text recognition
+- Image labeling
+- Object detection and tracking
+- Face detection and contour tracing
+- Barcode scanning
+- Language identification
+- Translation
+- Smart Reply
+
+---
+
+This react-native-firebase module currently supports the following Firebase ML APIs:
+
+| API | Supported |
+| -------------------------------------------------------------------------------- | --------- |
+| [Text Recognition](https://firebase.google.com/docs/ml/recognize-text) | ✅ |
+| [Document Text Recognition](https://firebase.google.com/docs/ml/recognize-text)) | ✅ |
+| [Image Labeling](https://firebase.google.com/docs/ml/label-images) | ✅ |
+| [Landmark Recognition](https://firebase.google.com/docs/ml/recognize-landmarks) | ✅ |
+| [AutoML Vision Edge](https://firebase.google.com/docs/ml/automl-image-labeling) | ❌ |
+| [Custom Models](https://firebase.google.com/docs/ml/use-custom-models) | ❌ |
+
+[> Learn More](https://firebase.google.com/docs/ml)
+
+## Installation
+
+Requires `@react-native-firebase/app` to be installed.
+
+```bash
+yarn add @react-native-firebase/ml-vision
+```
+
+## Documentation
+
+- [Quick Start](https://rnfirebase.io/ml-vision/usage)
+- [Reference](https://rnfirebase.io/reference/ml-vision)
+
+### Additional Topics
+
+- [Text Recognition](https://rnfirebase.io/ml-vision/text-recognition)
+- [Landmark Recognition](https://rnfirebase.io/ml-vision/landmark-recognition)
+- [Image Labeling](https://rnfirebase.io/ml-vision/image-labeling)
+
+## License
+
+- See [LICENSE](/LICENSE)
+
+---
+
+
+
+
+ Built and maintained with 💛 by Invertase .
+
+
+
+---
diff --git a/packages/ml-vision/RNFBMLVision.podspec b/packages/ml/RNFBML.podspec
similarity index 64%
rename from packages/ml-vision/RNFBMLVision.podspec
rename to packages/ml/RNFBML.podspec
index 860c5f391eb..2e5d2bd9f98 100644
--- a/packages/ml-vision/RNFBMLVision.podspec
+++ b/packages/ml/RNFBML.podspec
@@ -11,7 +11,7 @@ if coreVersionDetected != coreVersionRequired
end
Pod::Spec.new do |s|
- s.name = "RNFBMLVision"
+ s.name = "RNFBML"
s.version = package["version"]
s.description = package["description"]
s.summary = <<-DESC
@@ -36,23 +36,4 @@ Pod::Spec.new do |s|
# Firebase dependencies
s.dependency 'Firebase/MLVision', firebase_sdk_version
- if FirebaseJSON::Config.get_value_or_default('ml_vision_face_model', false)
- s.dependency 'Firebase/MLVisionFaceModel', firebase_sdk_version
- end
- if FirebaseJSON::Config.get_value_or_default('ml_vision_ocr_model', false)
- s.dependency 'Firebase/MLVisionTextModel', firebase_sdk_version
- end
- if FirebaseJSON::Config.get_value_or_default('ml_vision_barcode_model', false)
- s.dependency 'Firebase/MLVisionBarcodeModel', firebase_sdk_version
- end
- if FirebaseJSON::Config.get_value_or_default('ml_vision_image_label_model', false)
- s.dependency 'Firebase/MLVisionLabelModel', firebase_sdk_version
- end
-
- if defined?($RNFirebaseAsStaticFramework)
- Pod::UI.puts "#{s.name}: Using overridden static_framework value of '#{$RNFirebaseAsStaticFramework}'"
- s.static_framework = $RNFirebaseAsStaticFramework
- else
- s.static_framework = false
- end
end
diff --git a/packages/ml-natural-language/android/.editorconfig b/packages/ml/android/.editorconfig
similarity index 100%
rename from packages/ml-natural-language/android/.editorconfig
rename to packages/ml/android/.editorconfig
diff --git a/packages/ml-vision/android/build.gradle b/packages/ml/android/build.gradle
similarity index 91%
rename from packages/ml-vision/android/build.gradle
rename to packages/ml/android/build.gradle
index 99ae046b8ea..2db025b20e2 100644
--- a/packages/ml-vision/android/build.gradle
+++ b/packages/ml/android/build.gradle
@@ -11,7 +11,7 @@ buildscript {
}
dependencies {
- classpath("com.android.tools.build:gradle:4.0.1")
+ classpath("com.android.tools.build:gradle:4.1.0")
}
}
}
@@ -92,11 +92,8 @@ dependencies {
implementation platform("com.google.firebase:firebase-bom:${ReactNative.ext.getVersion("firebase", "bom")}")
implementation "com.google.firebase:firebase-ml-vision"
- // This is necessary to fix known dependency issues in the SDK
- // https://firebase.google.com/support/release-notes/android#bom_v25-8-0
implementation 'com.google.android.gms:play-services-vision:20.1.1'
implementation 'com.google.android.gms:play-services-vision-common:19.1.1'
- implementation 'com.google.firebase:firebase-ml-vision-image-label-model:20.0.2'
implementation 'com.google.android.gms:play-services-vision-face-contour-internal:16.0.3'
implementation 'com.google.android.gms:play-services-vision-image-labeling-internal:16.0.5'
implementation 'com.google.android.gms:play-services-vision-image-label:18.0.5'
@@ -104,8 +101,6 @@ dependencies {
implementation 'com.google.firebase:firebase-ml-model-interpreter:22.0.4'
}
-apply from: file("./ml-models.gradle")
-
ReactNative.shared.applyPackageVersion()
ReactNative.shared.applyDefaultExcludes()
ReactNative.module.applyAndroidVersions()
diff --git a/packages/ml-natural-language/android/lint.xml b/packages/ml/android/lint.xml
similarity index 100%
rename from packages/ml-natural-language/android/lint.xml
rename to packages/ml/android/lint.xml
diff --git a/packages/ml-vision/android/settings.gradle b/packages/ml/android/settings.gradle
similarity index 100%
rename from packages/ml-vision/android/settings.gradle
rename to packages/ml/android/settings.gradle
diff --git a/packages/ml/android/src/main/AndroidManifest.xml b/packages/ml/android/src/main/AndroidManifest.xml
new file mode 100644
index 00000000000..b7e0bbc3790
--- /dev/null
+++ b/packages/ml/android/src/main/AndroidManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionCommon.java b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionCommon.java
similarity index 99%
rename from packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionCommon.java
rename to packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionCommon.java
index f3be9b1690a..46275c8a9b3 100644
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionCommon.java
+++ b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionCommon.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
import com.google.firebase.ml.common.FirebaseMLException;
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java
similarity index 98%
rename from packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java
rename to packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java
index 4139664db78..140945fdad4 100644
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java
+++ b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionDocumentTextRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -35,7 +35,7 @@
import javax.annotation.Nullable;
import java.util.*;
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
+import static io.invertase.firebase.ml.UniversalFirebaseMLVisionCommon.*;
class UniversalFirebaseMLVisionDocumentTextRecognizerModule extends UniversalFirebaseModule {
UniversalFirebaseMLVisionDocumentTextRecognizerModule(Context context, String serviceName) {
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionImageLabelerModule.java b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionImageLabelerModule.java
similarity index 83%
rename from packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionImageLabelerModule.java
rename to packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionImageLabelerModule.java
index 786ba9cc6c9..633a1fa27d5 100644
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionImageLabelerModule.java
+++ b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionImageLabelerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -37,30 +37,13 @@
import java.util.List;
import java.util.Map;
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
+import static io.invertase.firebase.ml.UniversalFirebaseMLVisionCommon.*;
class UniversalFirebaseMLVisionImageLabelerModule extends UniversalFirebaseModule {
UniversalFirebaseMLVisionImageLabelerModule(Context context, String serviceName) {
super(context, serviceName);
}
- Task>> imageLabelerProcessImage(String appName, String stringUri, Bundle imageLabelerOptions) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseVisionOnDeviceImageLabelerOptions options = getOnDeviceImageLabelerOptions(imageLabelerOptions);
- FirebaseVisionImageLabeler visionImageLabeler = FirebaseVision.getInstance(firebaseApp)
- .getOnDeviceImageLabeler(options);
- FirebaseVisionImage image = FirebaseVisionImage.fromFilePath(
- getContext(),
- SharedUtils.getUri(stringUri)
- );
-
- return processLabelerList(
- Tasks.await(visionImageLabeler.processImage(image))
- );
- });
- }
-
Task>> cloudImageLabelerProcessImage(String appName, String stringUri, Bundle cloudImageLabelerOptions) {
return Tasks.call(getExecutor(), () -> {
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionLandmarkRecognizerModule.java b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionLandmarkRecognizerModule.java
similarity index 97%
rename from packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionLandmarkRecognizerModule.java
rename to packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionLandmarkRecognizerModule.java
index 6ec562271b8..e35580fc8f2 100644
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionLandmarkRecognizerModule.java
+++ b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionLandmarkRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -37,7 +37,7 @@
import java.util.List;
import java.util.Map;
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
+import static io.invertase.firebase.ml.UniversalFirebaseMLVisionCommon.*;
class UniversalFirebaseMLVisionLandmarkRecognizerModule extends UniversalFirebaseModule {
UniversalFirebaseMLVisionLandmarkRecognizerModule(Context context, String serviceName) {
diff --git a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionTextRecognizerModule.java b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionTextRecognizerModule.java
similarity index 91%
rename from packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionTextRecognizerModule.java
rename to packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionTextRecognizerModule.java
index de16c5f5508..20d4635f35f 100644
--- a/packages/ml-vision/android/src/main/java/io/invertase/firebase/ml/vision/UniversalFirebaseMLVisionTextRecognizerModule.java
+++ b/packages/ml/android/src/main/java/io/invertase/firebase/ml/UniversalFirebaseMLVisionTextRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -34,32 +34,13 @@
import java.util.*;
-import static io.invertase.firebase.ml.vision.UniversalFirebaseMLVisionCommon.*;
+import static io.invertase.firebase.ml.UniversalFirebaseMLVisionCommon.*;
class UniversalFirebaseMLVisionTextRecognizerModule extends UniversalFirebaseModule {
UniversalFirebaseMLVisionTextRecognizerModule(Context context, String serviceName) {
super(context, serviceName);
}
- Task> textRecognizerProcessImage(
- String appName,
- String stringUri
- ) {
- return Tasks.call(getExecutor(), () -> {
- FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- FirebaseVisionTextRecognizer detector = FirebaseVision.getInstance(firebaseApp)
- .getOnDeviceTextRecognizer();
-
- FirebaseVisionImage image = FirebaseVisionImage.fromFilePath(
- getContext(),
- SharedUtils.getUri(stringUri)
- );
-
- FirebaseVisionText result = Tasks.await(detector.processImage(image));
- return getFirebaseVisionTextMap(result);
- });
- }
-
Task> cloudTextRecognizerProcessImage(
String appName,
String stringUri,
diff --git a/packages/ml/android/src/reactnative/AndroidManifest.xml b/packages/ml/android/src/reactnative/AndroidManifest.xml
new file mode 100644
index 00000000000..d55b471c2c7
--- /dev/null
+++ b/packages/ml/android/src/reactnative/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionDocumentTextRecognizerModule.java b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionDocumentTextRecognizerModule.java
similarity index 98%
rename from packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionDocumentTextRecognizerModule.java
rename to packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionDocumentTextRecognizerModule.java
index b69ee5adbb2..e1dfd66eea6 100644
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionDocumentTextRecognizerModule.java
+++ b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionDocumentTextRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionImageLabelerModule.java b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionImageLabelerModule.java
similarity index 70%
rename from packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionImageLabelerModule.java
rename to packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionImageLabelerModule.java
index 04d7a3922ba..83313d08c57 100644
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionImageLabelerModule.java
+++ b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionImageLabelerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -29,27 +29,6 @@ public class RNFirebaseMLVisionImageLabelerModule extends ReactNativeFirebaseMod
this.module = new UniversalFirebaseMLVisionImageLabelerModule(reactContext, SERVICE_NAME);
}
- @ReactMethod
- public void imageLabelerProcessImage(String appName, String stringUri, ReadableMap imageLabelerOptions, Promise promise) {
- this.module.imageLabelerProcessImage(appName, stringUri, Arguments.toBundle(imageLabelerOptions))
- .addOnCompleteListener(task -> {
- if (task.isSuccessful()) {
- promise.resolve(
- Arguments.makeNativeArray(task.getResult())
- );
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLVisionCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-
@ReactMethod
public void cloudImageLabelerProcessImage(String appName, String stringUri, ReadableMap cloudImageLabelerOptions, Promise promise) {
this.module.cloudImageLabelerProcessImage(appName, stringUri, Arguments.toBundle(cloudImageLabelerOptions))
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionLandmarkRecognizerModule.java b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionLandmarkRecognizerModule.java
similarity index 98%
rename from packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionLandmarkRecognizerModule.java
rename to packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionLandmarkRecognizerModule.java
index 71e731c7db5..fc877b2ed82 100644
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionLandmarkRecognizerModule.java
+++ b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionLandmarkRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionTextRecognizerModule.java b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionTextRecognizerModule.java
similarity index 72%
rename from packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionTextRecognizerModule.java
rename to packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionTextRecognizerModule.java
index bd481451656..40979dba0ef 100644
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/RNFirebaseMLVisionTextRecognizerModule.java
+++ b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/RNFirebaseMLVisionTextRecognizerModule.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -29,29 +29,6 @@ public class RNFirebaseMLVisionTextRecognizerModule extends ReactNativeFirebaseM
this.module = new UniversalFirebaseMLVisionTextRecognizerModule(reactContext, SERVICE_NAME);
}
- @ReactMethod
- public void textRecognizerProcessImage(
- String appName,
- String stringUri,
- Promise promise
- ) {
- module.textRecognizerProcessImage(appName, stringUri)
- .addOnCompleteListener(getExecutor(), task -> {
- if (task.isSuccessful()) {
- promise.resolve(Arguments.makeNativeMap(task.getResult()));
- } else {
- String[] errorCodeAndMessage = UniversalFirebaseMLVisionCommon.getErrorCodeAndMessageFromException(
- task.getException());
- rejectPromiseWithCodeAndMessage(
- promise,
- errorCodeAndMessage[0],
- errorCodeAndMessage[1],
- errorCodeAndMessage[2]
- );
- }
- });
- }
-
@ReactMethod
public void cloudTextRecognizerProcessImage(
String appName,
diff --git a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/ReactNativeFirebaseMLVisionPackage.java b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/ReactNativeFirebaseMLVisionPackage.java
similarity index 76%
rename from packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/ReactNativeFirebaseMLVisionPackage.java
rename to packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/ReactNativeFirebaseMLVisionPackage.java
index 212722a828c..b464e5030f2 100644
--- a/packages/ml-vision/android/src/reactnative/java/io/invertase/firebase/ml/vision/ReactNativeFirebaseMLVisionPackage.java
+++ b/packages/ml/android/src/reactnative/java/io/invertase/firebase/ml/ReactNativeFirebaseMLVisionPackage.java
@@ -1,4 +1,4 @@
-package io.invertase.firebase.ml.vision;
+package io.invertase.firebase.ml;
/*
* Copyright (c) 2016-present Invertase Limited & Contributors
@@ -34,23 +34,10 @@ public class ReactNativeFirebaseMLVisionPackage implements ReactPackage {
@Override
public List createNativeModules(@Nonnull ReactApplicationContext reactContext) {
List modules = new ArrayList<>();
- modules.add(new RNFirebaseMLVisionBarcodeDetectorModule(reactContext));
modules.add(new RNFirebaseMLVisionTextRecognizerModule(reactContext));
modules.add(new RNFirebaseMLVisionLandmarkRecognizerModule(reactContext));
modules.add(new RNFirebaseMLVisionDocumentTextRecognizerModule(reactContext));
-
- if (ReactNativeFirebaseJSON
- .getSharedInstance()
- .getBooleanValue("ml_vision_face_model", false)) {
- modules.add(new RNFirebaseMLVisionFaceDetectorModule(reactContext));
- }
-
- if (ReactNativeFirebaseJSON
- .getSharedInstance()
- .getBooleanValue("ml_vision_image_label_model", false)) {
- modules.add(new RNFirebaseMLVisionImageLabelerModule(reactContext));
- }
-
+ modules.add(new RNFirebaseMLVisionImageLabelerModule(reactContext));
return modules;
}
diff --git a/packages/ml-vision/e2e/documentText.e2e.js b/packages/ml/e2e/documentText.e2e.js
similarity index 100%
rename from packages/ml-vision/e2e/documentText.e2e.js
rename to packages/ml/e2e/documentText.e2e.js
diff --git a/packages/ml-vision/e2e/label.e2e.js b/packages/ml/e2e/label.e2e.js
similarity index 64%
rename from packages/ml-vision/e2e/label.e2e.js
rename to packages/ml/e2e/label.e2e.js
index d305c41f1ff..310660b771b 100644
--- a/packages/ml-vision/e2e/label.e2e.js
+++ b/packages/ml/e2e/label.e2e.js
@@ -26,31 +26,6 @@ describe('mlkit.vision.label', () => {
.writeToFile(testImageFile);
});
- describe('imageLabelerProcessImage()', () => {
- it('should throw if image path is not a string', () => {
- try {
- firebase.vision().imageLabelerProcessImage(123);
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'localImageFilePath' expected a string local file path");
- return Promise.resolve();
- }
- });
-
- it('should return a local label array', async () => {
- const res = await firebase.vision().imageLabelerProcessImage(testImageFile);
-
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- i.text.should.be.String();
- i.entityId.should.be.String();
- i.confidence.should.be.Number();
- });
- });
- });
-
describe('cloudImageLabelerProcessImage()', () => {
it('should throw if image path is not a string', () => {
try {
@@ -76,63 +51,6 @@ describe('mlkit.vision.label', () => {
});
});
- describe('VisionImageLabelerOptions', () => {
- it('throws if not an object', async () => {
- try {
- await firebase.vision().imageLabelerProcessImage(testImageFile, '123');
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql("'imageLabelerOptions' expected an object value");
- return Promise.resolve();
- }
- });
-
- describe('confidenceThreshold', () => {
- it('should throw if confidence threshold is not a number', async () => {
- try {
- await firebase.vision().imageLabelerProcessImage(testImageFile, {
- confidenceThreshold: '0.5',
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'imageLabelerOptions.confidenceThreshold' expected a number value between 0 & 1",
- );
- return Promise.resolve();
- }
- });
- });
-
- it('should throw if confidence threshold is not between 0 & 1', async () => {
- try {
- await firebase.vision().imageLabelerProcessImage(testImageFile, {
- confidenceThreshold: -0.2,
- });
- return Promise.reject(new Error('Did not throw an Error.'));
- } catch (error) {
- error.message.should.containEql(
- "'imageLabelerOptions.confidenceThreshold' expected a number value between 0 & 1",
- );
- return Promise.resolve();
- }
- });
-
- it('should accept options and return local labels', async () => {
- const res = await firebase.vision().imageLabelerProcessImage(testImageFile, {
- confidenceThreshold: 0.8,
- });
-
- res.should.be.Array();
- res.length.should.be.greaterThan(0);
-
- res.forEach(i => {
- i.text.should.be.String();
- i.entityId.should.be.String();
- i.confidence.should.be.Number();
- });
- });
- });
-
describe('VisionCloudImageLabelerOptions', () => {
it('throws if not an object', async () => {
try {
diff --git a/packages/ml-vision/e2e/landmark.e2e.js b/packages/ml/e2e/landmark.e2e.js
similarity index 100%
rename from packages/ml-vision/e2e/landmark.e2e.js
rename to packages/ml/e2e/landmark.e2e.js
diff --git a/packages/ml-vision/e2e/mlKitVision.e2e.js b/packages/ml/e2e/mlKitVision.e2e.js
similarity index 100%
rename from packages/ml-vision/e2e/mlKitVision.e2e.js
rename to packages/ml/e2e/mlKitVision.e2e.js
diff --git a/packages/ml-vision/e2e/text.e2e.js b/packages/ml/e2e/text.e2e.js
similarity index 100%
rename from packages/ml-vision/e2e/text.e2e.js
rename to packages/ml/e2e/text.e2e.js
diff --git a/packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.pbxproj b/packages/ml/ios/RNFBMLVision.xcodeproj/project.pbxproj
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision.xcodeproj/project.pbxproj
rename to packages/ml/ios/RNFBMLVision.xcodeproj/project.pbxproj
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to packages/ml/ios/RNFBMLVision.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/xcshareddata/IDETemplateMacros.plist b/packages/ml/ios/RNFBMLVision.xcodeproj/xcshareddata/IDETemplateMacros.plist
similarity index 100%
rename from packages/ml-natural-language/ios/RNFBMLNaturalLanguage.xcodeproj/xcshareddata/IDETemplateMacros.plist
rename to packages/ml/ios/RNFBMLVision.xcodeproj/xcshareddata/IDETemplateMacros.plist
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionBarcodeDetectorModule.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionCommon.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionCommon.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionCommon.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionCommon.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionCommon.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionCommon.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionCommon.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionCommon.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionDocumentTextRecognizerModule.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionFaceDetectorModule.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionImageLabelerModule.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionLandmarkRecognizerModule.m
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.h b/packages/ml/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.h
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.h
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.h
diff --git a/packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.m b/packages/ml/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.m
similarity index 100%
rename from packages/ml-vision/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.m
rename to packages/ml/ios/RNFBMLVision/RNFBMLVisionTextRecognizerModule.m
diff --git a/packages/ml-vision/lib/BarcodeDetectorTypes.d.ts b/packages/ml/lib/BarcodeDetectorTypes.d.ts
similarity index 100%
rename from packages/ml-vision/lib/BarcodeDetectorTypes.d.ts
rename to packages/ml/lib/BarcodeDetectorTypes.d.ts
diff --git a/packages/ml-vision/lib/VisionBarcodeAddressType.js b/packages/ml/lib/VisionBarcodeAddressType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodeAddressType.js
rename to packages/ml/lib/VisionBarcodeAddressType.js
diff --git a/packages/ml-vision/lib/VisionBarcodeEmailType.js b/packages/ml/lib/VisionBarcodeEmailType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodeEmailType.js
rename to packages/ml/lib/VisionBarcodeEmailType.js
diff --git a/packages/ml-vision/lib/VisionBarcodeFormat.js b/packages/ml/lib/VisionBarcodeFormat.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodeFormat.js
rename to packages/ml/lib/VisionBarcodeFormat.js
diff --git a/packages/ml-vision/lib/VisionBarcodePhoneType.js b/packages/ml/lib/VisionBarcodePhoneType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodePhoneType.js
rename to packages/ml/lib/VisionBarcodePhoneType.js
diff --git a/packages/ml-vision/lib/VisionBarcodeValueType.js b/packages/ml/lib/VisionBarcodeValueType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodeValueType.js
rename to packages/ml/lib/VisionBarcodeValueType.js
diff --git a/packages/ml-vision/lib/VisionBarcodeWifiEncryptionType.js b/packages/ml/lib/VisionBarcodeWifiEncryptionType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionBarcodeWifiEncryptionType.js
rename to packages/ml/lib/VisionBarcodeWifiEncryptionType.js
diff --git a/packages/ml-vision/lib/VisionCloudLandmarkRecognizerModelType.js b/packages/ml/lib/VisionCloudLandmarkRecognizerModelType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionCloudLandmarkRecognizerModelType.js
rename to packages/ml/lib/VisionCloudLandmarkRecognizerModelType.js
diff --git a/packages/ml-vision/lib/VisionCloudTextRecognizerModelType.js b/packages/ml/lib/VisionCloudTextRecognizerModelType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionCloudTextRecognizerModelType.js
rename to packages/ml/lib/VisionCloudTextRecognizerModelType.js
diff --git a/packages/ml-vision/lib/VisionDocumentTextRecognizedBreakType.js b/packages/ml/lib/VisionDocumentTextRecognizedBreakType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionDocumentTextRecognizedBreakType.js
rename to packages/ml/lib/VisionDocumentTextRecognizedBreakType.js
diff --git a/packages/ml-vision/lib/VisionFaceContourType.js b/packages/ml/lib/VisionFaceContourType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceContourType.js
rename to packages/ml/lib/VisionFaceContourType.js
diff --git a/packages/ml-vision/lib/VisionFaceDetectorClassificationMode.js b/packages/ml/lib/VisionFaceDetectorClassificationMode.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceDetectorClassificationMode.js
rename to packages/ml/lib/VisionFaceDetectorClassificationMode.js
diff --git a/packages/ml-vision/lib/VisionFaceDetectorContourMode.js b/packages/ml/lib/VisionFaceDetectorContourMode.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceDetectorContourMode.js
rename to packages/ml/lib/VisionFaceDetectorContourMode.js
diff --git a/packages/ml-vision/lib/VisionFaceDetectorLandmarkMode.js b/packages/ml/lib/VisionFaceDetectorLandmarkMode.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceDetectorLandmarkMode.js
rename to packages/ml/lib/VisionFaceDetectorLandmarkMode.js
diff --git a/packages/ml-vision/lib/VisionFaceDetectorPerformanceMode.js b/packages/ml/lib/VisionFaceDetectorPerformanceMode.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceDetectorPerformanceMode.js
rename to packages/ml/lib/VisionFaceDetectorPerformanceMode.js
diff --git a/packages/ml-vision/lib/VisionFaceLandmarkType.js b/packages/ml/lib/VisionFaceLandmarkType.js
similarity index 100%
rename from packages/ml-vision/lib/VisionFaceLandmarkType.js
rename to packages/ml/lib/VisionFaceLandmarkType.js
diff --git a/packages/ml-vision/lib/VisionPoint.js b/packages/ml/lib/VisionPoint.js
similarity index 100%
rename from packages/ml-vision/lib/VisionPoint.js
rename to packages/ml/lib/VisionPoint.js
diff --git a/packages/ml-vision/lib/VisionRectangle.js b/packages/ml/lib/VisionRectangle.js
similarity index 100%
rename from packages/ml-vision/lib/VisionRectangle.js
rename to packages/ml/lib/VisionRectangle.js
diff --git a/packages/ml-vision/lib/index.d.ts b/packages/ml/lib/index.d.ts
similarity index 100%
rename from packages/ml-vision/lib/index.d.ts
rename to packages/ml/lib/index.d.ts
diff --git a/packages/ml-vision/lib/index.js b/packages/ml/lib/index.js
similarity index 72%
rename from packages/ml-vision/lib/index.js
rename to packages/ml/lib/index.js
index 325db1ebb3b..fa252950154 100644
--- a/packages/ml-vision/lib/index.js
+++ b/packages/ml/lib/index.js
@@ -15,11 +15,7 @@
*
*/
-import {
- isString,
- toFilePath,
- validateOptionalNativeDependencyExists,
-} from '@react-native-firebase/app/lib/common';
+import { isString, toFilePath } from '@react-native-firebase/app/lib/common';
import {
createModuleNamespace,
FirebaseModule,
@@ -27,7 +23,6 @@ import {
} from '@react-native-firebase/app/lib/internal';
import version from './version';
import VisionBarcodeAddressType from './VisionBarcodeAddressType';
-import visionBarcodeDetectorOptions from './visionBarcodeDetectorOptions';
import VisionBarcodeEmailType from './VisionBarcodeEmailType';
import VisionBarcodeFormat from './VisionBarcodeFormat';
import VisionBarcodePhoneType from './VisionBarcodePhoneType';
@@ -44,10 +39,8 @@ import VisionFaceContourType from './VisionFaceContourType';
import VisionFaceDetectorClassificationMode from './VisionFaceDetectorClassificationMode';
import VisionFaceDetectorContourMode from './VisionFaceDetectorContourMode';
import VisionFaceDetectorLandmarkMode from './VisionFaceDetectorLandmarkMode';
-import visionFaceDetectorOptions from './visionFaceDetectorOptions';
import VisionFaceDetectorPerformanceMode from './VisionFaceDetectorPerformanceMode';
import VisionFaceLandmarkType from './VisionFaceLandmarkType';
-import visionImageLabelerOptions from './visionImageLabelerOptions';
const statics = {
VisionCloudTextRecognizerModelType,
@@ -72,47 +65,11 @@ const nativeModuleName = [
'RNFBMLVisionFaceDetectorModule',
'RNFBMLVisionImageLabelerModule',
'RNFBMLVisionTextRecognizerModule',
- 'RNFBMLVisionBarcodeDetectorModule',
'RNFBMLVisionLandmarkRecognizerModule',
'RNFBMLVisionDocumentTextRecognizerModule',
];
class FirebaseMlKitVisionModule extends FirebaseModule {
- faceDetectorProcessImage(localImageFilePath, faceDetectorOptions) {
- validateOptionalNativeDependencyExists(
- 'ml_vision_face_model',
- 'ML Kit Vision Face Detector',
- !!this.native.faceDetectorProcessImage,
- );
-
- if (!isString(localImageFilePath)) {
- throw new Error(
- "firebase.vision().faceDetectorProcessImage(*) 'localImageFilePath' expected a string local file path.",
- );
- }
-
- let options;
- try {
- options = visionFaceDetectorOptions(faceDetectorOptions);
- } catch (e) {
- throw new Error(
- `firebase.vision().faceDetectorProcessImage(_, *) 'faceDetectorOptions' ${e.message}.`,
- );
- }
-
- return this.native.faceDetectorProcessImage(toFilePath(localImageFilePath), options);
- }
-
- textRecognizerProcessImage(localImageFilePath) {
- if (!isString(localImageFilePath)) {
- throw new Error(
- "firebase.vision().textRecognizerProcessImage(*) 'localImageFilePath' expected a string local file path.",
- );
- }
-
- return this.native.textRecognizerProcessImage(toFilePath(localImageFilePath));
- }
-
cloudTextRecognizerProcessImage(localImageFilePath, cloudTextRecognizerOptions) {
if (!isString(localImageFilePath)) {
throw new Error(
@@ -169,36 +126,7 @@ class FirebaseMlKitVisionModule extends FirebaseModule {
return this.native.cloudLandmarkRecognizerProcessImage(toFilePath(localImageFilePath), options);
}
- imageLabelerProcessImage(localImageFilePath, imageLabelerOptions) {
- validateOptionalNativeDependencyExists(
- 'ml_vision_image_label_model',
- 'ML Kit Vision Image Labeler',
- !!this.native.imageLabelerProcessImage,
- );
-
- if (!isString(localImageFilePath)) {
- throw new Error(
- "firebase.vision().imageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
- );
- }
-
- let options;
- try {
- options = visionImageLabelerOptions(imageLabelerOptions);
- } catch (e) {
- throw new Error(`firebase.vision().imageLabelerProcessImage(_, *) ${e.message}.`);
- }
-
- return this.native.imageLabelerProcessImage(toFilePath(localImageFilePath), options);
- }
-
cloudImageLabelerProcessImage(localImageFilePath, cloudImageLabelerOptions) {
- validateOptionalNativeDependencyExists(
- 'ml_vision_image_label_model',
- 'ML Kit Vision Image Labeler',
- !!this.native.imageLabelerProcessImage,
- );
-
if (!isString(localImageFilePath)) {
throw new Error(
"firebase.vision().cloudImageLabelerProcessImage(*) 'localImageFilePath' expected a string local file path.",
@@ -214,23 +142,6 @@ class FirebaseMlKitVisionModule extends FirebaseModule {
return this.native.cloudImageLabelerProcessImage(toFilePath(localImageFilePath), options);
}
-
- barcodeDetectorProcessImage(localImageFilePath, barcodeDetectorOptions) {
- if (!isString(localImageFilePath)) {
- throw new Error(
- "firebase.vision().barcodeDetectorProcessImage(*) 'localImageFilePath' expected a string local file path.",
- );
- }
-
- let options;
- try {
- options = visionBarcodeDetectorOptions(barcodeDetectorOptions);
- } catch (e) {
- throw new Error(`firebase.vision().barcodeDetectorProcessImage(_, *) ${e.message}`);
- }
-
- return this.native.barcodeDetectorProcessImage(toFilePath(localImageFilePath), options);
- }
}
// import { SDK_VERSION } from '@react-native-firebase/ml-vision';
diff --git a/packages/ml-vision/lib/visionCloudDocumentTextRecognizerOptions.js b/packages/ml/lib/visionCloudDocumentTextRecognizerOptions.js
similarity index 100%
rename from packages/ml-vision/lib/visionCloudDocumentTextRecognizerOptions.js
rename to packages/ml/lib/visionCloudDocumentTextRecognizerOptions.js
diff --git a/packages/ml-vision/lib/visionCloudImageLabelerOptions.js b/packages/ml/lib/visionCloudImageLabelerOptions.js
similarity index 100%
rename from packages/ml-vision/lib/visionCloudImageLabelerOptions.js
rename to packages/ml/lib/visionCloudImageLabelerOptions.js
diff --git a/packages/ml-vision/lib/visionCloudLandmarkRecognizerOptions.js b/packages/ml/lib/visionCloudLandmarkRecognizerOptions.js
similarity index 100%
rename from packages/ml-vision/lib/visionCloudLandmarkRecognizerOptions.js
rename to packages/ml/lib/visionCloudLandmarkRecognizerOptions.js
diff --git a/packages/ml-vision/lib/visionCloudTextRecognizerOptions.js b/packages/ml/lib/visionCloudTextRecognizerOptions.js
similarity index 100%
rename from packages/ml-vision/lib/visionCloudTextRecognizerOptions.js
rename to packages/ml/lib/visionCloudTextRecognizerOptions.js
diff --git a/packages/ml-vision/package.json b/packages/ml/package.json
similarity index 69%
rename from packages/ml-vision/package.json
rename to packages/ml/package.json
index c918faaeee8..54f4cb1dfdc 100644
--- a/packages/ml-vision/package.json
+++ b/packages/ml/package.json
@@ -1,8 +1,8 @@
{
- "name": "@react-native-firebase/ml-vision",
+ "name": "@react-native-firebase/ml",
"version": "7.4.12",
"author": "Invertase (http://invertase.io)",
- "description": "React Native Firebase - Firebase ML Kit brings the power of machine learning vision to your React Native application, supporting both Android & iOS.",
+ "description": "React Native Firebase - Firebase ML brings the power of machine learning vision to your React Native application, supporting both Android & iOS.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
@@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
- "url": "https://github.com/invertase/react-native-firebase/tree/master/packages/ml-vision"
+ "url": "https://github.com/invertase/react-native-firebase/tree/master/packages/ml"
},
"license": "Apache-2.0",
"keywords": [
@@ -24,11 +24,6 @@
"text recognition",
"landmark recognition",
"image labeler",
- "face detector",
- "barcode",
- "label",
- "natural language",
- "nlp",
"vision"
],
"peerDependencies": {
diff --git a/packages/ml-vision/type-test.ts b/packages/ml/type-test.ts
similarity index 97%
rename from packages/ml-vision/type-test.ts
rename to packages/ml/type-test.ts
index c1c480303a6..99810d36c2c 100644
--- a/packages/ml-vision/type-test.ts
+++ b/packages/ml/type-test.ts
@@ -1,5 +1,5 @@
import firebase from '@react-native-firebase/app';
-import * as vision from '@react-native-firebase/ml-vision';
+import * as vision from '@react-native-firebase/ml';
console.log(vision.default().app);
diff --git a/packages/remote-config/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java b/packages/remote-config/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java
index d3280f6d390..39a555abc4f 100644
--- a/packages/remote-config/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java
+++ b/packages/remote-config/android/src/main/java/io/invertase/firebase/config/UniversalFirebaseConfigModule.java
@@ -98,7 +98,6 @@ Task setConfigSettings(String appName, Bundle configSettings) {
Task setDefaultsFromResource(String appName, String resourceName) {
FirebaseApp firebaseApp = FirebaseApp.getInstance(appName);
- return Tasks.call(getExecutor(), () -> {
int resourceId = getXmlResourceIdByName(resourceName);
XmlResourceParser xmlResourceParser = null;
@@ -109,12 +108,15 @@ Task setDefaultsFromResource(String appName, String resourceName) {
}
if (xmlResourceParser != null) {
- FirebaseRemoteConfig.getInstance(firebaseApp).setDefaults(resourceId);
- return null;
+ // REVIEW this changed from setDefaults to setDefaultsAsync returning Task -
+ // so adjusted the whole method to just return from this call or do previous behavior
+ // with Task based exception handling if resource not found. ?
+ return FirebaseRemoteConfig.getInstance(firebaseApp).setDefaultsAsync(resourceId);
+ } else {
+ return Tasks.call(getExecutor(), () -> {
+ throw new Exception("resource_not_found");
+ });
}
-
- throw new Exception("resource_not_found");
- });
}
Task setDefaults(String appName, HashMap defaults) {
diff --git a/packages/remote-config/e2e/config.e2e.js b/packages/remote-config/e2e/config.e2e.js
index ffe906e681f..82907cdaa08 100644
--- a/packages/remote-config/e2e/config.e2e.js
+++ b/packages/remote-config/e2e/config.e2e.js
@@ -427,7 +427,7 @@ describe('remoteConfig()', () => {
const config = firebase.remoteConfig().getAll();
- const remoteProps = ['bool', 'string', 'number'];
+ const remoteProps = ['some_key'];
config.should.have.keys(...remoteProps);
@@ -436,10 +436,6 @@ describe('remoteConfig()', () => {
const configRetrieveAgain = firebase.remoteConfig().getAll();
should(configRetrieveAgain).not.have.properties(remoteProps);
-
- const configRetrieve = firebase.remoteConfig().getValue('some_key').value;
-
- should(configRetrieve).be.equal(undefined);
});
it('returns a "null" value as reset() API is not supported on iOS', async () => {
@@ -450,43 +446,4 @@ describe('remoteConfig()', () => {
}
});
});
-
- describe('call methods, getters & setters that are deprecated, removed or not supported', () => {
- it('call methods, getters & setters that fire a console.warn() & have no return value', () => {
- const config = firebase.remoteConfig();
- const testValue = config.getValue('testValue');
- const testValueSpy = sinon.spy(testValue, 'value', ['get']);
- const testSourceSpy = sinon.spy(testValue, 'source', ['get']);
- const defaultSpy = sinon.spy(config, 'defaultConfig', ['get', 'set']);
- const settingSpy = sinon.spy(config, 'settings', ['set']);
- const isDeveloperModeEnabledSpy = sinon.spy(config, 'isDeveloperModeEnabled', ['get']);
- const minimumFetchIntervalSpy = sinon.spy(config, 'minimumFetchInterval', ['get']);
- const setLogLevelSpy = sinon.spy(config, 'setLogLevel');
- const setConfigSettingsSpy = sinon.spy(config, 'setConfigSettings');
-
- config.defaultConfig;
- config.defaultConfig = {};
- config.settings = {};
- config.fetchTimeMillis;
- config.isDeveloperModeEnabled;
- config.minimumFetchInterval;
- config.setLogLevel();
- config.setConfigSettings({ isDeveloperModeEnabled: true, minimumFetchInterval: 300 });
-
- testValue.value;
- testValue.source;
-
- setConfigSettingsSpy.should.be.calledOnce();
- testValueSpy.get.should.be.calledOnce();
- testSourceSpy.get.should.be.calledOnce();
-
- defaultSpy.get.should.be.calledOnce();
- defaultSpy.set.should.be.calledOnce();
-
- settingSpy.set.should.be.calledOnce();
- isDeveloperModeEnabledSpy.get.should.be.calledOnce();
- minimumFetchIntervalSpy.get.should.be.calledOnce();
- setLogLevelSpy.should.be.calledOnce();
- });
- });
});
diff --git a/packages/remote-config/ios/RNFBConfig/RNFBConfigModule.m b/packages/remote-config/ios/RNFBConfig/RNFBConfigModule.m
index efb14d4fb43..41f9fe6982b 100644
--- a/packages/remote-config/ios/RNFBConfig/RNFBConfigModule.m
+++ b/packages/remote-config/ios/RNFBConfig/RNFBConfigModule.m
@@ -157,20 +157,17 @@ + (BOOL)requiresMainQueueSetup {
: (RCTPromiseResolveBlock) resolve
: (RCTPromiseRejectBlock) reject
) {
- FIRRemoteConfigActivateCompletion completionHandler = ^(NSError *__nullable error) {
- if(error){
- if(error.userInfo && error.userInfo[@"ActivationFailureReason"] != nil && [error.userInfo[@"ActivationFailureReason"] containsString:@"already activated"]){
+ [[FIRRemoteConfig remoteConfigWithApp:firebaseApp] activateWithCompletion:^(BOOL changed, NSError *_Nullable error) {
+ if (error){
+ if (error.userInfo && error.userInfo[@"ActivationFailureReason"] != nil && [error.userInfo[@"ActivationFailureReason"] containsString:@"already activated"]){
resolve([self resultWithConstants:@([RCTConvert BOOL:@(NO)]) firebaseApp:firebaseApp]);
} else {
[RNFBSharedUtils rejectPromiseWithNSError:reject error:error];
}
-
} else {
- resolve([self resultWithConstants:@([RCTConvert BOOL:@(YES)]) firebaseApp:firebaseApp]);
+ resolve([self resultWithConstants:@([RCTConvert BOOL:@(changed)]) firebaseApp:firebaseApp]);
}
- };
-
- [[FIRRemoteConfig remoteConfigWithApp:firebaseApp] activateWithCompletionHandler:completionHandler];
+ }];
}
RCT_EXPORT_METHOD(setConfigSettings:
@@ -242,7 +239,7 @@ - (NSDictionary *)getConstantsForApp:(FIRApp *) firebaseApp {
values[key] = convertFIRRemoteConfigValueToNSDictionary(value);
}
- NSArray *defaultKeys = [remoteConfig allKeysFromSource:FIRRemoteConfigSourceDefault namespace:FIRNamespaceGoogleMobilePlatform];
+ NSArray *defaultKeys = [remoteConfig allKeysFromSource:FIRRemoteConfigSourceDefault];
for (NSString *key in defaultKeys) {
if ([values valueForKey:key] == nil) {
FIRRemoteConfigValue *value = [[FIRRemoteConfig remoteConfigWithApp:firebaseApp] configValueForKey:key];
diff --git a/packages/remote-config/lib/index.js b/packages/remote-config/lib/index.js
index 2f78e0d8cb3..ae9f2152405 100644
--- a/packages/remote-config/lib/index.js
+++ b/packages/remote-config/lib/index.js
@@ -95,31 +95,10 @@ class FirebaseConfigModule extends FirebaseModule {
return values;
}
- get defaultConfig() {
- // eslint-disable-next-line no-console
- console.warn(
- 'firebase.remoteConfig().defaultConfig is not supported. Default values are merged with config values',
- );
- }
-
- set defaultConfig(defaults) {
- // eslint-disable-next-line no-console
- console.warn(
- 'firebase.remoteConfig().defaultConfig is not supported. Please use firebase.remoteConfig().setDefaults({ [key] : value }) to set default values',
- );
- }
-
get settings() {
return this._settings;
}
- set settings(settings) {
- // eslint-disable-next-line no-console
- console.warn(
- "firebase.remoteConfig().settings = { [key]: string }; is not supported. Please use 'firebase.remoteConfig().setConfigSettings({ ...[key]: string, })' instead'",
- );
- }
-
get fetchTimeMillis() {
// android returns -1 if no fetch yet and iOS returns 0
return this._lastFetchTime;
@@ -129,20 +108,6 @@ class FirebaseConfigModule extends FirebaseModule {
return this._lastFetchStatus;
}
- get isDeveloperModeEnabled() {
- // eslint-disable-next-line no-console
- console.warn(
- 'firebase.remoteConfig().isDeveloperModeEnabled has now been removed. Please consider setting `settings.minimumFetchIntervalMillis` in remoteConfig.Settings',
- );
- }
-
- get minimumFetchInterval() {
- // eslint-disable-next-line no-console
- console.warn(
- 'firebase.remoteConfig().minimumFetchInterval has been removed. Use `firebase.remoteConfig().settings.minimumFetchIntervalMillis` instead.',
- );
- }
-
/**
* Deletes all activated, fetched and defaults configs and resets all Firebase Remote Config settings.
* @returns {Promise}
@@ -166,20 +131,6 @@ class FirebaseConfigModule extends FirebaseModule {
throw new Error('firebase.remoteConfig().setConfigSettings(*): settings must set an object.');
}
- if (hasOwnProperty(settings, 'isDeveloperModeEnabled')) {
- // eslint-disable-next-line no-console
- console.warn(
- "firebase.remoteConfig().setConfigSettings(): 'settings.isDeveloperModeEnabled' has now been removed. Please consider setting 'settings.minimumFetchIntervalMillis'",
- );
- }
-
- if (hasOwnProperty(settings, 'minimumFetchInterval')) {
- // eslint-disable-next-line no-console
- console.warn(
- "firebase.remoteConfig().setConfigSettings(): 'settings.minimumFetchInterval' has now been removed. Please consider setting 'settings.minimumFetchIntervalMillis'",
- );
- }
-
if (hasOwnProperty(settings, 'minimumFetchIntervalMillis')) {
if (!isNumber(settings.minimumFetchIntervalMillis)) {
throw new Error(
@@ -265,11 +216,6 @@ class FirebaseConfigModule extends FirebaseModule {
return this._promiseWithConstants(this.native.setDefaultsFromResource(resourceName));
}
- setLogLevel() {
- // eslint-disable-next-line no-console
- console.warn('firebase.remoteConfig().setLogLevel() is not supported natively.');
- }
-
_updateFromConstants(constants) {
this._lastFetchTime = constants.lastFetchTime;
this._lastFetchStatus = constants.lastFetchStatus;
diff --git a/tests/android/app/build.gradle b/tests/android/app/build.gradle
index b374d50ca71..312a7f71c6a 100644
--- a/tests/android/app/build.gradle
+++ b/tests/android/app/build.gradle
@@ -37,14 +37,15 @@ def enableSeparateBuildPerCPUArchitecture = false
def useIntlJsc = false
android {
- compileSdkVersion 29
+ compileSdkVersion 30
aaptOptions {
+ // https://firebase.google.com/docs/ml/android/use-custom-models#local_model
noCompress "tflite"
}
defaultConfig {
applicationId "com.invertase.testing"
minSdkVersion 21
- targetSdkVersion 29
+ targetSdkVersion 30
versionCode 1
versionName "1.0"
diff --git a/tests/android/build.gradle b/tests/android/build.gradle
index 09e0846adf2..7ef83f694e4 100644
--- a/tests/android/build.gradle
+++ b/tests/android/build.gradle
@@ -7,11 +7,11 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.google.gms:google-services:4.3.3'
- classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.google.gms:google-services:4.3.4'
+ classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
- classpath 'com.google.firebase:perf-plugin:1.3.0'
- classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
+ classpath 'com.google.firebase:perf-plugin:1.3.3'
+ classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
}
@@ -41,10 +41,10 @@ allprojects {
subprojects {
task listAllDependencies(type: DependencyReportTask) {}
ext {
- compileSdk = 29
- buildTools = "29.0.3"
+ compileSdk = 30
+ buildTools = "30.0.2"
minSdk = 21
- targetSdk = 29
+ targetSdk = 30
}
afterEvaluate { project ->
diff --git a/tests/android/gradle/wrapper/gradle-wrapper.properties b/tests/android/gradle/wrapper/gradle-wrapper.properties
index bca17f36566..be52383ef49 100644
--- a/tests/android/gradle/wrapper/gradle-wrapper.properties
+++ b/tests/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/tests/app.js b/tests/app.js
index e1c01c1487d..0ddfed57b9e 100644
--- a/tests/app.js
+++ b/tests/app.js
@@ -29,8 +29,7 @@ import '@react-native-firebase/functions';
import '@react-native-firebase/iid';
import '@react-native-firebase/in-app-messaging';
import '@react-native-firebase/messaging';
-import '@react-native-firebase/ml-natural-language';
-import '@react-native-firebase/ml-vision';
+import '@react-native-firebase/ml';
import '@react-native-firebase/perf';
import '@react-native-firebase/remote-config';
import '@react-native-firebase/storage';
diff --git a/tests/e2e/mocha.opts b/tests/e2e/mocha.opts
index 2319b2bc402..cbdcf78ef4b 100644
--- a/tests/e2e/mocha.opts
+++ b/tests/e2e/mocha.opts
@@ -12,7 +12,8 @@
../packages/analytics/e2e/*.e2e.js
-../packages/auth/e2e/*.e2e.js
+# FIXME temporary, API limits make these failure-prone, toggled off during development
+#../packages/auth/e2e/*.e2e.js
# TODO a lot of these failing on CI - might be an API rate limit change
# ../packages/admob/e2e/*.e2e.js
@@ -29,10 +30,8 @@
../packages/remote-config/e2e/*.e2e.js
-../packages/ml-natural-language/e2e/*.e2e.js
-
# TODO - ci crashing Android
-# ../packages/ml-vision/e2e/*.e2e.js
+../packages/ml/e2e/*.e2e.js
../packages/in-app-messaging/e2e/*.e2e.js
diff --git a/tests/firebase.json b/tests/firebase.json
index f1df7b7dff1..e5d42e83e10 100644
--- a/tests/firebase.json
+++ b/tests/firebase.json
@@ -9,23 +9,12 @@
"crashlytics_disable_auto_disabler": false,
"crashlytics_auto_collection_enabled": true,
- "ml_natural_language_language_id_model" : true,
- "ml_natural_language_smart_reply_model" : true,
-
- "ml_vision_face_model" : true,
- "ml_vision_ocr_model" : true,
- "ml_vision_barcode_model" : true,
-
"messaging_auto_init_enabled": true,
"messaging_android_headless_task_timeout": 30000,
"messaging_android_notification_channel_id": "",
"messaging_android_notification_color": "@color/hotpink",
"messaging_ios_auto_register_for_remote_messages": true,
- "ml_vision_label_model": true,
- "ml_vision_image_label_model": true,
-
- "TODO_ml_natural_language_translate_model" : true,
"TODO_analytics_auto_collection_enabled": true,
"TODO_perf_auto_collection_enabled": true,
"TODO_in_app_messaging_auto_collection_enabled": true,
diff --git a/tests/ios/Podfile b/tests/ios/Podfile
index 79efea04e61..bb4fd3492d0 100644
--- a/tests/ios/Podfile
+++ b/tests/ios/Podfile
@@ -1,12 +1,7 @@
-platform :ios, '9.0'
-
-# Allow using RNFirebase as static frameworks
-$RNFirebaseAsStaticFramework = false
+platform :ios, '10.0'
# Version override testing
-$FirebaseSDKVersion = '6.34.0'
-# $FabricSDKVersion = '1.6.0'
-# $CrashlyticsSDKVersion = '3.1.0'
+$FirebaseSDKVersion = '7.0.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
@@ -45,7 +40,8 @@ target 'testing' do
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_native_modules!
- #pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => 'master'
+ # with Xcode 12 + detox OR with Xcode 12 from the Xcode UI (not command line), this compile speed optimization does not work
+ pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :branch => 'master'
end
post_install do |installer|
diff --git a/tests/ios/Podfile.lock b/tests/ios/Podfile.lock
index 6ed96bba33b..55a78d44394 100644
--- a/tests/ios/Podfile.lock
+++ b/tests/ios/Podfile.lock
@@ -1,224 +1,5 @@
PODS:
- - abseil/algorithm (0.20200225.0):
- - abseil/algorithm/algorithm (= 0.20200225.0)
- - abseil/algorithm/container (= 0.20200225.0)
- - abseil/algorithm/algorithm (0.20200225.0):
- - abseil/base/config
- - abseil/algorithm/container (0.20200225.0):
- - abseil/algorithm/algorithm
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/base (0.20200225.0):
- - abseil/base/atomic_hook (= 0.20200225.0)
- - abseil/base/base (= 0.20200225.0)
- - abseil/base/base_internal (= 0.20200225.0)
- - abseil/base/bits (= 0.20200225.0)
- - abseil/base/config (= 0.20200225.0)
- - abseil/base/core_headers (= 0.20200225.0)
- - abseil/base/dynamic_annotations (= 0.20200225.0)
- - abseil/base/endian (= 0.20200225.0)
- - abseil/base/errno_saver (= 0.20200225.0)
- - abseil/base/exponential_biased (= 0.20200225.0)
- - abseil/base/log_severity (= 0.20200225.0)
- - abseil/base/malloc_internal (= 0.20200225.0)
- - abseil/base/periodic_sampler (= 0.20200225.0)
- - abseil/base/pretty_function (= 0.20200225.0)
- - abseil/base/raw_logging_internal (= 0.20200225.0)
- - abseil/base/spinlock_wait (= 0.20200225.0)
- - abseil/base/throw_delegate (= 0.20200225.0)
- - abseil/base/atomic_hook (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/base (0.20200225.0):
- - abseil/base/atomic_hook
- - abseil/base/base_internal
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/dynamic_annotations
- - abseil/base/log_severity
- - abseil/base/raw_logging_internal
- - abseil/base/spinlock_wait
- - abseil/meta/type_traits
- - abseil/base/base_internal (0.20200225.0):
- - abseil/base/config
- - abseil/meta/type_traits
- - abseil/base/bits (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/config (0.20200225.0)
- - abseil/base/core_headers (0.20200225.0):
- - abseil/base/config
- - abseil/base/dynamic_annotations (0.20200225.0)
- - abseil/base/endian (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/errno_saver (0.20200225.0):
- - abseil/base/config
- - abseil/base/exponential_biased (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/log_severity (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/malloc_internal (0.20200225.0):
- - abseil/base/base
- - abseil/base/base_internal
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/dynamic_annotations
- - abseil/base/raw_logging_internal
- - abseil/base/periodic_sampler (0.20200225.0):
- - abseil/base/core_headers
- - abseil/base/exponential_biased
- - abseil/base/pretty_function (0.20200225.0)
- - abseil/base/raw_logging_internal (0.20200225.0):
- - abseil/base/atomic_hook
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/log_severity
- - abseil/base/spinlock_wait (0.20200225.0):
- - abseil/base/base_internal
- - abseil/base/core_headers
- - abseil/base/errno_saver
- - abseil/base/throw_delegate (0.20200225.0):
- - abseil/base/config
- - abseil/base/raw_logging_internal
- - abseil/container/compressed_tuple (0.20200225.0):
- - abseil/utility/utility
- - abseil/container/inlined_vector (0.20200225.0):
- - abseil/algorithm/algorithm
- - abseil/base/core_headers
- - abseil/base/throw_delegate
- - abseil/container/inlined_vector_internal
- - abseil/memory/memory
- - abseil/container/inlined_vector_internal (0.20200225.0):
- - abseil/base/core_headers
- - abseil/container/compressed_tuple
- - abseil/memory/memory
- - abseil/meta/type_traits
- - abseil/types/span
- - abseil/memory (0.20200225.0):
- - abseil/memory/memory (= 0.20200225.0)
- - abseil/memory/memory (0.20200225.0):
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/meta (0.20200225.0):
- - abseil/meta/type_traits (= 0.20200225.0)
- - abseil/meta/type_traits (0.20200225.0):
- - abseil/base/config
- - abseil/numeric/int128 (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/strings/internal (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/endian
- - abseil/base/raw_logging_internal
- - abseil/meta/type_traits
- - abseil/strings/str_format (0.20200225.0):
- - abseil/strings/str_format_internal
- - abseil/strings/str_format_internal (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/numeric/int128
- - abseil/strings/strings
- - abseil/types/span
- - abseil/strings/strings (0.20200225.0):
- - abseil/base/base
- - abseil/base/bits
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/base/endian
- - abseil/base/raw_logging_internal
- - abseil/base/throw_delegate
- - abseil/memory/memory
- - abseil/meta/type_traits
- - abseil/numeric/int128
- - abseil/strings/internal
- - abseil/time (0.20200225.0):
- - abseil/time/internal (= 0.20200225.0)
- - abseil/time/time (= 0.20200225.0)
- - abseil/time/internal (0.20200225.0):
- - abseil/time/internal/cctz (= 0.20200225.0)
- - abseil/time/internal/cctz (0.20200225.0):
- - abseil/time/internal/cctz/civil_time (= 0.20200225.0)
- - abseil/time/internal/cctz/time_zone (= 0.20200225.0)
- - abseil/time/internal/cctz/civil_time (0.20200225.0):
- - abseil/base/config
- - abseil/time/internal/cctz/time_zone (0.20200225.0):
- - abseil/base/config
- - abseil/time/internal/cctz/civil_time
- - abseil/time/time (0.20200225.0):
- - abseil/base/base
- - abseil/base/core_headers
- - abseil/base/raw_logging_internal
- - abseil/numeric/int128
- - abseil/strings/strings
- - abseil/time/internal/cctz/civil_time
- - abseil/time/internal/cctz/time_zone
- - abseil/types (0.20200225.0):
- - abseil/types/any (= 0.20200225.0)
- - abseil/types/bad_any_cast (= 0.20200225.0)
- - abseil/types/bad_any_cast_impl (= 0.20200225.0)
- - abseil/types/bad_optional_access (= 0.20200225.0)
- - abseil/types/bad_variant_access (= 0.20200225.0)
- - abseil/types/compare (= 0.20200225.0)
- - abseil/types/optional (= 0.20200225.0)
- - abseil/types/span (= 0.20200225.0)
- - abseil/types/variant (= 0.20200225.0)
- - abseil/types/any (0.20200225.0):
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/types/bad_any_cast
- - abseil/utility/utility
- - abseil/types/bad_any_cast (0.20200225.0):
- - abseil/base/config
- - abseil/types/bad_any_cast_impl
- - abseil/types/bad_any_cast_impl (0.20200225.0):
- - abseil/base/config
- - abseil/base/raw_logging_internal
- - abseil/types/bad_optional_access (0.20200225.0):
- - abseil/base/config
- - abseil/base/raw_logging_internal
- - abseil/types/bad_variant_access (0.20200225.0):
- - abseil/base/config
- - abseil/base/raw_logging_internal
- - abseil/types/compare (0.20200225.0):
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/types/optional (0.20200225.0):
- - abseil/base/base_internal
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/memory/memory
- - abseil/meta/type_traits
- - abseil/types/bad_optional_access
- - abseil/utility/utility
- - abseil/types/span (0.20200225.0):
- - abseil/algorithm/algorithm
- - abseil/base/core_headers
- - abseil/base/throw_delegate
- - abseil/meta/type_traits
- - abseil/types/variant (0.20200225.0):
- - abseil/base/base_internal
- - abseil/base/config
- - abseil/base/core_headers
- - abseil/meta/type_traits
- - abseil/types/bad_variant_access
- - abseil/utility/utility
- - abseil/utility/utility (0.20200225.0):
- - abseil/base/base_internal
- - abseil/base/config
- - abseil/meta/type_traits
- boost-for-react-native (1.63.0)
- - BoringSSL-GRPC (0.0.7):
- - BoringSSL-GRPC/Implementation (= 0.0.7)
- - BoringSSL-GRPC/Interface (= 0.0.7)
- - BoringSSL-GRPC/Implementation (0.0.7):
- - BoringSSL-GRPC/Interface (= 0.0.7)
- - BoringSSL-GRPC/Interface (0.0.7)
- DoubleConversion (1.1.6)
- FBLazyVector (0.62.2)
- FBReactNativeSpec (0.62.2):
@@ -228,214 +9,154 @@ PODS:
- React-Core (= 0.62.2)
- React-jsi (= 0.62.2)
- ReactCommon/turbomodule/core (= 0.62.2)
- - Firebase/AdMob (6.34.0):
+ - Firebase/AdMob (7.0.0):
- Firebase/CoreOnly
- - Google-Mobile-Ads-SDK (~> 7.63)
- - Firebase/Analytics (6.34.0):
+ - Google-Mobile-Ads-SDK (~> 7.66)
+ - Firebase/Analytics (7.0.0):
- Firebase/Core
- - Firebase/Auth (6.34.0):
+ - Firebase/Auth (7.0.0):
- Firebase/CoreOnly
- - FirebaseAuth (~> 6.9.2)
- - Firebase/Core (6.34.0):
+ - FirebaseAuth (~> 7.0.0)
+ - Firebase/Core (7.0.0):
- Firebase/CoreOnly
- - FirebaseAnalytics (= 6.9.0)
- - Firebase/CoreOnly (6.34.0):
- - FirebaseCore (= 6.10.4)
- - Firebase/Crashlytics (6.34.0):
+ - FirebaseAnalytics (= 7.0.0)
+ - Firebase/CoreOnly (7.0.0):
+ - FirebaseCore (= 7.0.0)
+ - Firebase/Crashlytics (7.0.0):
- Firebase/CoreOnly
- - FirebaseCrashlytics (~> 4.6.2)
- - Firebase/Database (6.34.0):
+ - FirebaseCrashlytics (~> 7.0.0)
+ - Firebase/Database (7.0.0):
- Firebase/CoreOnly
- - FirebaseDatabase (~> 6.6.0)
- - Firebase/DynamicLinks (6.34.0):
+ - FirebaseDatabase (~> 7.0.0)
+ - Firebase/DynamicLinks (7.0.0):
- Firebase/CoreOnly
- - FirebaseDynamicLinks (~> 4.3.1)
- - Firebase/Firestore (6.34.0):
+ - FirebaseDynamicLinks (~> 7.0.0)
+ - Firebase/Firestore (7.0.0):
- Firebase/CoreOnly
- - FirebaseFirestore (~> 1.19.0)
- - Firebase/Functions (6.34.0):
+ - FirebaseFirestore (~> 7.0.0)
+ - Firebase/Functions (7.0.0):
- Firebase/CoreOnly
- - FirebaseFunctions (~> 2.9.0)
- - Firebase/InAppMessaging (6.34.0):
+ - FirebaseFunctions (~> 7.0.0)
+ - Firebase/InAppMessaging (7.0.0):
- Firebase/CoreOnly
- - FirebaseInAppMessaging (~> 0.24.0)
- - Firebase/Messaging (6.34.0):
+ - FirebaseInAppMessaging (~> 7.0.0-beta)
+ - Firebase/Messaging (7.0.0):
- Firebase/CoreOnly
- - FirebaseMessaging (~> 4.7.1)
- - Firebase/MLCommon (6.34.0):
+ - FirebaseMessaging (~> 7.0.0)
+ - Firebase/MLVision (7.0.0):
- Firebase/CoreOnly
- - FirebaseMLCommon (~> 0.21.0)
- - Firebase/MLNaturalLanguage (6.34.0):
+ - FirebaseMLVision (~> 7.0.0-beta)
+ - Firebase/Performance (7.0.0):
- Firebase/CoreOnly
- - FirebaseMLNaturalLanguage (~> 0.18.0)
- - Firebase/MLNLLanguageID (6.34.0):
+ - FirebasePerformance (~> 7.0.0)
+ - Firebase/RemoteConfig (7.0.0):
- Firebase/CoreOnly
- - FirebaseMLNLLanguageID (~> 0.18.0)
- - Firebase/MLNLSmartReply (6.34.0):
+ - FirebaseRemoteConfig (~> 7.0.0)
+ - Firebase/Storage (7.0.0):
- Firebase/CoreOnly
- - FirebaseMLNLSmartReply (~> 0.18.0)
- - Firebase/MLVision (6.34.0):
- - Firebase/CoreOnly
- - FirebaseMLVision (~> 0.21.0)
- - Firebase/MLVisionBarcodeModel (6.34.0):
- - Firebase/CoreOnly
- - FirebaseMLVisionBarcodeModel (~> 0.21.0)
- - Firebase/MLVisionFaceModel (6.34.0):
- - Firebase/CoreOnly
- - FirebaseMLVisionFaceModel (~> 0.21.0)
- - Firebase/MLVisionLabelModel (6.34.0):
- - Firebase/CoreOnly
- - FirebaseMLVisionLabelModel (~> 0.21.0)
- - Firebase/MLVisionTextModel (6.34.0):
- - Firebase/CoreOnly
- - FirebaseMLVisionTextModel (~> 0.21.0)
- - Firebase/Performance (6.34.0):
- - Firebase/CoreOnly
- - FirebasePerformance (~> 3.3.1)
- - Firebase/RemoteConfig (6.34.0):
- - Firebase/CoreOnly
- - FirebaseRemoteConfig (~> 4.9.1)
- - Firebase/Storage (6.34.0):
- - Firebase/CoreOnly
- - FirebaseStorage (~> 3.9.1)
- - FirebaseABTesting (4.2.0):
- - FirebaseCore (~> 6.10)
- - FirebaseAnalytics (6.9.0):
- - FirebaseCore (~> 6.10)
- - FirebaseInstallations (~> 1.7)
- - GoogleAppMeasurement (= 6.9.0)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- - GoogleUtilities/MethodSwizzler (~> 6.7)
- - GoogleUtilities/Network (~> 6.7)
- - "GoogleUtilities/NSData+zlib (~> 6.7)"
- - nanopb (~> 1.30906.0)
- - FirebaseAuth (6.9.2):
- - FirebaseCore (~> 6.10)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- - GoogleUtilities/Environment (~> 6.7)
- - GTMSessionFetcher/Core (~> 1.1)
- - FirebaseCore (6.10.4):
- - FirebaseCoreDiagnostics (~> 1.6)
- - GoogleUtilities/Environment (~> 6.7)
- - GoogleUtilities/Logger (~> 6.7)
- - FirebaseCoreDiagnostics (1.7.0):
- - GoogleDataTransport (~> 7.4)
- - GoogleUtilities/Environment (~> 6.7)
- - GoogleUtilities/Logger (~> 6.7)
- - nanopb (~> 1.30906.0)
- - FirebaseCrashlytics (4.6.2):
- - FirebaseCore (~> 6.10)
- - FirebaseInstallations (~> 1.6)
- - GoogleDataTransport (~> 7.2)
- - nanopb (~> 1.30906.0)
+ - FirebaseStorage (~> 7.0.0)
+ - FirebaseABTesting (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseAnalytics (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - GoogleAppMeasurement (= 7.0.0)
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.0)
+ - GoogleUtilities/MethodSwizzler (~> 7.0)
+ - GoogleUtilities/Network (~> 7.0)
+ - "GoogleUtilities/NSData+zlib (~> 7.0)"
+ - nanopb (~> 2.30906.0)
+ - FirebaseAuth (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GTMSessionFetcher/Core (~> 1.4)
+ - FirebaseCore (7.0.0):
+ - FirebaseCoreDiagnostics (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/Logger (~> 7.0)
+ - FirebaseCoreDiagnostics (7.0.0):
+ - GoogleDataTransport (~> 8.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/Logger (~> 7.0)
+ - nanopb (~> 2.30906.0)
+ - FirebaseCrashlytics (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - GoogleDataTransport (~> 8.0)
+ - nanopb (~> 2.30906.0)
- PromisesObjC (~> 1.2)
- - FirebaseDatabase (6.6.0):
- - FirebaseCore (~> 6.10)
- - leveldb-library (~> 1.22)
- - FirebaseDynamicLinks (4.3.1):
- - FirebaseCore (~> 6.10)
- - FirebaseFirestore (1.19.0):
- - abseil/algorithm (= 0.20200225.0)
- - abseil/base (= 0.20200225.0)
- - abseil/memory (= 0.20200225.0)
- - abseil/meta (= 0.20200225.0)
- - abseil/strings/strings (= 0.20200225.0)
- - abseil/time (= 0.20200225.0)
- - abseil/types (= 0.20200225.0)
- - FirebaseCore (~> 6.10)
- - "gRPC-C++ (~> 1.28.0)"
+ - FirebaseDatabase (7.0.0):
+ - FirebaseCore (~> 7.0)
- leveldb-library (~> 1.22)
- - nanopb (~> 1.30906.0)
- - FirebaseFunctions (2.9.0):
- - FirebaseCore (~> 6.10)
- - GTMSessionFetcher/Core (~> 1.1)
- - FirebaseInAppMessaging (0.24.0):
- - FirebaseABTesting (~> 4.2)
- - FirebaseCore (~> 6.10)
- - FirebaseInstallations (~> 1.6)
- - GoogleUtilities/Environment (~> 6.7)
- - nanopb (~> 1.30906.0)
- - FirebaseInstallations (1.7.0):
- - FirebaseCore (~> 6.10)
- - GoogleUtilities/Environment (~> 6.7)
- - GoogleUtilities/UserDefaults (~> 6.7)
+ - FirebaseDynamicLinks (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseFirestore (7.0.0)
+ - FirebaseFunctions (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - GTMSessionFetcher/Core (~> 1.4)
+ - FirebaseInAppMessaging (7.0.0-beta):
+ - FirebaseABTesting (~> 7.0)
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - nanopb (~> 2.30906.0)
+ - FirebaseInstallations (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/UserDefaults (~> 7.0)
- PromisesObjC (~> 1.2)
- - FirebaseInstanceID (4.8.0):
- - FirebaseCore (~> 6.10)
- - FirebaseInstallations (~> 1.6)
- - GoogleUtilities/Environment (~> 6.7)
- - GoogleUtilities/UserDefaults (~> 6.7)
- - FirebaseMessaging (4.7.1):
- - FirebaseCore (~> 6.10)
- - FirebaseInstanceID (~> 4.7)
- - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- - GoogleUtilities/Environment (~> 6.7)
- - GoogleUtilities/Reachability (~> 6.7)
- - GoogleUtilities/UserDefaults (~> 6.7)
- - Protobuf (>= 3.9.2, ~> 3.9)
- - FirebaseMLCommon (0.21.0):
- - FirebaseCore (~> 6.9)
- - FirebaseInstallations (~> 1.5)
- - GoogleToolboxForMac/Logger (~> 2.1)
- - "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- - "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
- - GoogleUtilities/UserDefaults (~> 6.0)
- - GTMSessionFetcher/Core (~> 1.1)
- - Protobuf (~> 3.12)
- - FirebaseMLNaturalLanguage (0.18.0):
- - FirebaseCore (~> 6.9)
- - FirebaseMLCommon (~> 0.21)
+ - FirebaseInstanceID (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/UserDefaults (~> 7.0)
+ - FirebaseMessaging (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstanceID (~> 7.0)
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/Reachability (~> 7.0)
+ - GoogleUtilities/UserDefaults (~> 7.0)
+ - FirebaseMLCommon (7.0.0-beta):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- "GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)"
+ - GoogleUtilities/UserDefaults (~> 7.0)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.12)
- - FirebaseMLNLLanguageID (0.18.0):
- - FirebaseCore (~> 6.9)
- - FirebaseMLNaturalLanguage (~> 0.18)
- - FirebaseMLNLSmartReply (0.18.0):
- - FirebaseCore (~> 6.9)
- - FirebaseMLNaturalLanguage (~> 0.18)
- - FirebaseMLNLLanguageID (~> 0.18)
- - FirebaseRemoteConfig (~> 4.7)
- - FirebaseMLVision (0.21.0):
- - FirebaseCore (~> 6.9)
- - FirebaseMLCommon (~> 0.21)
+ - FirebaseMLVision (7.0.0-beta):
+ - FirebaseCore (~> 7.0)
+ - FirebaseMLCommon (~> 7.0-beta)
- GoogleAPIClientForREST/Core (~> 1.3)
- GoogleAPIClientForREST/Vision (~> 1.3)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.12)
- - FirebaseMLVisionBarcodeModel (0.21.0):
- - FirebaseMLVision (~> 0.21)
- - FirebaseMLVisionFaceModel (0.21.0):
- - FirebaseMLVision (~> 0.21)
- - FirebaseMLVisionLabelModel (0.21.0):
- - FirebaseMLVision (~> 0.21)
- - FirebaseMLVisionTextModel (0.21.0):
- - FirebaseMLVision (~> 0.21)
- - FirebasePerformance (3.3.1):
- - FirebaseCore (~> 6.9)
- - FirebaseInstallations (~> 1.5)
- - FirebaseRemoteConfig (~> 4.7)
- - GoogleDataTransport (~> 7.0)
+ - FirebasePerformance (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - FirebaseRemoteConfig (~> 7.0)
+ - GoogleDataTransport (~> 8.0)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- - GoogleUtilities/Environment (~> 6.2)
- - GoogleUtilities/ISASwizzler (~> 6.2)
- - GoogleUtilities/MethodSwizzler (~> 6.2)
+ - GoogleUtilities/Environment (~> 7.0)
+ - GoogleUtilities/ISASwizzler (~> 7.0)
+ - GoogleUtilities/MethodSwizzler (~> 7.0)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.12)
- - FirebaseRemoteConfig (4.9.1):
- - FirebaseABTesting (~> 4.2)
- - FirebaseCore (~> 6.10)
- - FirebaseInstallations (~> 1.6)
- - GoogleUtilities/Environment (~> 6.7)
- - "GoogleUtilities/NSData+zlib (~> 6.7)"
- - FirebaseStorage (3.9.1):
- - FirebaseCore (~> 6.10)
- - GTMSessionFetcher/Core (~> 1.1)
+ - FirebaseRemoteConfig (7.0.0):
+ - FirebaseABTesting (~> 7.0)
+ - FirebaseCore (~> 7.0)
+ - FirebaseInstallations (~> 7.0)
+ - GoogleUtilities/Environment (~> 7.0)
+ - "GoogleUtilities/NSData+zlib (~> 7.0)"
+ - FirebaseStorage (7.0.0):
+ - FirebaseCore (~> 7.0)
+ - GTMSessionFetcher/Core (~> 1.4)
- Folly (2018.10.22.00):
- boost-for-react-native
- DoubleConversion
@@ -446,92 +167,68 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- - Google-Mobile-Ads-SDK (7.66.0):
- - GoogleAppMeasurement (~> 6.0)
+ - Google-Mobile-Ads-SDK (7.67.1):
+ - GoogleAppMeasurement (~> 7.0)
- GoogleUserMessagingPlatform (~> 1.1)
- - GoogleAPIClientForREST/Core (1.4.3):
+ - GoogleAPIClientForREST/Core (1.5.1):
- GTMSessionFetcher (>= 1.1.7)
- - GoogleAPIClientForREST/Vision (1.4.3):
+ - GoogleAPIClientForREST/Vision (1.5.1):
- GoogleAPIClientForREST/Core
- GTMSessionFetcher (>= 1.1.7)
- - GoogleAppMeasurement (6.9.0):
- - GoogleUtilities/AppDelegateSwizzler (~> 6.7)
- - GoogleUtilities/MethodSwizzler (~> 6.7)
- - GoogleUtilities/Network (~> 6.7)
- - "GoogleUtilities/NSData+zlib (~> 6.7)"
- - nanopb (~> 1.30906.0)
- - GoogleDataTransport (7.5.1):
- - nanopb (~> 1.30906.0)
- - GoogleToolboxForMac/DebugUtils (2.2.2):
- - GoogleToolboxForMac/Defines (= 2.2.2)
- - GoogleToolboxForMac/Defines (2.2.2)
- - GoogleToolboxForMac/Logger (2.2.2):
- - GoogleToolboxForMac/Defines (= 2.2.2)
- - "GoogleToolboxForMac/NSData+zlib (2.2.2)":
- - GoogleToolboxForMac/Defines (= 2.2.2)
- - "GoogleToolboxForMac/NSDictionary+URLArguments (2.2.2)":
- - GoogleToolboxForMac/DebugUtils (= 2.2.2)
- - GoogleToolboxForMac/Defines (= 2.2.2)
- - "GoogleToolboxForMac/NSString+URLArguments (= 2.2.2)"
- - "GoogleToolboxForMac/NSString+URLArguments (2.2.2)"
- - GoogleUserMessagingPlatform (1.2.0)
- - GoogleUtilities/AppDelegateSwizzler (6.7.2):
+ - GoogleAppMeasurement (7.0.0):
+ - GoogleUtilities/AppDelegateSwizzler (~> 7.0)
+ - GoogleUtilities/MethodSwizzler (~> 7.0)
+ - GoogleUtilities/Network (~> 7.0)
+ - "GoogleUtilities/NSData+zlib (~> 7.0)"
+ - nanopb (~> 2.30906.0)
+ - GoogleDataTransport (8.0.0):
+ - nanopb (~> 2.30906.0)
+ - GoogleToolboxForMac/DebugUtils (2.3.0):
+ - GoogleToolboxForMac/Defines (= 2.3.0)
+ - GoogleToolboxForMac/Defines (2.3.0)
+ - GoogleToolboxForMac/Logger (2.3.0):
+ - GoogleToolboxForMac/Defines (= 2.3.0)
+ - "GoogleToolboxForMac/NSData+zlib (2.3.0)":
+ - GoogleToolboxForMac/Defines (= 2.3.0)
+ - "GoogleToolboxForMac/NSDictionary+URLArguments (2.3.0)":
+ - GoogleToolboxForMac/DebugUtils (= 2.3.0)
+ - GoogleToolboxForMac/Defines (= 2.3.0)
+ - "GoogleToolboxForMac/NSString+URLArguments (= 2.3.0)"
+ - "GoogleToolboxForMac/NSString+URLArguments (2.3.0)"
+ - GoogleUserMessagingPlatform (1.3.0)
+ - GoogleUtilities/AppDelegateSwizzler (7.0.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- - GoogleUtilities/Environment (6.7.2):
+ - GoogleUtilities/Environment (7.0.0):
- PromisesObjC (~> 1.2)
- - GoogleUtilities/ISASwizzler (6.7.2)
- - GoogleUtilities/Logger (6.7.2):
+ - GoogleUtilities/ISASwizzler (7.0.0)
+ - GoogleUtilities/Logger (7.0.0):
- GoogleUtilities/Environment
- - GoogleUtilities/MethodSwizzler (6.7.2):
+ - GoogleUtilities/MethodSwizzler (7.0.0):
- GoogleUtilities/Logger
- - GoogleUtilities/Network (6.7.2):
+ - GoogleUtilities/Network (7.0.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- - "GoogleUtilities/NSData+zlib (6.7.2)"
- - GoogleUtilities/Reachability (6.7.2):
+ - "GoogleUtilities/NSData+zlib (7.0.0)"
+ - GoogleUtilities/Reachability (7.0.0):
- GoogleUtilities/Logger
- - GoogleUtilities/UserDefaults (6.7.2):
+ - GoogleUtilities/UserDefaults (7.0.0):
- GoogleUtilities/Logger
- - "gRPC-C++ (1.28.2)":
- - "gRPC-C++/Implementation (= 1.28.2)"
- - "gRPC-C++/Interface (= 1.28.2)"
- - "gRPC-C++/Implementation (1.28.2)":
- - abseil/container/inlined_vector (= 0.20200225.0)
- - abseil/memory/memory (= 0.20200225.0)
- - abseil/strings/str_format (= 0.20200225.0)
- - abseil/strings/strings (= 0.20200225.0)
- - abseil/types/optional (= 0.20200225.0)
- - "gRPC-C++/Interface (= 1.28.2)"
- - gRPC-Core (= 1.28.2)
- - "gRPC-C++/Interface (1.28.2)"
- - gRPC-Core (1.28.2):
- - gRPC-Core/Implementation (= 1.28.2)
- - gRPC-Core/Interface (= 1.28.2)
- - gRPC-Core/Implementation (1.28.2):
- - abseil/container/inlined_vector (= 0.20200225.0)
- - abseil/memory/memory (= 0.20200225.0)
- - abseil/strings/str_format (= 0.20200225.0)
- - abseil/strings/strings (= 0.20200225.0)
- - abseil/types/optional (= 0.20200225.0)
- - BoringSSL-GRPC (= 0.0.7)
- - gRPC-Core/Interface (= 1.28.2)
- - gRPC-Core/Interface (1.28.2)
- - GTMSessionFetcher (1.4.0):
- - GTMSessionFetcher/Full (= 1.4.0)
- - GTMSessionFetcher/Core (1.4.0)
- - GTMSessionFetcher/Full (1.4.0):
- - GTMSessionFetcher/Core (= 1.4.0)
+ - GTMSessionFetcher (1.5.0):
+ - GTMSessionFetcher/Full (= 1.5.0)
+ - GTMSessionFetcher/Core (1.5.0)
+ - GTMSessionFetcher/Full (1.5.0):
+ - GTMSessionFetcher/Core (= 1.5.0)
- Jet (0.6.6-0):
- React
- leveldb-library (1.22)
- - nanopb (1.30906.0):
- - nanopb/decode (= 1.30906.0)
- - nanopb/encode (= 1.30906.0)
- - nanopb/decode (1.30906.0)
- - nanopb/encode (1.30906.0)
+ - nanopb (2.30906.0):
+ - nanopb/decode (= 2.30906.0)
+ - nanopb/encode (= 2.30906.0)
+ - nanopb/decode (2.30906.0)
+ - nanopb/encode (2.30906.0)
- PersonalizedAdConsent (1.0.5)
- PromisesObjC (1.2.11)
- Protobuf (3.13.0)
@@ -758,80 +455,69 @@ PODS:
- React-jsi (= 0.62.2)
- ReactCommon/callinvoker (= 0.62.2)
- RNFBAdMob (7.6.9):
- - Firebase/AdMob (= 6.34.0)
+ - Firebase/AdMob (= 7.0.0)
- PersonalizedAdConsent (~> 1.0.4)
- React-Core
- RNFBApp
- RNFBAnalytics (7.6.8):
- - Firebase/Analytics (= 6.34.0)
+ - Firebase/Analytics (= 7.0.0)
- React-Core
- RNFBApp
- RNFBApp (8.4.6):
- - Firebase/CoreOnly (= 6.34.0)
+ - Firebase/CoreOnly (= 7.0.0)
- React-Core
- RNFBAuth (9.3.1):
- - Firebase/Auth (= 6.34.0)
+ - Firebase/Auth (= 7.0.0)
- React-Core
- RNFBApp
- RNFBCrashlytics (8.4.11):
- - Firebase/Crashlytics (= 6.34.0)
+ - Firebase/Crashlytics (= 7.0.0)
- React-Core
- RNFBApp
- RNFBDatabase (7.5.12):
- - Firebase/Database (= 6.34.0)
+ - Firebase/Database (= 7.0.0)
- React-Core
- RNFBApp
- RNFBDynamicLinks (7.5.10):
- - Firebase/DynamicLinks (= 6.34.0)
+ - Firebase/DynamicLinks (= 7.0.0)
- GoogleUtilities/AppDelegateSwizzler
- React-Core
- RNFBApp
- RNFBFirestore (7.8.7):
- - Firebase/Firestore (= 6.34.0)
+ - Firebase/Firestore (= 7.0.0)
- React-Core
- RNFBApp
- RNFBFunctions (7.4.9):
- - Firebase/Functions (= 6.34.0)
+ - Firebase/Functions (= 7.0.0)
- React-Core
- RNFBApp
- RNFBIid (7.4.9):
- - Firebase/CoreOnly (= 6.34.0)
+ - Firebase/CoreOnly (= 7.0.0)
- FirebaseInstanceID
- React-Core
- RNFBApp
- RNFBInAppMessaging (7.5.7):
- - Firebase/InAppMessaging (= 6.34.0)
+ - Firebase/InAppMessaging (= 7.0.0)
- React-Core
- RNFBApp
- RNFBMessaging (7.9.1):
- - Firebase/Messaging (= 6.34.0)
+ - Firebase/Messaging (= 7.0.0)
- React-Core
- RNFBApp
- - RNFBMLNaturalLanguage (7.4.9):
- - Firebase/MLCommon (= 6.34.0)
- - Firebase/MLNaturalLanguage (= 6.34.0)
- - Firebase/MLNLLanguageID (= 6.34.0)
- - Firebase/MLNLSmartReply (= 6.34.0)
- - React-Core
- - RNFBApp
- - RNFBMLVision (7.4.11):
- - Firebase/MLVision (= 6.34.0)
- - Firebase/MLVisionBarcodeModel (= 6.34.0)
- - Firebase/MLVisionFaceModel (= 6.34.0)
- - Firebase/MLVisionLabelModel (= 6.34.0)
- - Firebase/MLVisionTextModel (= 6.34.0)
+ - RNFBML (7.4.11):
+ - Firebase/MLVision (= 7.0.0)
- React-Core
- RNFBApp
- RNFBPerf (7.4.9):
- - Firebase/Performance (= 6.34.0)
+ - Firebase/Performance (= 7.0.0)
- React-Core
- RNFBApp
- RNFBRemoteConfig (9.0.11):
- - Firebase/RemoteConfig (= 6.34.0)
+ - Firebase/RemoteConfig (= 7.0.0)
- React-Core
- RNFBApp
- RNFBStorage (7.4.10):
- - Firebase/Storage (= 6.34.0)
+ - Firebase/Storage (= 7.0.0)
- React-Core
- RNFBApp
- Yoga (1.14.0)
@@ -840,6 +526,7 @@ DEPENDENCIES:
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
+ - FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, branch `master`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- Jet (from `../node_modules/jet/ios`)
@@ -877,8 +564,7 @@ DEPENDENCIES:
- RNFBIid (from `../../packages/iid`)
- RNFBInAppMessaging (from `../../packages/in-app-messaging`)
- RNFBMessaging (from `../../packages/messaging`)
- - RNFBMLNaturalLanguage (from `../../packages/ml-natural-language`)
- - RNFBMLVision (from `../../packages/ml-vision`)
+ - RNFBML (from `../../packages/ml`)
- RNFBPerf (from `../../packages/perf`)
- RNFBRemoteConfig (from `../../packages/remote-config`)
- RNFBStorage (from `../../packages/storage`)
@@ -886,9 +572,7 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- - abseil
- boost-for-react-native
- - BoringSSL-GRPC
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
@@ -898,21 +582,13 @@ SPEC REPOS:
- FirebaseCrashlytics
- FirebaseDatabase
- FirebaseDynamicLinks
- - FirebaseFirestore
- FirebaseFunctions
- FirebaseInAppMessaging
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- FirebaseMLCommon
- - FirebaseMLNaturalLanguage
- - FirebaseMLNLLanguageID
- - FirebaseMLNLSmartReply
- FirebaseMLVision
- - FirebaseMLVisionBarcodeModel
- - FirebaseMLVisionFaceModel
- - FirebaseMLVisionLabelModel
- - FirebaseMLVisionTextModel
- FirebasePerformance
- FirebaseRemoteConfig
- FirebaseStorage
@@ -923,8 +599,6 @@ SPEC REPOS:
- GoogleToolboxForMac
- GoogleUserMessagingPlatform
- GoogleUtilities
- - "gRPC-C++"
- - gRPC-Core
- GTMSessionFetcher
- leveldb-library
- nanopb
@@ -939,6 +613,9 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
:path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
+ FirebaseFirestore:
+ :branch: master
+ :git: https://github.com/invertase/firestore-ios-sdk-frameworks.git
Folly:
:podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
glog:
@@ -1007,10 +684,8 @@ EXTERNAL SOURCES:
:path: "../../packages/in-app-messaging"
RNFBMessaging:
:path: "../../packages/messaging"
- RNFBMLNaturalLanguage:
- :path: "../../packages/ml-natural-language"
- RNFBMLVision:
- :path: "../../packages/ml-vision"
+ RNFBML:
+ :path: "../../packages/ml"
RNFBPerf:
:path: "../../packages/perf"
RNFBRemoteConfig:
@@ -1020,55 +695,49 @@ EXTERNAL SOURCES:
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"
+CHECKOUT OPTIONS:
+ FirebaseFirestore:
+ :commit: 3d712e901b44cb4ca509844356040a2cb61ddf5a
+ :git: https://github.com/invertase/firestore-ios-sdk-frameworks.git
+
SPEC CHECKSUMS:
- abseil: 6c8eb7892aefa08d929b39f9bb108e5367e3228f
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
- BoringSSL-GRPC: 8edf627ee524575e2f8d19d56f068b448eea3879
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
- Firebase: c23a36d9e4cdf7877dfcba8dd0c58add66358999
- FirebaseABTesting: 8a9d8df3acc2b43f4a22014ddf9f601bca6af699
- FirebaseAnalytics: 3bb096873ee0d7fa4b6c70f5e9166b6da413cc7f
- FirebaseAuth: c92d49ada7948d1a23466e3db17bc4c2039dddc3
- FirebaseCore: d3a978a3cfa3240bf7e4ba7d137fdf5b22b628ec
- FirebaseCoreDiagnostics: 770ac5958e1372ce67959ae4b4f31d8e127c3ac1
- FirebaseCrashlytics: 1a747c9cc084a24dc6d9511c991db1cd078154eb
- FirebaseDatabase: 13a865a4b85897462b930eb683bda8f52583713f
- FirebaseDynamicLinks: 6eac37d86910382eafb6315d952cc44c9e176094
- FirebaseFirestore: 9b2f1b9b9a6f2f0b6fb7484b9e32ab7e39243554
- FirebaseFunctions: 27518fdd14d8b3a849e2443f921cd1b471ab7acd
- FirebaseInAppMessaging: 9da48721c6ad1b5bdc2b1108f2d3d561eb2245ca
- FirebaseInstallations: 466c7b4d1f58fe16707693091da253726a731ed2
- FirebaseInstanceID: bd3ffc24367f901a43c063b36c640b345a4a5dd1
- FirebaseMessaging: 5eca4ef173de76253352511aafef774caa1cba2a
- FirebaseMLCommon: d218d75dd1c6c4e447f731ac22da56b88cb79431
- FirebaseMLNaturalLanguage: 32cccde63dfdf82341d570b3d4b24e746303d4cd
- FirebaseMLNLLanguageID: 1adfdf439843d836e8d741c5124b97ebac645334
- FirebaseMLNLSmartReply: 046bdc30bddbfbead3f5cbca97f28a26a316d346
- FirebaseMLVision: 68dd092b4c52a7ac163ec0d4f541d5711fc9fec6
- FirebaseMLVisionBarcodeModel: 394cd61c52dc03558088caf82b0dade8028f57d5
- FirebaseMLVisionFaceModel: a67b2bf9b8407127a0bdb0ba98eb265637d1dc9d
- FirebaseMLVisionLabelModel: c6922e607cf4549b14981c80bf0d69eb51a2b547
- FirebaseMLVisionTextModel: e9f3cba0f31022ae9dd3d246aff9849075cacd98
- FirebasePerformance: e325a8ee84a6a3d89c0be049390ed6c1775cce22
- FirebaseRemoteConfig: 35a729305f254fb15a2e541d4b36f3a379da7fdc
- FirebaseStorage: 15e0f15ef3c7fec3d1899d68623e47d4447066b4
+ Firebase: 50be68416f50eb4eb2ecb0e78acab9a051ef95df
+ FirebaseABTesting: b78ae653b7658b8f1c076eaa21029c936d58f758
+ FirebaseAnalytics: c1166b7990bae464c6436132510bb718c6680f80
+ FirebaseAuth: 228dd0faa5b5263eaa8c63518b16faef438289a3
+ FirebaseCore: cf3122185fce1cf71cedbbc498ea84d2b3e7cb69
+ FirebaseCoreDiagnostics: 5f4aa04fdb04923693cc704c7ef9158bdf41a48b
+ FirebaseCrashlytics: bd430b7323e8b49492a93e563e81899d0615f917
+ FirebaseDatabase: 2481b48ebfd233ef591095d79d76720ea85cde74
+ FirebaseDynamicLinks: 71ed03780db3986e1bd386d6a1be44d09d4cd0ec
+ FirebaseFirestore: ce5009ceae3e07c96f9cc580d9b521b9ec0af857
+ FirebaseFunctions: 571aee227a021debe3e1092aa079f751623e233a
+ FirebaseInAppMessaging: b4c1ec3ea31d83f762d8087e78ce846159437f39
+ FirebaseInstallations: c28d4bcbb5c6884d1a39afbc0bd7fc590e31e9b7
+ FirebaseInstanceID: c03b49743725092f7eb9d4b96ff40efadd830426
+ FirebaseMessaging: ecf9e04716b7ff1f1d92debab4d6f0e6bdb490aa
+ FirebaseMLCommon: dfe267d4cd9123a66f80688bdc6a69ff3b07f101
+ FirebaseMLVision: 39cfe86b963ce9db9216da6630529d3089254b9a
+ FirebasePerformance: 4341f46dd638e6293aeaeee31d85e30ac34f63f7
+ FirebaseRemoteConfig: ff8d3542cbd919c9d3851fd544690b8848fc0402
+ FirebaseStorage: ea52bc7a1cb540406ed1e1acfc2bf3946621ed34
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
- Google-Mobile-Ads-SDK: 7d7074359c040f5add4e0963bf860e14690060d0
- GoogleAPIClientForREST: e2d95a611ac06a90d143c93bfd8597719f8b0938
- GoogleAppMeasurement: a6a3a066369828db64eda428cb2856dc1cdc7c4e
- GoogleDataTransport: f56af7caa4ed338dc8e138a5d7c5973e66440833
- GoogleToolboxForMac: 800648f8b3127618c1b59c7f97684427630c5ea3
- GoogleUserMessagingPlatform: c85530d930ba509583aa5a6d50a10aca22cf8502
- GoogleUtilities: 7f2f5a07f888cdb145101d6042bc4422f57e70b3
- "gRPC-C++": 13d8ccef97d5c3c441b7e3c529ef28ebee86fad2
- gRPC-Core: 4afa11bfbedf7cdecd04de535a9e046893404ed5
- GTMSessionFetcher: 6f5c8abbab8a9bce4bb3f057e317728ec6182b10
+ Google-Mobile-Ads-SDK: 4c11bba9a823ed16c42f14d42feebc7678fbfd6a
+ GoogleAPIClientForREST: 4bb409633efcc2e1b3f945afe7e35039b5a61db2
+ GoogleAppMeasurement: 7790ef975d1d463c8614cd949a847e612edf087a
+ GoogleDataTransport: 6ce8004a961db1b905740d7be106c61ba7e89c21
+ GoogleToolboxForMac: 1350d40e86a76f7863928d63bcb0b89c84c521c5
+ GoogleUserMessagingPlatform: 1d4b6946710d18cec34742054092e2c2bddae61f
+ GoogleUtilities: ffb2f4159f2c897c6e8992bd7fbcdef8a300589c
+ GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
Jet: 84fd0e2e9d49457fc04bc79b5d8857737a01c507
leveldb-library: 55d93ee664b4007aac644a782d11da33fba316f7
- nanopb: 59317e09cf1f1a0af72f12af412d54edf52603fc
+ nanopb: 1bf24dd71191072e120b83dd02d08f3da0d65e53
PersonalizedAdConsent: dbecabb3467df967c16d9cebc2ef4a8890e4bbd8
PromisesObjC: 8c196f5a328c2cba3e74624585467a557dcb482f
Protobuf: 3dac39b34a08151c6d949560efe3f86134a3f748
@@ -1091,25 +760,24 @@ SPEC CHECKSUMS:
React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
- RNFBAdMob: 809f648889201406d333bc28a84bbf3294491f00
- RNFBAnalytics: 159651d6eae3c85db38ba5d694d8c6c46fd3883c
- RNFBApp: e0fc0113eecc07f440f17639c9b7c59ea90bc583
- RNFBAuth: 16207757fa69ad50ec8ca04964f59cd560979294
- RNFBCrashlytics: c85d01c3fb3a4cc1e762facb9d4ad26b95f7f9dc
- RNFBDatabase: 6c01157824702f4fc1cedf9b4b95e9f3154cfbf1
- RNFBDynamicLinks: 067d7419d8daf58b61faa70834b051410d5f6d4b
- RNFBFirestore: 64986e129f4980e73b6e510684286d986367bef6
- RNFBFunctions: ae7a279090e902cdf4da7890d64f31a0e4e2a825
- RNFBIid: f40ac75229f8bb86cc6dd0c71b450e7df693f8f3
- RNFBInAppMessaging: dda5e571edd579042fa1d68a685012daa871a3f6
- RNFBMessaging: 1d2a6a249cf6b93bed1721befc42650c45615112
- RNFBMLNaturalLanguage: 3662457b2e95b857bb9289d250b0a10bc10aca84
- RNFBMLVision: c2547c24b59298ebe4b90a2025600d60a6929930
- RNFBPerf: 0c08e45726f7a19487b79cef3d12ee7e917c8b7a
- RNFBRemoteConfig: 85df9235f46c20e293257b6e481412ac585e2966
- RNFBStorage: 72404d4977261c0d7060e87c3d0cf7f7e060c6a3
+ RNFBAdMob: 53f3cc93993656aa1c8bbe9c5ae91e15007ddcdb
+ RNFBAnalytics: 2500adbec36b17690e259970dfcccb52a45f5ae5
+ RNFBApp: 01605341da53e4a46489993243809c5707f14eb7
+ RNFBAuth: 38c2c7262aaad335136db614a9f32de3060315e7
+ RNFBCrashlytics: b9ff2a09dfcae5dcc16d9802c3f61be2e98e919c
+ RNFBDatabase: 9ecad1f07733692da7f0310a8b0c1beac79e6988
+ RNFBDynamicLinks: 41f6d4bdb8b1b6dc2578a5a79a4e7b2f32c3cee0
+ RNFBFirestore: 7958a8e274f0480577529ebfb411bca193f56571
+ RNFBFunctions: 3ba81014e364d7c067dd015b2796d10ab883be18
+ RNFBIid: 806263a8c22dfa8d240b26bc9d8e29901b65a368
+ RNFBInAppMessaging: db88a00efc50fd7fcdfe68084a2741a0181314e1
+ RNFBMessaging: d9ce781f0c0f901ae476d32b0a4494399dbedae6
+ RNFBML: e2f0381f17fb8ef8cbbef75061108a810f1faeb1
+ RNFBPerf: 9bb45292be657b2f904fe31c6231581ee29bf1cb
+ RNFBRemoteConfig: 75604c5f1ddeb1ba2f15beef290d2a8e0d410226
+ RNFBStorage: a40a539b830bd358529ad5922f46410b75532e02
Yoga: 3ebccbdd559724312790e7742142d062476b698e
-PODFILE CHECKSUM: 2b670e97319c5057f900292e8500c4c38d83aa3c
+PODFILE CHECKSUM: 294dcfd44a52cedf2b1937864defb699bdbb1ea0
COCOAPODS: 1.10.0
diff --git a/tests/ios/testing/AppDelegate.m b/tests/ios/testing/AppDelegate.m
index 3d8e5287926..102bef00fcd 100644
--- a/tests/ios/testing/AppDelegate.m
+++ b/tests/ios/testing/AppDelegate.m
@@ -73,10 +73,4 @@ - (void)aTest {
NSLog(@"TESTING3");
}
-- (void)messaging:(nonnull FIRMessaging *)messaging didReceiveMessage:(nonnull FIRMessagingRemoteMessage *)remoteMessage {
- NSLog(@"TESTING1");
- [self aTest];
- NSLog(@"TESTING2");
-}
-
@end
diff --git a/tests/package.json b/tests/package.json
index 39e0b11c65b..70afb8d4d75 100644
--- a/tests/package.json
+++ b/tests/package.json
@@ -20,8 +20,7 @@
"@react-native-firebase/iid": "7.4.10",
"@react-native-firebase/in-app-messaging": "7.5.8",
"@react-native-firebase/messaging": "7.9.2",
- "@react-native-firebase/ml-natural-language": "7.4.10",
- "@react-native-firebase/ml-vision": "7.4.12",
+ "@react-native-firebase/ml": "7.4.12",
"@react-native-firebase/perf": "7.4.10",
"@react-native-firebase/remote-config": "9.0.12",
"@react-native-firebase/storage": "7.4.11",