From 46646670694233e59d2c4047f464fd7080568934 Mon Sep 17 00:00:00 2001 From: Miller Adulu <milleradulu@gmail.com> Date: Wed, 28 Aug 2024 13:48:35 +0300 Subject: [PATCH] Play store signing fixes (#120) * Fix bug where the login fails when the google avatar takes a while to resolve from the backend * Update version * Update version * Update Firebase signing * Update iOS build stuff * Add logs * Format manifest file * Update Kotlin version to 2.0.20 * Add logs * Update Firebase configuration * Remove unnecessary logs * Update Workflow --- .github/workflows/release-apk.yml | 60 +++++ .github/workflows/release.yml | 2 +- android/app/google-services.json | 254 ++----------------- android/app/src/main/AndroidManifest.xml | 21 +- android/settings.gradle | 4 +- firebase.json | 2 +- ios/Runner.xcodeproj/project.pbxproj | 26 +- lib/common/repository/auth_repository.dart | 10 +- lib/features/home/widgets/sessions_card.dart | 4 +- lib/firebase_options.dart | 18 +- 10 files changed, 128 insertions(+), 273 deletions(-) create mode 100644 .github/workflows/release-apk.yml diff --git a/.github/workflows/release-apk.yml b/.github/workflows/release-apk.yml new file mode 100644 index 0000000..486800b --- /dev/null +++ b/.github/workflows/release-apk.yml @@ -0,0 +1,60 @@ +name: Generate Production APK + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'adopt' + + - name: 📚 Git Checkout + uses: actions/checkout@v4 + + - name: 🐦 Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: "3" + + - name: 📦 Install Dependencies + run: flutter packages get + + - name: ✨ Check Formatting + run: dart format --set-exit-if-changed lib test + + - name: ⚙️ Code Generation + run: dart run build_runner build --delete-conflicting-outputs + + - name: 🕵️ Analyze + run: flutter analyze lib + + - name: ⚙️ Download Android keystore + id: android_keystore + uses: timheuer/base64-to-file@v1.2 + with: + fileName: key.jks + encodedString: ${{ secrets.PROD_KEYSTORE }} + + - name: 🔐 Create key.properties + run: | + echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties + echo "storePassword=${{ secrets.PROD_KEYSTORE_PASSPHRASE }}" >> android/key.properties + echo "keyPassword=${{ secrets.PROD_KEYSTORE_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.PROD_KEYSTORE_ALIAS }}" >> android/key.properties + + - name: ⚙️ Build APK + run: flutter build apk --flavor production --target lib/main_production.dart -v + + - name: 📦 Upload APK + uses: actions/upload-artifact@v4 + with: + name: production-apk + path: build/app/outputs/apk/production/release/app-production-release.apk diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df458fb..6ad37d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,5 +56,5 @@ jobs: - name: 📦 Upload AAB uses: actions/upload-artifact@v4 with: - name: my-artifact + name: production-aab path: build/app/outputs/bundle/productionRelease/app-production-release.aab diff --git a/android/app/google-services.json b/android/app/google-services.json index a88ffc1..23a6f66 100644 --- a/android/app/google-services.json +++ b/android/app/google-services.json @@ -14,14 +14,6 @@ } }, "oauth_client": [ - { - "client_id": "602867001820-0dga116uq442j03mkhpds23dlfal08mq.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.android254.droidconke19", - "certificate_hash": "48564dfb25dd833fa7682261b553f4ef98632a12" - } - }, { "client_id": "602867001820-3ppnvvbjnsu67mjkqeubhk5ojvqjqh7l.apps.googleusercontent.com", "client_type": 1, @@ -38,66 +30,6 @@ "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4" } }, - { - "client_id": "602867001820-57bqj57thdqa5k6dtilg8g0ootp5kle9.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.android254.droidconke19", - "certificate_hash": "2168193d61fac8a7495a89e75cc377d7be36df63" - } - }, - { - "client_id": "602867001820-i6va2ati77q5bni85vaj3060uth069be.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.android254.droidconke19", - "certificate_hash": "448932ad350fc8ba45e58a2924cd729eb6115ce5" - } - }, - { - "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBY00roSeNZOq5AaLnHWYkSN-FnxtkUrrc" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:602867001820:android:6829d95afa7393c0710719", - "android_client_info": { - "package_name": "com.flutterKenya.droidconkeflutterflowversion" - } - }, - "oauth_client": [ - { - "client_id": "602867001820-tbm3pulpa3ak4ds6jn9ahcntm641ik2i.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "com.flutterKenya.droidconkeflutterflowversion", - "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4" - } - }, { "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", "client_type": 3 @@ -116,10 +48,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -128,7 +60,7 @@ }, { "client_info": { - "mobilesdk_app_id": "1:602867001820:android:689e781aad67bd0b710719", + "mobilesdk_app_id": "1:602867001820:android:701a8a8c597d0465710719", "android_client_info": { "package_name": "dev.flutterconke.fluttercon" } @@ -160,10 +92,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -204,10 +136,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -248,10 +180,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -274,54 +206,6 @@ "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4" } }, - { - "client_id": "602867001820-0ldec5kr5sm4obb5ms86cqunv8f11cjm.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "48564dfb25dd833fa7682261b553f4ef98632a12" - } - }, - { - "client_id": "602867001820-56e6ipga0kndht93dvtb7h40t84skqtc.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "20ef2db1fc7dcaf0c45282ec1b17f0baf188a284" - } - }, - { - "client_id": "602867001820-5htnv3q91q8vs6n7n35sjivq3f67t9sf.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "03c45d81eb2e7547366026adcfb9e9839581d540" - } - }, - { - "client_id": "602867001820-7re3dbphsmbq49nt224ti2sl55s8ipgu.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "448932ad350fc8ba45e58a2924cd729eb6115ce5" - } - }, - { - "client_id": "602867001820-fhed3i14rvgtloqjcs8jj78t8c8ca8ni.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "48c2814ce6b5cddfe9aaea218eed01f76a5d5730" - } - }, - { - "client_id": "602867001820-l17co3qt9gd1orhipkv62vuou0e6ok31.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "c4769f44ba891ff601da36cf04ed9a1e6f717b46" - } - }, { "client_id": "602867001820-s4dt0p43dsdh24fjlinf620iav46tm67.apps.googleusercontent.com", "client_type": 1, @@ -330,22 +214,6 @@ "certificate_hash": "5ceff73ff6628a1d6208a06ebbcc5f2b5b9aaf4a" } }, - { - "client_id": "602867001820-tdvt232fmv5orok928o5s2cstmo7rhj0.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "0e09462ca164adc7f28362a8d2f6d4a0179cc96c" - } - }, - { - "client_id": "602867001820-utto7oau2or695torg6j0p9ilgcltgt5.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "droiddevelopers254.droidconke", - "certificate_hash": "64505a0c2539b12d06bd366f4f3a1ff5fe19e5f6" - } - }, { "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", "client_type": 3 @@ -364,86 +232,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" - } - } - ] - } - } - }, - { - "client_info": { - "mobilesdk_app_id": "1:602867001820:android:7b0c30a891bd264b", - "android_client_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter" - } - }, - "oauth_client": [ - { - "client_id": "602867001820-4biofscoc3frep9cki32k17lv7q4imut.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter", - "certificate_hash": "ad5aebeeae61af5065ee70fecbb7c9c1b91aad56" - } - }, - { - "client_id": "602867001820-akpd8a8um1d1vuuqee45gtb2524aboq8.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter", - "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4" - } - }, - { - "client_id": "602867001820-b1o1bpnjitcgb36ai46rpkcdu44r8abv.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter", - "certificate_hash": "03c45d81eb2e7547366026adcfb9e9839581d540" - } - }, - { - "client_id": "602867001820-fn3hou3ka64vumj1ld4gdfd4f9975p6o.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter", - "certificate_hash": "cf46726964688a00c0bb7ef65c4b3d397059ed12" - } - }, - { - "client_id": "602867001820-tuaf2qso1a42o0i8tn2i7v0cfrff33s0.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.co.droidcon.droidcon_ke_flutter", - "certificate_hash": "90c89d7c9787410a39b64439a1cb63aaed29c7f9" - } - }, - { - "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", - "client_type": 3 - } - ], - "api_key": [ - { - "current_key": "AIzaSyBY00roSeNZOq5AaLnHWYkSN-FnxtkUrrc" - } - ], - "services": { - "appinvite_service": { - "other_platform_oauth_client": [ - { - "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", - "client_type": 3 - }, - { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", - "client_type": 2, - "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -458,22 +250,6 @@ } }, "oauth_client": [ - { - "client_id": "602867001820-0audi5l027tmqm6oih5bmrt015ed3iel.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.droidcon.kotlin", - "certificate_hash": "acd0131596f03d42d3073d99fa097e84b330bece" - } - }, - { - "client_id": "602867001820-6srr70beig4vp69ujn1r70gdtugajus6.apps.googleusercontent.com", - "client_type": 1, - "android_info": { - "package_name": "ke.droidcon.kotlin", - "certificate_hash": "9bbb3186b2189ef16d8f272bdab59362c395cbb4" - } - }, { "client_id": "602867001820-hcujt6b2lach0r72khh4it6ugmhjoohl.apps.googleusercontent.com", "client_type": 3 @@ -492,10 +268,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] @@ -544,10 +320,10 @@ "client_type": 3 }, { - "client_id": "602867001820-34dovhe457imsa2dg1acnmfuf233rijq.apps.googleusercontent.com", + "client_id": "602867001820-09mdu45gs9br0r6kbkct47h2j22thdvj.apps.googleusercontent.com", "client_type": 2, "ios_info": { - "bundle_id": "com.flutterKenya.droidconkeflutterflowversion" + "bundle_id": "dev.dev-org-flutterconke.fluttercon" } } ] diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 79ee542..cb3bfda 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -10,23 +10,28 @@ </queries> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" /> - <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/> + <uses-permission + android:name="android.permission.WRITE_EXTERNAL_STORAGE" + android:maxSdkVersion="29" /> + <uses-permission + android:name="com.google.android.gms.permission.AD_ID" + tools:node="remove" /> <uses-permission android:name="android.permission.INTERNET" /> - <uses-permission android:name="android.permission.VIBRATE"/> - <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> + <uses-permission android:name="android.permission.VIBRATE" /> + <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> + <application - android:label="${appName}" android:name="${applicationName}" - android:icon="@mipmap/launcher_icon"> + android:icon="@mipmap/launcher_icon" + android:label="${appName}"> <activity android:name=".MainActivity" + android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:exported="true" + android:hardwareAccelerated="true" android:launchMode="singleTask" android:theme="@style/LaunchTheme" - android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" - android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"> <meta-data android:name="io.flutter.embedding.android.NormalTheme" diff --git a/android/settings.gradle b/android/settings.gradle index 45466d4..69bbb38 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -21,10 +21,10 @@ 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 + id "org.jetbrains.kotlin.android" version "2.0.20" apply false } include ":app" diff --git a/firebase.json b/firebase.json index 982a40e..11ad276 100644 --- a/firebase.json +++ b/firebase.json @@ -1 +1 @@ -{"flutter":{"platforms":{"android":{"default":{"projectId":"droidconke-70d60","appId":"1:602867001820:android:689e781aad67bd0b710719","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"droidconke-70d60","appId":"1:602867001820:ios:ae6578a57dca9221710719","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"droidconke-70d60","configurations":{"android":"1:602867001820:android:689e781aad67bd0b710719","ios":"1:602867001820:ios:ae6578a57dca9221710719"}}}}}} \ No newline at end of file +{"flutter":{"platforms":{"android":{"default":{"projectId":"droidconke-70d60","appId":"1:602867001820:android:701a8a8c597d0465710719","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"droidconke-70d60","appId":"1:602867001820:ios:ae6578a57dca9221710719","uploadDebugSymbols":true,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"droidconke-70d60","configurations":{"android":"1:602867001820:android:701a8a8c597d0465710719","ios":"1:602867001820:ios:ae6578a57dca9221710719","web":"1:602867001820:web:07bc3b91b0c4728b710719"}}}}}} \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 5fc9e63..c666a4f 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -226,7 +226,7 @@ 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 14E3FE9DEF97E062EC966A08 /* [CP] Embed Pods Frameworks */, E33879E44333D33EE3240A50 /* [CP] Copy Pods Resources */, - 42D402963F2116B462A1E74C /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, + 33DBA832CE3D08AEC9F490C5 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */, ); buildRules = ( ); @@ -338,39 +338,39 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + 33DBA832CE3D08AEC9F490C5 /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); + inputFileListPaths = ( + ); inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); - name = "Thin Binary"; + name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; + outputFileListPaths = ( + ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + 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"; }; - 42D402963F2116B462A1E74C /* FlutterFire: "flutterfire upload-crashlytics-symbols" */ = { + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); - name = "FlutterFire: \"flutterfire upload-crashlytics-symbols\""; - outputFileListPaths = ( - ); + name = "Thin Binary"; 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"; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; 918393D15F920ACF475A28B1 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; diff --git a/lib/common/repository/auth_repository.dart b/lib/common/repository/auth_repository.dart index d8c2b38..9c90b58 100644 --- a/lib/common/repository/auth_repository.dart +++ b/lib/common/repository/auth_repository.dart @@ -21,6 +21,7 @@ class AuthRepository { Future<String> signInWithGoogle() async { try { final googleSignInAccount = await _googleSignIn.signIn(); + final googleSignInAuthentication = await googleSignInAccount?.authentication; @@ -35,11 +36,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) { + } catch (error, stackTrace) { + Logger().f(stackTrace); + Logger().e(error); rethrow; } } @@ -63,8 +69,8 @@ class AuthRepository { Future<void> logOut() async { try { - await _networkUtil.postReq('/logout'); await _googleSignIn.signOut(); + await _networkUtil.postReq('/logout'); } catch (e) { rethrow; } diff --git a/lib/features/home/widgets/sessions_card.dart b/lib/features/home/widgets/sessions_card.dart index 3c5d952..5ac6c77 100644 --- a/lib/features/home/widgets/sessions_card.dart +++ b/lib/features/home/widgets/sessions_card.dart @@ -102,7 +102,7 @@ class _SessionsCardState extends State<SessionsCard> { ), const SizedBox(height: 16), SizedBox( - height: size.height * .3, + height: size.height * .33, child: BlocBuilder<FetchSessionsCubit, FetchSessionsState>( builder: (context, state) => state.maybeWhen( loaded: (sessions, _) => ListView.builder( @@ -153,7 +153,7 @@ class _SessionsCardState extends State<SessionsCard> { const SizedBox(height: 16), Padding( padding: const EdgeInsets.symmetric(horizontal: 16), - child: AutoSizeText( + child: Text( session.title, maxLines: 2, style: TextStyle( diff --git a/lib/firebase_options.dart b/lib/firebase_options.dart index fb001bf..4d99b24 100644 --- a/lib/firebase_options.dart +++ b/lib/firebase_options.dart @@ -16,10 +16,7 @@ import 'package:flutter/foundation.dart' class DefaultFirebaseOptions { static FirebaseOptions get currentPlatform { if (kIsWeb) { - throw UnsupportedError( - 'DefaultFirebaseOptions have not been configured for web - ' - 'you can reconfigure this by running the FlutterFire CLI again.', - ); + return web; } switch (defaultTargetPlatform) { case TargetPlatform.android: @@ -51,7 +48,7 @@ class DefaultFirebaseOptions { static const FirebaseOptions android = FirebaseOptions( apiKey: 'AIzaSyBY00roSeNZOq5AaLnHWYkSN-FnxtkUrrc', - appId: '1:602867001820:android:689e781aad67bd0b710719', + appId: '1:602867001820:android:701a8a8c597d0465710719', messagingSenderId: '602867001820', projectId: 'droidconke-70d60', databaseURL: 'https://droidconke-70d60.firebaseio.com', @@ -71,4 +68,15 @@ class DefaultFirebaseOptions { '.apps.googleusercontent.com', iosBundleId: 'dev.flutterconke.fluttercon', ); + + static const FirebaseOptions web = FirebaseOptions( + apiKey: 'AIzaSyDxZ_1QpImc-FiQbP3i7N93pNr5jFQSYjk', + appId: '1:602867001820:web:07bc3b91b0c4728b710719', + messagingSenderId: '602867001820', + projectId: 'droidconke-70d60', + authDomain: 'droidconke-70d60.firebaseapp.com', + databaseURL: 'https://droidconke-70d60.firebaseio.com', + storageBucket: 'droidconke-70d60.appspot.com', + measurementId: 'G-V7B7TFD1ZY', + ); }