Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 2c827a5

Browse files
TODO's handled
1 parent 1f09c82 commit 2c827a5

File tree

6 files changed

+5
-6
lines changed

6 files changed

+5
-6
lines changed

src/firebase.ios.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ firebase.admob.showInterstitial = arg => {
875875
// with interstitials you MUST wait for the ad to load before showing it, so requiring this delegate
876876
let delegate = GADInterstitialDelegateImpl.new().initWithCallback((ad: GADInterstitial, error: GADRequestError) => {
877877
if (error) {
878-
reject(error); // TODO this is a platform-specific type
878+
reject(error.localizedDescription);
879879
} else {
880880
// now we can safely show it
881881
firebase.admob.interstitialView.presentFromRootViewController(utils.ios.getter(UIApplication, UIApplication.sharedApplication).keyWindow.rootViewController);
@@ -1267,6 +1267,7 @@ firebase.login = arg => {
12671267
return;
12681268
}
12691269

1270+
12701271
// TODO does this still work (there's a delegate now which we're not implementing)?
12711272
FIRPhoneAuthProvider.provider().verifyPhoneNumberUIDelegateCompletion(arg.phoneOptions.phoneNumber, null, (verificationID: string, error: NSError) => {
12721273
if (error) {
@@ -2686,6 +2687,7 @@ class FIRMessagingDelegateImpl extends NSObject implements FIRMessagingDelegate
26862687
return this;
26872688
}
26882689

2690+
26892691
// TODO test that receiving push notifications in the foreground still works
26902692
public messagingDidReceiveMessage(messaging: FIRMessaging, remoteMessage: FIRMessagingRemoteMessage): void {
26912693
console.log(">> fcm message received");

src/mlkit/barcodescanning/index.ios.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export function scanBarcodesOnDevice(options: MLKitScanBarcodesOnDeviceOptions):
9090
});
9191
}
9292

93-
// TODO move
9493
function getImage(options: MLKitOptions): FIRVisionImage {
9594
const image: UIImage = options.image instanceof ImageSource ? options.image.ios : options.image.imageSource.ios;
9695
return FIRVisionImage.alloc().initWithImage(image);

src/mlkit/facedetection/index.android.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ export function detectFacesOnDevice(options: MLKitDetectFacesOnDeviceOptions): P
101101
});
102102
}
103103

104-
// TODO move up
105104
function getImage(options: MLKitOptions): any /* com.google.firebase.ml.vision.common.FirebaseVisionImage */ {
106105
const image: android.graphics.Bitmap = options.image instanceof ImageSource ? options.image.android : options.image.imageSource.android;
107106
return com.google.firebase.ml.vision.common.FirebaseVisionImage.fromBitmap(image);

src/mlkit/facedetection/index.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class MLKitFaceDetection extends MLKitFaceDetectionBase {
4545
}
4646

4747
function getDetector(): FIRVisionFaceDetector {
48-
// TODO make configurable
48+
// TODO make configurable (see #704)
4949
const firVision: FIRVision = FIRVision.vision();
5050
const options = FIRVisionFaceDetectorOptions.new();
5151
options.modeType = FIRVisionFaceDetectorMode.Accurate;

src/mlkit/landmarkrecognition/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { MLKitCloudOptions, MLKitResult } from "../index";
22

33
export interface MLKitLandmarkRecognitionCloudResult extends MLKitResult {
4-
// TODO add locations
4+
// TODO add locations (see #704)
55
landmarks: Array<{
66
name: string;
77
confidence: number;

src/mlkit/textrecognition/index.ios.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ export function recognizeTextCloud(options: MLKitRecognizeTextCloudOptions): Pro
120120
});
121121
}
122122

123-
// TODO move to a common file
124123
function getImage(options: MLKitOptions): FIRVisionImage {
125124
const image: UIImage = options.image instanceof ImageSource ? options.image.ios : options.image.imageSource.ios;
126125
return FIRVisionImage.alloc().initWithImage(image);

0 commit comments

Comments
 (0)