How to fix "No such module 'FirebaseDatabaseUI'" in Swift 4? - ios

I installed FirebaseDatabaseUI via Cocoapods, closed the .xcodeproj then opened the .xcodeworkspace, but whenever I try to import it within my code, it keeps saying No such module 'FirebaseDatabaseUI'
Supposing it might be a dependency issue, I decided to install the FirebaseUI full bundle by pod 'FirebaseUI', but achieved no success at all. As can be seen in the screenshot I took of my code, FirebaseDatabaseUI is the only FirebaseUI library in which is occurring the issue.
Can someone tell me what might be wrong?

Actually, all subspec like Database, Firestore, Auth... is implicitly belong to FirebaseUI. You saw only FirebaseDatabaseUI get error warning because you put it in the first place, if you put other FirebaseXYZUI to the first place, it will also display that error.
To fix the error, simply import FirebaseUI and remove all other FirebaseXYZUI.
Hope this helps.

Related

Importing CocoaPod into Swift Playground Produces Expression Failed to Parse Error

I have several private pods that I'm already using successfully in my project. I added a Swift playground to the workspace (not to the project), and I've added an import Foo statement to the top of the playground.
Autocomplete is working for my pod modules, so things seem to be set up correctly. However, I'm getting this very obscure error:
expression failed to parse, fixed expression suggested:
#sourceLocation(file: "Foo.playground", line: 1)
It doesn't matter which line I put my import statement on; it always refers to line 1.
There is notably some Obj-C code in the framework that’s being imported. I’m not sure if that matters or not since it’s callable from the Swift in my app.
Any help would be appreciated!
Update (7/21/19): Still haven't been able to resolve this, but I was able to confirm that a much simpler Obj-C library is callable from a playground. So, it's just the complex one I was trying to call initially. Since this is proprietary, there's not a lot of info I can share, but if anyone has suggestions on what to try (or what I can genericize, extract, and share here), I'm happy to take a stab at it and update you. Thanks!

Unresolved identifier 'HTTPMetric' when using Firebase Performance

I'm trying to add FirebasePerformance to my app. For adding monitoring for specific network requests I used the example from here: https://firebase.google.com/docs/perf-mon/get-started-ios
However, I get "Unresolved identifier 'HTTPMetric' ". I do have imports for Firebase & FirebasePerformance in my .swift class.
If anyone had the same issue I would really appreciate some help.
Apparently, running pod update fixes this. I got my answer here:
https://github.com/firebase/firebase-ios-sdk/issues/1071

I am receiving an error in swift from the Protobuf/Wrappers import in the Pod file

in my GFBProtocolBuffers.h, I am receiving this error at this line.
#import <Protobuf/Wrappers.pbobjc.h>
It says lexical or preprocessor Issue, 'Protobuf/Wrappers.pbobjc.h' file not found. I am not sure what is even going on here. If anyone has any clue on how to help me that would be appreciated, also if you know what is going on and could teach me.
I had this problem . I used all the methods mentioned on the internet but still doesn't work. Then I realized that all the header files not found was from cocoapods, so I re-installed the cocoapods using pod install, and thus solved the problem.

Xcode variables view empty values while debugging

I cannot see the value of variables while debugging my app. I have already checked the build settings and optimization values are set to none, also my Scheme. See screenshots below:
The idea is to remove things from your bridging-header one by one and see if you can narrow down the issue.
I think I read somewhere that if a library is causing many issues behind the scenes, this can stop your debugger working.
In my case
I was using Facebook Tweaks library
Once I got rid of it, I got my debugging back.
and in my AppDelegate.swift
import Tweaks into the AppDelegate file.
import Tweaks
Moved RxSwift library from the Swift package Dependencies to CocoaPod

iOS: #import AnyModule not found after editing class using cocoapods

I have an Obj-C/Swift project setup that imports modules using cocoapods. In any class where I am importing a framework using the #import function I get the error message SomeModule not found. However, when I build/run it compiles fine, and the framework works and functions as expected.
The problem here is that it messes me up when I'm trying to write code below the error (i.e., objects appear as ints because the error above messes up the compiler; function auto complete doesn't work, etc). What's weird, if I cmd+s to save the class, the error messages go away. Then the second I start typing again, they reappear.
I've gone as far as removing all of my cocoapods and reinstalling them, but to no avail. This has only been an issue since installing xcode 8.
Anyone have any insight into this?
Thanks in advance.
Sorry for super late response - the only way I found to get around this was to use the "old" style of framework import; i.e., ... it seems like some Frameworks just don't play nicely with the #import declaration. #pablo-martinez
If someone has a better solution please feel free to share.

Resources