Skip to content

Commit

Permalink
fix: openfoodfacts#1155 - MissingPluginException (iOS scanner issue)
Browse files Browse the repository at this point in the history
  • Loading branch information
cli1005 committed Mar 14, 2022
1 parent 1dc1454 commit 17e63a4
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/smooth_app/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!

pod 'Firebase'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

Expand Down
2 changes: 2 additions & 0 deletions packages/smooth_app/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import UIKit
import Flutter
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
Expand All @@ -8,6 +9,7 @@ import Flutter
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
FirebaseApp.configure()
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
34 changes: 34 additions & 0 deletions packages/smooth_app/ios/Runner/GoogleService-Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string></string>
<key>REVERSED_CLIENT_ID</key>
<string></string>
<key>API_KEY</key>
<string>AIzaSyBYlsu89FOJyTKWzhzqG-CWigLaVmdoB9I</string>
<key>GCM_SENDER_ID</key>
<string></string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string></string>
<key>PROJECT_ID</key>
<string>ml-kit-conf-df197</string>
<key>STORAGE_BUCKET</key>
<string></string>
<key>IS_ADS_ENABLED</key>
<false/>
<key>IS_ANALYTICS_ENABLED</key>
<false/>
<key>IS_APPINVITE_ENABLED</key>
<true/>
<key>IS_GCM_ENABLED</key>
<true/>
<key>IS_SIGNIN_ENABLED</key>
<true/>
<key>GOOGLE_APP_ID</key>
<string>1:165405485936:ios:c12803a5ab116bdab9bdb5</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:typed_data';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:google_ml_barcode_scanner/google_ml_barcode_scanner.dart';
import 'package:google_ml_kit/google_ml_kit.dart';

/// Abstract getter of Camera Image, for barcode scan.
///
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'dart:typed_data';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:google_ml_barcode_scanner/google_ml_barcode_scanner.dart';
import 'package:google_ml_kit/google_ml_kit.dart';
import 'package:smooth_app/pages/scan/abstract_camera_image_getter.dart';
import 'package:typed_data/typed_buffers.dart';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'dart:typed_data';
import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:google_ml_barcode_scanner/google_ml_barcode_scanner.dart';
import 'package:google_ml_kit/google_ml_kit.dart';
import 'package:smooth_app/pages/scan/abstract_camera_image_getter.dart';

/// Camera Image helper where we get the full image.
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/pages/scan/ml_kit_scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:camera/camera.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:google_ml_barcode_scanner/google_ml_barcode_scanner.dart';
import 'package:google_ml_kit/google_ml_kit.dart';
import 'package:provider/provider.dart';
import 'package:smooth_app/data_models/continuous_scan_model.dart';
import 'package:smooth_app/data_models/user_preferences.dart';
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ dependencies:
sentry_flutter: ^6.3.0
url_launcher: ^6.0.20
visibility_detector: ^0.2.2
google_ml_barcode_scanner: ^0.0.2
camera: ^0.9.4+16
percent_indicator: ^4.0.0
crop_your_image: ^0.7.0
mailto: ^2.0.0
flutter_native_splash: ^2.1.0
google_ml_kit: ^0.7.3



Expand Down

0 comments on commit 17e63a4

Please sign in to comment.