SwiftUI: No such Module 'FirebaseAuth' - swift

I've run into a strange issue when trying to setup Firebase sign in with Apple functionality in my app.
It is required to import FirebaseAuth for OAuth functionality. When I try importing it I get the error : "No such Module 'FirebaseAuth'". I have added the package dependencies with package manager and FirebaseAuth is there... but it still gives the error. See screenshot below.
Simply importing Firebase does not give an import error, however I still get errors when trying to use the Authentication functionality. See screenshot below
I've looked for solutions elsewhere but others who have had the same issue as me used Cocoapods to install the packages so their solutions don't apply here.
I am using Xcode 13.0

I fixed the issue by adding FirebaseAuth dependency in build phases:

Related

Flutter import dart:ffi not found

I am trying to use flutter_js in order to run a javascript on web-browser (desktop, not mobile). When I run the app i get /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_js-0.6.0/lib/javascript_runtime.dart:3:8: Error: Not found: 'dart:ffi' import 'dart:ffi';
Is there something that I do wrong or is it from the library?
If i run it on windows app, it works.
I think you're using dart:ffi somewhere. But this library is used to access native code and it won't fork on web. I'd suggest you to search for the place when you're importing dart:ffi and handle this with a conditional import.
UPD:
Maybe you have dart:ffi package somewhere in a project recources. That can be a reason of error also.

Undefined symbol: _OBJC_CLASS_$_FlurryMessaging

I recently upgrade Xcode to 14.X, and I'm getting the following error when building
Undefined symbol: _OBJC_CLASS_$_FlurryMessaging
Seems like Flurry package doesn't support Xcode. What should I do?
I am an engineer on Flurry's SDK team. Based on your description you are using Swift Package Manager?
Make sure you have imported Flurry analytics and messaging:
Add a import statement for messaging:
import Flurry_iOS_SDK
import Flurry_Messaging
Note Flurry Messaging is only supported on iOS and tvOS
For Cocoapods you need have the following in your Podfile:
pod 'Flurry-iOS-SDK/FlurryMessaging'
You should see the frameworks here:
Otherwise the instructions are the same as the above.
I have sample code for Flurry Messaging implementation here:
https://github.com/flurrydev/iOS-Push-notification-sample-swift
If this doesn't clear up the issue for you reach out to me at support#flurry.com

Firebase SPM brings lots of Warning under iOS15

Using XCode13.1, iOS15.1, Swift5.5.1 :
The Swift Package Manager is great and it improved again under iOS15.
However, my observation is that even big companies do not fully embrace its usage.
One painful experience at the moment is: Google Firebase integration with SPM.
It is mostly their sub-dependencies that cause lots of Warning messages inside Xcode.
Google Firebase 8.9.1 integration with Swift Package Manager uses the following two sub-dependencies :
abseil 0.20200225.3
BoringSSL-GRPC 0.7.1
others...
In the Project Navigator of Xcode you can immediately see the Warning-Signs.
When compiling my project there are 37 Warnings due to the two above sub-dependencies of Firebase. The compiler prints the following warnings:
What is there to do ?
When is Google updating their Firebase dependencies appropriate for iOS15 ?
In Xcode, do File -> Packages -> Update to latest Package Versions to get the fixes in abseil 0.202200225.4, BoringSSL-GRPC 0.7.2, etc.

Flutter | Error: Couldn't resolve the package

I created a package that is a collection of my own helper classes for faster developing...
The package also included firebase_analytics: which requires a native implementation for each platform i want it to run. Even if i dont wanted to use firebase at all, but still wanted to use my package i was forced to create firebase-config files for the app, because the app crashes if the firebase_analytics package does not find a valid file for the specific platform. To avoid those things i splitted my package in two packages.
The Core-Package: All helper classes that run native dart code
Optional extension: Only the classes that need the firebase implementation
So if i want to use the package without firebase i just have to depend on the core.
If i want to use the firebase variant i could simply depend the firebase package, because the extension package itself depends on the core-package in its own pubspec.yaml file.
PROBLEM: Since i restructured my package like i described, all my apps that depend on it are not building anymore. The console says that all packages that i depend on in my two packages can not be found. This error occures both ways: With firebase & without.
ERROR: (Scroll down for the complete console output)
MY ATTEMPTS:
"flutter clean" & "flutter pub get" in every package and app folder
"flutter pub cache repair"
CORE-PACKAGE Pubspec.yaml:
FIREBASE-Extension Pubspec.yaml:
Plain Console Output:
pastebin.com/m14cbqDV
Thanks for any help!!
I am facing the same issue while i was making a build in Xcode 13.So I had upgraded my flutter version 2.8.0 to 2.10.2 and also removed the version of all firebase dependencies, then the issue was finally solved.
I have faced similar issues and resolved them by removing package versions. Issues like this often arise due to mismatched versions of packages (eg firebase_core, firebase analytics). Please try to remove versions of the firebase packages or the whole packages. (like firebase_analytics :).
Sorry, my bad! As you can see i moved my dependencys to the dev section of my pubspec.yaml. They should be placed in the dependency section.

Firebase for Flutter sign-in build failure

I have been following the Firebase for Flutter tutorial with success until I reach "Set up Firebase Integration". When I relaunch the app on my phone the build fails with the following exception:
Note:
/Users/williamdevore/.pub-cache/hosted/pub.dartlang.org/firebase_storage-0.0.2/android/src/main/java/io/flutter/plugins/firebase/storage/FirebaseStoragePlugin.java
uses unchecked or unsafe operations. Note: Recompile with
-Xlint:unchecked for details. /Users/williamdevore/.pub-cache/hosted/pub.dartlang.org/google_sign_in-0.0.6/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java:30:
error: cannot find symbol import
io.flutter.app.FlutterFragmentActivity;
^ symbol: class FlutterFragmentActivity location: package io.flutter.app
/Users/williamdevore/.pub-cache/hosted/pub.dartlang.org/google_sign_in-0.0.6/android/src/main/java/io/flutter/plugins/googlesignin/GoogleSignInPlugin.java:98:
error: cannot find symbol
+ FlutterFragmentActivity.class.getName());
^ symbol: class FlutterFragmentActivity location: class GoogleSignInPlugin 2 errors
FAILURE: Build failed with an exception.
Flutter doctor says everything is fine for Android. I have the latest "everything". I was able to setup the google-services json file and use the Firebase console with no problems.
I followed the instructions for modifying the build.gradle files exactly--twice!.
Is there some of other step I should be doing outside of the Flutter tutorial that is specific for Android, perhaps Brew or cocoapods maybe?
It looks like you might have an older version of Flutter that doesn't match the Google Sign In plugin version you're using. Right now the plugins aren't declaring which versions of Flutter they require (but that may change in the future).
Does running flutter update get you past this error? If not, try running flutter doctor and see how old your Flutter SDK is. You want it to include the commit b4ba972bf394a2269824e1eadaa1627bbc872d4b, so it should be a few days old at most.
You should replace FlutterActivity with FlutterFragmentActivity in the two places it appears in your MainActivity.java. (This won't be necessary in the next Google Sign In plugin update; see issue 10690.)