This is what happens:
running on Xcode Version 7.3.1 (7D1014)
pod 'Firebase/Core'
import Firebase in the Class
unresolved on Database
Then I added the Database framework
pod 'Firebase/Core'
pod 'Firebase/Database'
unresolved on FirebaseApp
It seems that the 2 frameworks are in mutex mode. They cannot coexist.
I have tried everything: update, install, uninstall, recreate the project, recreate the workspace. All.
May you help me. Is there a bug on last Firebase release?
I had a similar issue.
Your import statement would be:
import Firebase
Make sure restart Xcode and to clean the build folder.
It's working for me & got rid of "Use of unresolved identifier FirebaseApp..." error
Update: For Swift 4.2: FirebaseApp.configure() does work. [FIRApp is renamed to FirebaseApp]
import FirebaseCore
Then you could use FirebaseApp.configure(). I'm using swift 4.
Sounds like you might be using an older version of Firebase. Try -
pod repo update
pod update
Double check Firebase 4.0 is being installed.
Also try importing the specific modules. So instead of
import Firebase use import FirebaseDatabaseor import FirebaseAuth.
use FIRApp.configure() instead of Firebase.configure()
sudo gem install cocoapods
pod update
Replace pod 'Firebase/Core' with pod 'Firebase'.
Then run pod repo update.
That work today for me:
1. in Xcode 9.1
import UIKit
import Firebase
import UserNotifications
import FirebaseInstanceID
import FirebaseMessaging
import FirebaseCrash
import FirebaseAnalytics
#UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
return true
}
2. My PodFile
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Crash'
pod 'Firebase/RemoteConfig'
pod 'Firebase/Storage'
pod 'FirebaseUI', '~> 4.0'
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
3. finale:
pod repo update
pod update
4. restart xcode:
5. press: shift-alt-command-k (in xcode)
This will delete all of the products and intermediate files in the build folder.It's different from delete derive data.
6. an clean
done
In my case it I needed to import FirebaseCore instead of import Firebase or import FirebaseRemoteConfig.
I put in 'Firebase' along w/ 'Firebase/Core' in the podfile and it worked for me
It worked for me with
pod repo update
pod update
and then run this at the location of the pod file:
pod install
After rebuilding my app the error should be gone.
Use FIRApp.configure() instead of FirebaseApp.
For those facing the issue with RemoteConfig configuration, adding an extra import:
import FirebaseRemoteConfig
helped in my case
import FirebaseCore
Adding this to the top of the class resolved the issue for me.
FirebaseCore version: 6.29.0
This is probably too late but if you are sure your podfile is correct and your app has been building before.
When this error just comes out of the blue, remember that the other thing can go wrong is your Xcode's incremental build folder.
Try this:
Quite Xcode
Locate your Build folder and DerivedData folder in finder
Delete Build folder and DerivedData folder
Rebuild via Xcode
Hopefully you'd be fine then.
Related
During the Invertase Firebase Crashlytics setup (https://rnfirebase.io/crashlytics/ios-setup) , I continuously get the the following error:
CocoaPods could not find compatible versions for pod "Firebase/Crashlytics"
Or other variant relating to Firebase/Core or Firebase/CoreOnly
Podfile
pod 'Firebase/Core'
pod 'Firebase/CoreOnly'
pod 'Firebase/Analytics'
pod 'Firebase/Crashlytics'
Even if I try to set each package to a specific version with ~> 6.x.x
related node modules
"#react-native-firebase/app": "^6.7.1",
"#react-native-firebase/crashlytics": "^6.7.1",
"#react-navigation/native": "^5.1.6",
react-native-firebase supports lib auto-link, which means you don't need to add
Firebase pods in Podfile manually
duan response worked for me, at least i have no errors
also, i linked this manually:
react-native link #react-native-firebase/crashlytics
I have configured electron with vuejs and i would like to add firebae to my project so i have
In my main.js
import * as firebase from 'firebase'
let firebasconfig = {
//config from firebase project
};
Vue.prototype.$firebase = firebase.initializeApp(firebasconfig);
But now am getting an error
Error: Failed to load gRPC binary module because it was not installed
for the current system
Expected directory: electron-v1.8-linux-x64-glibc
Found: [node-v59-linux-x64-glibc]
This problem can often be fixed by running "npm rebuild" on the current system
Original error: Cannot find module
I have tried running rebuild but still fails
What elese do i need to do for this to work
I encouter the same issue with
vue-electron 1.0.6
firebase 5.4.2
vuefire 1.4.5
node 6.10.3
The following manipulation has worked for me. I have downgraded :
firebase to 4.6.0
vuefire to 1.4.4
Then ran npm rebuild and yarn and now it works.
I'm not sure all the things I have done are necessary. But for sure it looks like a problem with firebase.
i am using xcode 7.3 and swift 2.2. I have added pod 'Firebase/Auth' to my pod file then it gives me error stating unresolved identifier for both of them but when i reinstall my pod file with out pod 'Firebase/Auth'. It does not shows the issue for FirebaseApp.configure().Only after adding Auth to my pod file it is showing the issue. I tried even updating my pod file but still same issue.
And this is how i installed pod,
Can anybody suggest me how can i solve this issue.? Even restarting and cleaning also does not solves the issue..
You just need to add 'import FirebaseCore'
You just need to add 'import Firebase' and remove the rest import statements of Firebase. And add
FirebaseApp.configure(). FIRApp.configure() does not work anymore.
I am trying to install the Firebase Performance SDK and following their instructions on the site:
https://firebase.google.com/docs/perf-mon/get-started-ios
When I run the pod install step it gives me the following error:
firebase performance required by podfile
I run the pod update command and everything runs on the pod install but then when I open up my workspace I get errors in swift as such:
FIRDatabaseReference has been renamed to DatabaseReference
FIRDatabase has been renamed to Database
FIRFirebase.database().reference is now Database.database.reference
which then give the error
Database has no member reference
What gives!? Has anyone gotten these error after updating their podfile with Firebase!?
Pod file is as such:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Pool' do
# Uncommnet this line if you're using Swift
use_frameworks!
#Pods for firebase pool
pod 'Firebase', '>=2.5.1' <--- This has been removed from the podfile as suggested
pod 'Firebase/Core'
pod 'Firebase/Performance'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'Firebase/Storage'
pod 'Firebase/Crash'
target 'PoolTests' do
# inherit! :search_paths
end
target 'PoolUITests' do
# inherit! :search_paths
end
end
Result of pod install
Error in xcode after pod install/update:
Here's a guide for upgrading Firebase iOS:
https://firebase.google.com/support/guides/firebase-ios
With 4.0 in particular, the Swift interfaces have been cleaned up to make it more "Swifty" which is why you're seeing those rename warning.
After the renaming, accessing the database reference should look like:
let ref:DatabaseReference = Database.database().reference()
For the updated docs of the new swift interface, see here:
https://firebase.google.com/docs/reference/ios/firebasedatabase/api/reference/Classes/FIRDatabase
The release of Firebase 4.0 on May 17 has the changed the naming convention and can be found in this naming migration guide:
https://firebase.google.com/docs/reference/ios/naming-migration-guide
I am getting EXC_BAD_ACCESS after including 'Firebase/Auth' in Podfile. This happens without adding any line of firebase code. I am using swift3 on xcode 8 and the resultant pods are -
Installing Firebase (3.8.0)
Installing FirebaseAnalytics (3.5.1)
Installing FirebaseAuth (3.0.6)
Installing FirebaseCore (3.4.4)
Installing FirebaseInstanceID (1.0.8)
Using GTMOAuth2 (1.1.4)
Using GTMSessionFetcher (1.1.7)
Using GoogleAppUtilities (1.1.2)
Installing GoogleInterchangeUtilities (1.2.2)
Using GoogleSignIn (4.0.1)
Using GoogleSymbolUtilities (1.1.2)
Installing GoogleToolboxForMac 2.1.0 (was 2.1.0)
Using Localize-Swift (1.6)
Using ProtocolBuffers-Swift (3.0.6)
Using QorumLogs (0.9)
The error comes in Thread 1 in [UIViewController(FIRAScreenClassName) fira_viewDidAppear:]:
This happens only if the pod target is itself a framework which is embedded in an app eventually.
I do have Google analytics as well. Is it because ARC is not enabled? How do I do that on xcode-8?
Any other options to try?
There appears to be a problem in the latest Firebase/Core (3.8.0) release. Even #IBDesignable was crashing with a recursive call to the method signature you mentioned.
You have a couple of options:
In Info.plist (app), set FirebaseAutomaticScreenReportingEnabled to NO (bool). This solved the problem for my running application, but IBDesignable resources caused this error on build:
file:///path/to/project/Base.lproj/Main.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (svZ-78-1Mn): The agent crashed
You may want to temporarily downgrade to 3.7.1, for example,
pod 'Firebase/Core', '~> 3.7.1'
pod 'Firebase/Auth'
pod 'Firebase/Database'
The rest of the dependencies should take care of themselves when you run pod update.
I made a silly mistake. Never turned on Google under Authentication -> Sign in methods on Firebase
I am suspecting that the Podfile is not correct. I got into similar problem by adding Firebase dependency into a framework and I ran into the problem like this
objc[12345]: Class FIRAAppEnvironmentUtil is implemented in both
/Users/...Build/Products/Debug-iphonesimulator/SomeFramework.framework/SomeFramework
(0x105ef7fc8) and /Users/.../CurrentProject.app/CurrentProject
(0x105945108). One of the two will be used. Which one is undefined.
As mentioned in this post, you might have duplicate dependencies in different targets which could lead to weird bug like this. Adding Firebase pod into the main target and removing the Firebase pod from the framework fixed the problem for me.