Could not build Objective-C module 'Firebase' - firebase

I am getting this error for import Firebase:
Could not build Objective-C module 'Firebase'
Xcode also complains about FirebaseAnalytics saying
'FirebaseAnalytics/FirebaseAnalytics.h' file not found.
My project used to build just fine until I updated to swift 4.
I am using the latest version of Firebase via Cocoapods version 1.4.0 beta 2.

I just had the same issue. What I had to do was:
Close Xcode
Restart Xcode and made sure I opened the .xcworkspace project file.
Ran a Build on the project.
After that I had no more Firebase error messages.

In Xcode,
Go to Product -> Scheme -> Select New Scheme. Then choose FirebaseCore as Target and Name. Now build the project and then change back to your app target. It works for me in Xcode 9.1

Link Binary with Libraries
Build Phases - under Link Binary With Libraries - this is where the magic happens:
It is very likely, your binary is not linked with the Firebase library - hence the header file cannot be found.

After updating to XCode 9.4 the problem resolved itself.

Related

I try to run my first Test using Appium, but I get this error [duplicate]

I have gone in and checked to make sure the file exists, but I'm not familiar with the not able to verify the signature error:
Here is the full error:
Original error: Cannot verify the signature of '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["/usr/local/share/android-sdk/platform-tools/apksigner.jar","/usr/local/share/android-sdk/emulator/apksigner.jar","/usr/local/share/android-sdk/cmdline-tools/latest/bin/apksigner.jar","/usr/local/share/android-sdk/tools/apksigner.jar","/usr/local/share/android-sdk/tools/bin/apksigner.jar","/usr/local/share/android-sdk/apksigner.jar"]. Do you have Android Build Tools installed at '/usr/local/share/android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
I'm assuming they go hand in hand, but I'm not super sure.
I checked for the missing item in the second error, but could not find it. Is there a way that I can find this file somewhere and manually upload it. Or what is the best way to go about solving this issue. I'm quite a novice so this is all pretty new to me (ie. getting a necessary file that does not currently exist in the directory or solving the signature issue)
I'm currently running appium on the desktop client and have added the file paths for JAVA_HOME and ANDROID_HOME.
Update or install Android Build tools in Android-Studio
Open Android Studio -> Tools -> SDK manager -> SDK Tools -> Android SDK BUild -Tools
Then install recent version
And Chcek again it'll surely work ..!
It is not Appium issue, but Android SDK missing apksigner:
Check the link and install build-tools with extras, then check apksigner is in path /Users/<your user>/Library/Android/sdk/build-tools/<verion>
Also you can use appium-doctor to check your setup
this worked for me
Open Android Studio -> Tools -> SDK manager -> SDK Tools -> Android SDK BUild -Tools Then install recent version

"You attempted to use a firebase module that's not installed on your Android project by calling firebase.app()."

I followed https://rnfirebase.io/#managed-workflow guide on how to install Firebase. I created a new Expo app with:
npx create-react-native-app -t with-dev-client
As written in the guide. I then did
npx expo install #react-native-firebase/app
npx expo install #react-native-firebase/auth
Having nothing in the project except a Button which, when pressed creates an account with createUserWithEmailAndPassword.
This is when I am presented with this error:
Error: You attempted to use a firebase module that's not installed on your Android project by calling firebase.app().
Ensure you have:
imported the 'io.invertase.firebase.app.ReactNativeFirebaseAppPackage' module in your 'MainApplication.java' file.
Added the 'new ReactNativeFirebaseAppPackage()' line inside of the RN 'getPackages()' method list.
See http://invertase.link/android for full setup instructions.
Did I mess up on the way, or is there more steps than the guide suggests, or is the way I created the app the cause?
This was tested on an Android Emulator, launched by pressing 'a' in the terminal.
I appreciate any help!
Additional info:
I added the Google services as shown in the guide, with the name corresponding to the package name given in app.json.
Running expo prebuild --clean:
It says "(node:14360) [DEP0148] DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package" which I don't know if it could create an issue such as this.
You need to install #react-native-firebase/app module and initialize, then only you can use any of the #react-native-firebase/xxx modules. check the official documentation for authorization module here.

Flutter.h not found

Hello all: I am working on a Flutter App with a team, and the App uses Firebase. When I try to run the App in Xcode, I get an error: Flutter/Flutter.h file not found from FLTFirebaseCorePlugin.h (error messages pasted at the bottom of this post). The steps I followed to bring the project over to the Mac from the PC are:
Copied the entire directory for the project
Open the project on the Mac in Android Studio
Run flutter pub get
Open a terminal, cd to the iOS folder
run pod install
but no joy. Can anyone offer any advice? I did have to set the paths to the Dart and Flutter SDKs on the Mac explicitly, and flutter doctor says all is OK, so stuck.
Thanks for any and all input.
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:8:9: 'Flutter/Flutter.h' file not found
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:9: In file included from /Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.m:5:
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-1.0.3/ios/Classes/FLTFirebaseCorePlugin.h:8:9: 'Flutter/Flutter.h' file not found
/Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:9: While building module 'firebase_core' imported from /Users/johnstraumann/Development/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_crashlytics-1.0.0/ios/Classes/FLTFirebaseCrashlyticsPlugin.h:12:
I got this error when I update flutter 1.0 to flutter 2.0;
I find just remove next line in Podfile, then pod install again, it got fixed;
:generate_multiple_pod_projects => true;
I had the same issue a week ago.
Updating Firebase Crashlytics to the latest version fixed the issue for me.
After upgrading in pubspec.yaml to the latest version, don't forget to run
flutter clean
flutter pub get
pod install
pod update

Android Studio Gradle Sync Error "The library com.google.android.gms:play-services-base is being requested by various other libraries"

I have updated all the firebase and google gms dependencies and still am getting this error, I don't know what's wrong?
Error-The library com.google.android.gms:play-services-base is being requested by various other libraries at [[11.0.1,11.0.1], [15.0.1,16.0.0), [15.0.1,15.0.1]], but resolves to 15.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
You must use firebase-ui:3.3.1 for compatibility with the Firebase SDK and Support Lib versions you are using

Xcode 4 (final version) error when building

I can't seem to find the answer.
I've just used Xcode 4 final version and built an existing project that was built ok with Xcode 3, but got this error:
ld: library not found for -lSystem.B
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
But another project was built OK with Xcode 4.
I installed Xcode 4 by choosing the default options.
Do I miss to include a library or framework somewhere?
Could somebody please help. Thank you.
Here's my solution for Xcode 4.0.2 with SDK 4.3 environment, but I believe it should also work on other setups.
libSystem.B.dylib is not present
under
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/usr/lib,
however it is present for lower SDK
versions (e.g. iPhoneOS4.2.sdk)
most of the cases
libSystem.B.dylib is just a
symbolic link to libSystem.dylib
so in
iPhoneSimulator4.3.sdk/usr/lib
I've applied following command sudo
ln -s libSystem.dylib
libSystem.B.dylib and my simulator
builds started to work again :)
NOTE: libSystem.B.dylib is used by Flurry and Urban Airship so you better don't delete the reference in project file (of course Urban Airship does not work under Simulator, but I think Flurry does. libSystem.B.dylib may also be required by other libraries you included to your project.
UPDATE: solution still works for iOS5 Simulator after upgrading to Xcode 4.3
UPDATE, March 9th, 2k12: for Xcode installations via App Store, prefix above path with /Applications/Xcode.app/Contents or the path where you've installed Xcode.app.
Solved.
Turns out that there was a reference to libSystemB in my project (Don't know why it's there). After deleting the reference, it built well.
Thanks anyway guys!
-weak_library /usr/lib/libSystem.B.dylib breaks the iOS Simulator.
Use -weak-lSystem instead.
The quote belongs to gparker on the official dev forums.
-weak_library /usr/lib/libSystem.B.dylib breaks the iOS Simulator. Use -weak-lSystem instead.
nicktmro got it right, especially when you are developing cocos2d projects using xcode 4.x
I have the same problem since months and always kept making the symbolic link as described here everytime i updated xCode. Today I found a nice new way to fix this:
In your targets Build Phases go to 'Link Binary With Libraries' and search for:
libz.dylib
Set from 'Required' to 'Optional'
BUILD
BE HAPPY

Resources