Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerAdulu committed Aug 27, 2024
1 parent 08b715a commit 326b72a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
// START: FlutterFire Configuration
id "com.google.gms.google-services" version "4.3.15" apply false
id "com.google.gms.google-services" version "4.4.2" apply false
id "com.google.firebase.crashlytics" version "2.8.1" apply false
// END: FlutterFire Configuration
id "org.jetbrains.kotlin.android" version "2.0.10" apply false
Expand Down
38 changes: 19 additions & 19 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
14E3FE9DEF97E062EC966A08 /* [CP] Embed Pods Frameworks */,
E33879E44333D33EE3240A50 /* [CP] Copy Pods Resources */,
9095D3DE9DE0B68E60F8EFF4 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
EB31C9D284995D4ABA707977 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */,
);
buildRules = (
);
Expand Down Expand Up @@ -354,24 +354,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9095D3DE9DE0B68E60F8EFF4 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
918393D15F920ACF475A28B1 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -426,6 +408,24 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
EB31C9D284995D4ABA707977 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\"";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\n#!/bin/bash\nPATH=${PATH}:$FLUTTER_ROOT/bin:$HOME/.pub-cache/bin\nflutterfire upload-crashlytics-symbols --upload-symbols-script-path=$PODS_ROOT/FirebaseCrashlytics/upload-symbols --platform=ios --apple-project-path=${SRCROOT} --env-platform-name=${PLATFORM_NAME} --env-configuration=${CONFIGURATION} --env-project-dir=${PROJECT_DIR} --env-built-products-dir=${BUILT_PRODUCTS_DIR} --env-dwarf-dsym-folder-path=${DWARF_DSYM_FOLDER_PATH} --env-dwarf-dsym-file-name=${DWARF_DSYM_FILE_NAME} --env-infoplist-path=${INFOPLIST_PATH} --default-config=default\n";
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
11 changes: 11 additions & 0 deletions lib/common/repository/auth_repository.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import 'dart:io';

import 'package:firebase_auth/firebase_auth.dart';
import 'package:fluttercon/common/data/models/models.dart';
import 'package:fluttercon/common/utils/network.dart';
import 'package:fluttercon/firebase_options.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:injectable/injectable.dart';
import 'package:logger/logger.dart';
Expand All @@ -16,6 +19,9 @@ class AuthRepository {
'profile',
'email',
],
clientId: Platform.isAndroid
? DefaultFirebaseOptions.android.iosClientId
: DefaultFirebaseOptions.ios.iosClientId,
);

Future<String> signInWithGoogle() async {
Expand All @@ -35,11 +41,16 @@ class AuthRepository {

if (user != null) {
assert(!user.isAnonymous, 'User must not be anonymous');
if (user.isAnonymous) {
throw Failure(message: 'User must not be anonymous');
}
return Future.value(authResult.credential?.accessToken);
} else {
throw Failure(message: 'An unexpected error occured');
}
} catch (e) {
Logger().d(DefaultFirebaseOptions.ios.androidClientId);
Logger().e(e);
rethrow;
}
}
Expand Down

0 comments on commit 326b72a

Please sign in to comment.