Firebase Configuration issue - ios

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

Related

No Cocoapods - Need to add performance monitoring for iOS manually

I need to integrate Firebase performance monitoring for my app. I can't use cocoa pods in this project. I must need to download a framework because it has its own cocoapod Firebase/performance .
The documentation only includes the pod file to add. Not a manual option.
https://firebase.google.com/docs/perf-mon/get-started-ios
Please help where can I find/ how can I add the Firebase/performance library/dependency to my project.
I already have Firebase , I need Firebase/performance
The Firebase documentation gives instructions for this in the documentation:
If you don't want to use Cocoapods, you can still take advantage of
the Firebase SDKs by importing the frameworks directly.
Download the framework SDK zip. This is a ~1GB file and might take some time to download.
Unzip the file, then review the README for the Frameworks that you want to include in your app.
Add the ObjC linker flag in your Other Linker Settings in your target's build settings.
Follow the link to the documentation to find the actual link to download the frameworks zip.

Build error after removing Bridging Header from Xcode project

I'm trying to integrate my project from Google Analytics to Firebase Analytics. I was using Google Analytics SDK installed with Cococapods. After I do below steps;
Remove 'GoogleAnalytics' from Pod file
Run 'pod install'
Remove bridging header file from the project
Remove bridging header from build settings
I got build error with like average 300 error. Like
Value of type 'CATransition' has no member 'fadeTransition'
I can successfully build when not uninstall Google Analytics SDK so there is no problem with my code. What can cause this problem?
EDIT: I found that deleting bridging header causes the problem, not the Google Analytics SDK.
I found that most of my classes doesn't have import UIKit and somehow, when project has objective-c header, It doesn't need it. However, after I delete it, all of these classes need it. Therefore, implementing
import UIKit
fixed my problem.

Error While Intergrating Firebase Authentication in my app

I am trying to integrate the firebase auth with google in my application using Cocoa Pods. I've already installed everything which is required for the integration.But still I am facing this three errors.
I have attacehed a image here for better understanding.
Kindly help me if anyone have idea or faced this issues.
Either you have duplicate files in your project. Same files twice.
You have not set Target Membership in your project.
By checking the Target Membership of your library. Select the library
and files relevant to your app target from the Navigator. Check on the
Utilities section that those files are marked as required for your app
target.
Thanks
Happy Coding.

App Delegate crashes because of Firebase initialization

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.

'Linker command failed with exit code 1' when using Google Analytics via CocoaPods

I'm trying to add Google Analytics to an iOS app written in Swift. I've followed the guide that adds the frameworks via CocoaPods and added a bridging header but I'm still getting:
Linker command failed with exit code 1
My podfile does have use_frameworks! so I'm wondering if that has anything to do with it... there is no additional information on the Analytics site from what I can see.
EDIT:
I've noticed that after viewing the full error message the following is displayed:
ld: '/Users/simon/Programming/VenueNow/Pods/GoogleUtilities/Libraries/libGTM_NSData+zlib.a(GTMNSData+zlib.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
And searching for that issue brings up that Google updated to support bit code but hadn't updated the cocoa pods framework at that time.
Go to your build settings and switch the target's settings to ENABLE_BITCODE = YES for now.
I had this same issue. Fortunately you can use Google Analytics with BitCode enabled, but it's a bit confusing due to how Google had set up their CocoaPods support.
There's actually 2 CocoaPods you can use:
'Google/Analytics'
'GoogleAnalytics'
The first one is the "latest" but it's tied to the greater Google pods so it does not support Bitcode. The second one is for Analytics only and does support BitCode. However because the latter does not include extra Google pods some of the instructions on how to set it up are incorrect.
You have to use the v2 method of setting up analytics:
// Inside AppDelegate:
// Optional: automatically send uncaught exceptions to Google Analytics.
GAI.sharedInstance().trackUncaughtExceptions = true
// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
GAI.sharedInstance().dispatchInterval = 20
// Create tracker instance.
let tracker = GAI.sharedInstance().trackerWithTrackingId("XX-XXXXXXXX-Y")
The rest of the Google analytics api you can use the v3 documentation (you don't need to use v2).
The 'Google/Analytics' cocoapod as of this writing still does not support BitCode. See here
Had this issue, but it wasn't related to the bitcode setting. I had somehow ended up with duplicate framework files in the Frameworks folder of my XCode project. I deleted all frameworks files that were red (and duplicates). This solved the "Apple Mach O, Linker Command failed with exit code 1" error.
This worked for me:
you have to remove libPods.a library from Linked Frameworks and
Libraries section of target.
Make sure you open the .xcworkspace file not the project file from xCode Project menu when working with pods. That should solve the issue with linking.
Close Xcode, rename the folder. Then make a new folder with the previous name. Run the project, stop the project. Delete the new folder, rename old folder and re-run.
My iPad Pro simulator is affected with this issue. Its something that makes me upset, so much hard work... hopefully Google works through bugs for the next SDK.
When I changed 'iOS Deployment Target' from 'IOS 10.0' to current one (my phone's) 'iOS 10.2', the problem was gone for me.
Building Settings>Deployment>iOS Deployment Target
I resorted to adding Analytics via cocoa pods again and disabled bit code for now.
Hopefully a future cocoa pods version will support it.
You have another option... install Google Analytics without using CocoaPods:
https://developers.google.com/analytics/devguides/collection/ios/v3/sdk-download
I had same the problem with xcode 7.3. It is because, some of my .h and .m files were added twice.
This usually happens when using Cocoapods and you are building from the xcproject which doesn't know about the cocoapod libraries.
Some times appeared if you declare a constant in the header file without static notation.
like this
const int k = 10;
it should be:
static const int k = 10;
Try to remove any trace of cocoapods pods using pod deintegrate then
Run pod install
Build Settings > Enable Bitcode > No

Resources