I downloaded the google map IOS sdk and then i crated the project from https://console.developers.google.com and then i created an API key.
Also i added the bundle identifier of the demo app in SDK.
But everytime i am running the app i am getting this error.
Google Maps SDK for iOS (M4B) cannot connect or validate APIKey: Error Domain=com.google.HTTPStatus Code=400 "The operation couldn’t be completed. (com.google.HTTPStatus error 400.)" UserInfo=0x15f04e00 {data={length = 145, capacity = 256, bytes = 0x3c48544d4c3e0a3c484541443e0a3c54 ... 3c2f48544d4c3e0a}}
Your key may be invalid for your bundle ID
I created the key multiple times and also checked the bundle identifier but they are correct.
So i am not able to figure out what exactly i am doing wrong.
Please let me know if any one can help regarding this.
Regards,
Arvinder
Make sure that you have the generated key for your iOS app in the developer console in the line
[GMSServices provideAPIKey:#"<INSERT API KEY HERE>"];
The error seems to complain that you are having an invalid Key which might be your case as you are directly trying to run demo code that you have downloaded. Example code do not usually contain valid keys as it can be misused by anyone else or exhaust the original authors API-call limits.
Also make sure that you have entered/authorized your current app's bundle id to use this API Key when you have generated it in your Google developer console.
First Create key for ios device from here
copy your bundle id form project so there is no chance for mistake
https://console.developers.google.com/project/plated-courier-95607/apiui/credential#pending_key
after that clean xcode , reset simulator ,close xcode ,open project run again it definitely going to work
you need to use the framework. Please find the instructions to download it via cocoa pods on the answer given by me on this link :
not able to use Google map sdk in ios
I also faced the same issue. Actually the problem is Google M4B Framework comes under premium plan. You need to purchase it from the Google's Developer Portal because it provides some new classes like GMSAutoComplete,
GMSAutoPredict etc.
You should rather use Google Standard Framework. It will run completely fine. Also you will not find some classes that come under Google M4B(only 5 new classes).
Implement the required steps and have fun.
Related
So I recently started setting up app check for my existing Flutter project (for both android and iOS platforms). I've had no problem with android's "Play Integrity", got the necessary debug token, and can successfully send and retrieve data to/from firestore (app check for firestore is currently enforced for my project).
The problem is, I can not get such a debug key for my iOS app. I will list the sources I've used and what I've tried so far.
I have firebase_app_check: ^0.1.1+8 installed via pubspec.yaml
I also added pod 'FirebaseAppCheck' to my Podfile
I have the necessary initialization code in my main.dart: await FirebaseAppCheck.instance.activate(...);
For "DeviceCheck", I am using THE SAME private key that I am using
for "Sign in With Apple" (which I have implemented successfully). I
have also enabled the checkbox for DeviceCheck in the settings of
that private key (in Apple Developer).
For my App ID (Apple Developer > Identifiers > App IDs), I have also
enabled the checkbox for "App Attest".
I have put "-FIRDebugEnabled" as an argument passed on launch in
XCode > Product > Scheme > Edit Scheme.
I always uninstall my app from my iOS simulator (iOS 16.2) or real device (iOS 16.1.2),
before trying again, because I have read across multiple forums that
the debug token only gets printed to the output the first time you
run your app.
I have also added these 4 lines of code in my AppDelegate.swift from here:
#if DEBUG
let providerFactory = AppCheckDebugProviderFactory()
AppCheck.setAppCheckProviderFactory(providerFactory)
#endif
Official firebase docs "iOS+ (App Attest)":
I have NOT copied ANY code from this page of the official docs, as I assume it's for native iOS apps only, and not for flutter, and I don't know where exactly I would have to put that code. I have only added the pod dependency and run pod install.
I don't have a .entitlements file.
So after all those steps, I'm apparently supposed to expect to find a debug token in my run output, as in:
Yet the only relevant output I can find is the following:
Runner[72719:33546579] 10.3.0 - [FirebaseFirestore][I-FST000001] AppCheck failed: 'The operation couldn’t be completed. (com.apple.devicecheck.error error 1.)'
If it matters:
I have NOT YET uploaded my iOS app to apple developer, app store connect or whatever (I'm not yet familiar with the process of publishing to the app store).
Neither have I uploaded my android app to Google Play console or created an app there (for this project).
Don't tell me anything about firestore rules. I already had that set up long ago, and everything worked just fine before I started integrating App Check.
Don't recommend any 3rd party plugins to me, I will only use official ones.
The firebase documentation says:
Tip: Confirm in your Xcode project's build settings that it passes the DEBUG flag to the Swift compiler
Try removing the '#if DEBUG' and '#endif' and run the app.
If it works, it mean you have missed that step
I was not able to find that build setting, so i just removed those lines from the AppDelegate, but i need to keep in mind to remove the other 2 lines while building the release mode
See this answer on the flutterfire Github issues page. Basically, call setAppCheckProviderFactory before GeneratedPluginRegistrant.register(with: self) in the app delegate file. I was investigating the same issue and it fixed it for me (the debug token was instantly printed out in Xcode's debug output). Hope it helps you as well!
I'm trying to upload the archive to app store, but this error crashes
No suitable application records were found. Verify your bundle identifier 'org.cocoapods.GoogleUtilities' is correct.
I have an admob framework connected via pods, but I have no idea what google utilites is
You should keep a unique bundle identifier for your project.
[ [1]: https://i.stack.imgur.com/v2bA9.png][1]
com.yourName.projectName.
YourName come automatically from your Apple ID .So First verify your Apple ID.
And project name you should keep unique.It's not similar with other project.
And don't use cocoaPods name in your project name.
GooleUtilities : This service provides utilities for string encoding/decoding, date formatting, JSON manipulation, and other miscellaneous tasks.
I am using Firebase UI to provide login for my app. When i try to login with Google it is giving error message com.firebase.ui.auth.FirebaseUiException: Code: 12500, message: 12500. But i when try to integrate google login directly it is working fine. I Couldn't find the way to resolve this issue. Error code description in google document
The sign in attempt didn't succeed with the current account.
Unlike SIGN_IN_REQUIRED. when seeing this error code, there is nothing user can do to recover from the sign in failure. Switching to another account may or may not help. Check adb log to see details if any.
Check to see if you have added a "Support email" in your firebase project settings. This was able to solve the problem for me after a lot of trying different things that didn't work.
You may need to set a SHA-1 certificate fingerprint in your app's Firebase settings. See this answer to a similar question here (reproduced below):
https://stackoverflow.com/a/52082447/4982525
Check if SHA-1 fingerprints are added to the firebase project
settings. If not,find SHA-1 fingerprint using
https://developers.google.com/android/guides/client-auth
Also, find the SHA-1 fingerprint of release key using
keytool -list -v -keystore <keystore path>
Remove with the path of the key store.
Then add both SHA-1 fingerprints to firebase projects settings.
NB: Don't forget to replace google-services.json with updated
google-services.json with new fingerprints. I lost two days on that.
Please add sha-1 code from your android studio to the fire console.
For me, I found that just deleting the app("remove app") from the firebase project solved the problem.
I faced this issue recently, the fix was to goto: https://console.developers.google.com/apis/credentials and complete OAuth credentials.
Add app logo, email, authorized domain, privacy link, and terms link. In my case, I used example.com for most stuffs, just for a practice app.
I have an existing App framework which I use on many different clients.
I am setting it up for an updated customer and testing the Push Notifications, however although I am able to create an ArrowDB user I am unable to register for Push notifications with the error message:
no valid ‘aps-environment’ entitlement string found for application
I am using Xcode 8.1, iOS 10.0 on the test iPhone and Appcelerator Studio, build: 4.8.0.201611121409 and idk 5.5.1.v20160921190109
The certificates are all correct and I have recreated them just in case to check if there was an issue.
I have read many of the other threads here and they all relate to Xcode but nothing that seems to help my case.
I'm tearing my hair out!
One other aside is the Facebook module is playing up and I get the error:
canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)
My only thought is that something is wrong in the trap.xml file? but no errors are coming up and everything else int he app works perfectly
any ideas?
I recalled reading this Jira ticket a while back. Perhaps it will be of help. https://jira.appcelerator.org/browse/TIMOB-23908
here is the thing: We changed the entitlements-handling in Ti.Facebook so it allows the keychain-access key to be to set. But as this will collide with your push-entitlements, you may need to write those in your entitlements file as well, e.g.
<key>aps-environment</key>
<string>development</string>
The change also was that Xcode 8 handles provisioning profiles differently, so the old way did not work again. However, in 6.0.1, we will improve the whole capabilities handling by injecting the required capabilities per feature / module dynamically, so you won't need a custom capabilities file anymore. See MOD-2313 and it's linked tickets for more infos on that.
Related problems (natively, regarding push-capabilities):
Xcode 8 APS Environment Entitlement won't set to production
with Xcode 8 no valid 'aps-environment' entitlement string found
Let us know if you have further questions!
checked if your push certs are configured correctly over here: https://developer.apple.com/account/ios/certificate/, and that the provisioning profile you are using to build is one WITHOUT wildcard characters?
hi I'm trying to include firebase in my app and followed the documentation, when I'm trying to do google sign in, Could not configure Firebase InstanceID error occurs .please advice how to overcome this error
There are two things to check (and hopefully, one will fix it for you):
Make sure your BundleIdentifier is exactly the same in your Firebase project as it is in your Xcode, i.e. com.[yourcompany].[yourappname]
Make sure you got the latest GoogleService-Info.plist file. Go to Firebase Console -> Settings -> Your Application - there will be a blue button to the right that lets you download new configuration file
That solved it for me.
Bug Details
As of version 3.13.0, there appears to be a bug in the Firebase/Core SDK.
I added a symbolic breakpoint at -[FIRInstanceID(FIRApp) configureInstanceIDWithOptions:app:] and stepped though the assembly.
It appears that FIRApp.configure() is ignoring the IS_GCM_ENABLED flag in the GoogleServices-Info.plist and tries to configure GCM regardless of the flag's state. In my case, because my project does not use GCM, the app would crash because there was no GCM_SENDER_ID in the plist.
Workaround
Add a dummy value (i.e. 123456789012) for GCM_SENDER_ID within the GoogleService-Info.plist file. This will allow the application to configure successfully.
You have to add your project which is created on
https://developers.google.com/mobile/add?platform=ios or fire base console into your Firebase dashboard.
Now you can download GoogleService-Info.plist from Firebase and import into your project.
I setup Firebase in code using FIROptions. In my case, I was missing gcmSenderID, fixing it then it works
Firebase DevRel here. This should be an error, unless you enabled gcm, you shouldn't go through instanceid setup. Filed internally.
For now, the workaround is manually changing "IS_GCM_ENABLED" to "NO" in your "GoogleService-Info.plist" file
I was getting this error as I didn't have my GoogleService-Info.plist in my Test folder as well. ( if you are using TDD)
As of the latest Firebase Core 3.16.0 - I seem to need to include it in my main project as well as copying a version into my Test Root.
This also happens when you shift your google SDK integration from one account to another and don't edit the API keys on application side.Make sure when you shift from one google account to another, you re-visit all the SDK guides again like FCM, Google Sign-in etc and make sure you are using new API keys (client_id, URI Scheme) in application.