Appcheck verification flutter firebase android - flutter

I saw documentation for flutter firebase Appcheck
what do I need to do in release mode with an original certificate?
because all it says is for website verification
await FirebaseAppCheck.instance.activate(webRecaptchaSiteKey: 'recaptcha-v3-site-key');
I am unable to understand what to add in code for making use of app check in flutter

I think that code is only for the web platform.
For android open your main project directory in the terminal and follow the steps below.
flutter> cd .\android\
flutter\android> .\gradlew signingReport
This will print all your keys. Find the applicable one that you want. Then, copy the SHA-256 into the correct place in the firebase console.

Related

Implementing google login flutter gives 12500 error

I implemented google login in flutter without using firebase in flutter (google cloud console). It was working in apk then later I needed push notification service for which I used firebase (fcm token and all) then I released the app to playstore but google login does not work. I keep getting apiexception error. Has anybody faced this issue? if yes any help would be highly appreciated.
I do not have a specific answer to your problem but I have also faced this problem once, I accidentally resolved it though.
But Error 12500 is a general error code that may occur when attempting to use the Google Sign-In feature and is caused by a few potensial issues:
An issue with the SHA-1 fingerprint of your app's signing
certificate: To use Google Sign-In, you need to configure your app's
SHA-1 fingerprint and package name in the Firebase console. Make
sure that the fingerprint and package name you have configured in
the Firebase console match the ones you are using to sign your app.
An issue with the Google Services configuration file: Make sure you
have properly added the Google Services configuration file to your
app.
An issue with the Google Play Services library: Make sure you have
the latest version of the Google Play Services library installed in
your app.
An issue with the device or emulator you are using: Make sure you
are testing on a device or emulator that has Google Play Services
installed and is up to date.
Possible fixes to try/check:
Double-check the SHA-1 fingerprint and package name: Make sure that
the SHA-1 fingerprint and package name you have configured in the
Firebase console match the ones you are using to sign your app.
Make sure you have added the Google Services configuration file: The
Google Services configuration file is required for your app to
communicate with Google services, including Google Sign-In. Make
sure you have properly added this file to your app.
Update the Google Play Services library: Make sure you have the
latest version of the Google Play Services library installed in your
app. You can check for updates by going to the "SDK Manager" in
Android Studio.
Test on a device or emulator with Google Play Services installed:
Make sure you are testing on a device or emulator that has Google
Play Services installed and is up to date.
I hope this helps! I will quickly search if I can find any other solution.

this app is not authorized to use firebase authentication. please verify that the correct package name and SHA-1 are configured in the firebase

this app is not authorized to use firebase authentication. please verify that the correct package name and SHA-1 are configured in the firebase console
i have try so much things to solve this but nothing went happen
check the same firebase project in google cloud and cross-verify SHA-1 keys in firebase to google cloud, if see any old SHA-1 keys delete them or if your SHA-1 key from Firebase is not in google cloud then add sha-1 from add credential option. if still same error then create a new firebase project and then try again.
First, get the SHA-1 and SHA-256 keys. Run the following commands in your project root terminal window (from vscode or Android studio) one by one
cd android
./gradlew signingReport
this will take few minutes then you'll be popped up with a screen similar to this.
Copy SHA-1 and SHA-256 keys and paste it in firebase project settings at
Scroll down to find your android app then click on Add fingerprint
Note: Make sure to add both the keys, else it may not work as desired.
Happy coding :)

Is there a way to upload flutter's obfuscation mappings to Firebase Crashlytics

My flutter app uses obfuscation for builds and creates symbols.
The crash stacktraces are appearing obfuscated in the Firebase Crashlytics console.
I know that we can use "flutter symbolize -i command" to deobfuscate a stacktrace, but is there a way to upload this symbols to Firebase Crashlytics console?
Based on this document, if your Flutter project uses the --split-debug-info flag (and, optionally, the --obfuscate flag), you need to use the Firebase CLI (v.11.9.0+) to upload Android symbols.
From the root directory of your Flutter project, run the following command:
firebase crashlytics:symbols:upload --app=APP_ID PATH/TO/symbols
The PATH/TO/symbols directory is the same directory that you pass to the --split-debug-info flag when building the application.
Also, you can find the app ID in the firebase_options.dart file.

Flutter app not working in apk-release but works in debug mode (even after giving internet permissions)

My app works fine in debug mode. I followed all the steps mentioned in flutter docs for making apk-release. I even mentioned the internet permissions for the apk-release in AndroidManifest file. My apk-release builds perfectly fine. But when i install it in my phone and try to use the app(Basically login using phone number cause the first page in my app is the login page), it doesnt respond. I figured there must be some problem with the internet permissions but I rechecked everything. It all works fine when i install the debug apk from Android Studio, but the release apk is somehow unable to communicate with the authentication servers. Please help me.
Btw, I updated all the dependencies in pubspec.yaml like cloudfirestore versions and stuff. Still no change. Also, I guess my SHA1 key is right in firestore. I also had to rename my package name from com.example.pareez to com.rishav.pareez but I am sure I made no mistake in that.
I ALSO USED THE SAME key.jks WHICH I USED TO MAKE AN APP YESTERDAY.
UPDATE - I uninstalled the previously installed apk from my phone and I used flutter install from my pc and then the app ran perfectly well. I guess installing manually is giving me problems. But i installed other apps manually too, and they worked fine.
Build your aab bundle or apk using the below commands.
For aab bundle:
flutter build appbundle --no-shrink
For apk:
flutter build apk --no-shrink
This solution worked for me. I hope, this will also help you. Thanks for asking this question.

Error while uploading Flutter App to App Store: Non-public API usage

I am new in Flutter Development and i have developed an app with Webview.
I have upload an apk on Google Play Store that is accepted but for App Store it shows some error.
Please find below error,
ITMS-90338: Non-public API usage - The app references non-public
symbols in Frameworks/Flutter.framework/Flutter: _ptrace. If method
names in your source code match the private Apple APIs listed above,
altering your method names will help prevent this app from being
flagged in future submissions. In addition, note that one or more of
the above APIs may be located in a static library that was included
with your app. If so, they must be removed.
For this error i have search many things but i am unable found any solution for this.
So please any one who is capable of solving this please help me to resolve this.
Thanks & Regards,
This happens if you are submitting the debug version to the AppStore, Flutter team recommends you to first run
flutter build ios --release
before archiving your app in Xcode.
First make sure you are submitting a release build with flutter build ios --release
If that's not the problem here you could find similar problems related:
flutter build ios --release may use a debug Flutter.framework by mistake
In my case, I updated my Mac to 10.15(Catalina), while the update my cocoapods installation wasn't there. So whenever I try to upload using the command flutter build ios --release and archiving it. Apple sent me the same email you received.
You can install cocoapods using the following commands.
step 1 Open terminal
step 2 command: sudo gem install cocoapods
step 3 set your project path on the terminal.
step 4 command: pod init
I hope it helps.