I am getting this error that's causing the AppDelegate to crash
Terminating app due to uncaught exception 'com.google.greenhouse', reason: 'Error Domain=com.google.greenhouse Code=-102 "Unable to correctly configure subspec Analytics" UserInfo={NSLocalizedFailureReason=Tracking ID must not be nil or empty., NSLocalizedDescription=Unable to correctly configure subspec Analytics}'
I have followed the Firebase guide from here
What can be the reason?
Also I don't intend to use google analytics as for now. Any fix?
EDIT:
Note: I have removed the IDs and the Keys for this screenshot
The accepted solution was to remove Google Analytics.
But you actually can have both Firebase and Google Analytics.
The solution I found was to add TRACKING_ID into GoogleService-Info.plist
for example, add this:
<dict>
<key>TRACKING_ID</key>
<string>UA-XXXXXX-X</string>
I asked the Firebase team on this issue and they have responded.
Things you can check if the issue still persist.
Check to see that the GoogleService-Info.plist file is at the correct location i.e at the project root.
Check your IS_ANALYTICS_ENABLED in the google plist. Try changing it.
Try removing pod 'Google/Analytics'.
Add -FIRAnalyticsDebugEnabled to get more debugging information.
My problem was solved by removing Google/Analytics pod.
We had the exact same error and solved by removing
pod 'Google/Analytics'
from Podfile.
In our case, we had been using GA and switch to Firebase + TagManager Solution, but just forgot to remove 'Google/Analytics' from Podfile.
(Even we remove 'Google/Analytics', TagManager installs GoogleAnalytics for dependencies but errors are gone. Curious but it works...)
If would like to have both Google Analytics and Firebase. Please add two lines of code in GoogleService-Info file. Hope it will help
<key>TRACKING_ID</key>
<string>UA-123456789-0</string>
Enable/Disable Services That You Want in my Case i only need Analytics so i set YES in IS_ANALYTICS_ENABLED and Other services set to NO.
Source
Delete From Podfile --> pod 'Google/Analytics'
If it was not the location of your googleservice-info.plist file. Check your IS_ANALYTICS_ENABLED in the google plist. Maybe try changing it to the opposite of what it currently is.
Also, you can add this launch option to get more debug info. Maybe it will help.
Product -> Scheme -> Edit Scheme -> Arguments passed on launch:
-FIRAnalyticsDebugEnabled
None of the solutions suggested here worked for me. The only thing that did was disabling Firebase Analytics, by adding "FIREBASE_ANALYTICS_COLLECTION_ENABLED" (Boolean) to GoogleService-Info.plist and setting it to "NO" (taken from: https://firebase.google.com/support/guides/disable-analytics)
Make sure the GoogleService-Info.plist file is at the correct location i.e at the project root.
I have added a screenshot of my project for you to check for reference.
Related
I have integrated google maps SDK 2.7.0 in one of my iPhone application.
I made all configuration related to it and added all frameworks.
When I run application it gets crash with error -"[GMSCachedTile setVersionID:]: unrecognized selector".
I searched on internet but I didn't get any answer related to GMSCachedTile.
I have the same issue.
In the end, I found that there was two copy of GoogleMaps.bundle in my project.
One was in project source, and the other was in pods.
So I removed one of them. (I kept the pods one.)
And the crash never happened again.
Hope this helps.
When I upgrade my Xcode from 9.4.1 to 10.0 and my SE iOS from 11 to 12, my app encounters same question, I solve this by removing Google Maps integrated manually and keeping Google Maps imported by Pod. Then everything is OK again.
I had the same issue. If you have added Google Maps manually i.e added in Linked Frameworks and Libraries and also through the Pods then you should go ahead and delete the manually added one.
Since only the VersionInfo.plist was creating the problem, I deleted it from the manually added GoogleMaps.framework.
You can find the VersionInfo.plist file at this path
XCODEPROJECT/GoogleMaps.framework/Versions/A/Resources/GoogleMaps.bundle/GMSCacheStorage.momd
It worked for me.
Been following the Firebase setup guide. The setup process worked, but my project doesn't recognize the Analytics type:
Analytics.logEvent // use of unresolved identifier 'Analytics'
Xcode autocomplete shows AnalyticsConfiguration, but nothing else. As a sanity check, here's what I did to set up my project:
Use cocoapods to fetch Firebase/Core
Ensure I'm using the .xcworkspace file
Added the GoogleService-Info.plist for my project
In my app delegate, import Firebase and call FirebaseApp.configure()
Realized what the problem was. My project name was "Analytics", and it somehow influenced the visibility of the framework named "Analytics".
I am working on project which use Firebase.
I have added all Pod files in my project. I have also added Flags but it shows me error. I have also link all libraries of Firebase Podfile. I followed all instruction provided by Google Firebase Doc but it is not solving my error. Please help me into this.
I have Solved it successfully.
As per in my question Add framework related too firebase
Add this Linker flags too for firebase configuration
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.
Just started w/ Firebase and the first call of the first app fails -- yeah!
[FIRApp configure] throws an exception: "Configure Durable Deep Link fails". There's a GoogleService-info.plist but affect no entry for deep links. Tried toggling a few of the IS_* fields but no luck.
Is this something to be setup on the Dashboard? Are the Pod/Frameworks in github somewhere?
there's a duplicate question from #mskobe
by messing around w/ the PodFile I narrowed it down to removing:
pod 'Firebase/Invites'
not sure if it's an order or combination of other pods/operations.
I just encountered this error! It probably has something to do with your GoogleServices-info.plist file missing an important entry (probably API_KEY or CLIENT_ID).
You can most likely fix this by just re-downloading the GoogleServices-info.plist file again. Go to the Firebase console, select your project, click the little gear icon, select "Project settings" then for your iOS app, download the plist file again.
Delete the old one from Xcode, drag the new one in, and you should be good to go.