Admob pods do not work after firebase integration - ios

As you may be aware of it, Google now switch to Firebase instead of Google Analytics. So I tried to integrate it to my current working project. Admob is also integrated to my project with Pods.
I have followed Google's document and created a new pod and re-install with firebase. After it , now my project does not build.
Here is error
Use of unresolved identifiers "GADBannerView"

Try switching your imports to just:
#import GoogleMobileAds;
Everything should work as it was before, but using the module map is a great a way to pull in the headers rather than directly importing.

I have resolved it with:
-delete all pod related files from my project folder
-pod init
-re-add my required pods
-pod install

So I get this error as well with GADRequest errors even on Google's sample Banner project.
I fixed it with #Ian Barber's suggestion with #batgun's answer, of updating cocoapod version to 1.0.0 by running
$ [sudo] gem install cocoapods
https://guides.cocoapods.org/using/getting-started.html
then deleting all cocoapod items then install them again.
When I was in cocoapod version lower than 1.0.0, when I run pod install again, I still had errors, like "Use of unresolved identifier 'GADRequest'"
I retyped the whole thing and worked perfectly. When I was still not in cocoapod 1.0.0 version (i think it was 0.39 version), I can only find GADRequestError and not GADRequest.
When I retry extracting the original project now, do pod install and run the app, It doesn't throw any errors now.
I believe this has something to do with cocoapod version but it is not in google admob instruction to update it on.
I was trying to figure this out since the day of the release and losing hope for firebase because it was the sample basic banner project and it doesn't work!
VERIFIED!
I can verify it has something to do with cocoapod version.
I was trying to do the Google's Codelab 'FriendlyChatSwift' practice project since the release and throws a bunch of errors after running pod, not finding bunch of classes.
Steps:
$ [sudo] gem install cocoapods
I deleted the existing downloaded pods and related (ProjectName.xcworkspace, PodFile.lock, /Pods)
Run pod install
Build and Run of the project
It worked perfectly. I also tried running the project before doing this steps and It had bunch of errors.

I had this same issue and this helped me get setup the way I needed it but I don't think anyone touched on my exact issue. Thought I'd provide that just in case someone was looking.
After I cleared everything out and ran pod init I noticed that the generated pod file has use_frameworks! set in it. Once I added that everything was solved. Stupid mistake on my part since you need use_frameworks! for swift projects but leaving that out lead to a lot of random not found errors showing up and going away at random. Hope this helps someone.

Related

Library not found for -lFirebaseCore

This might be a duplicate but the other threads solutions have not worked.
I have taken over a react-native app and am able to build the app for android on windows but the iOS version has this issue of firebasecore not found.
The reason firebase is now appearing twice is because i followed a guide how to deintegrate pods and reinstall and it duped them.
When I click the firebasecore file i can check the path its looking in
It doesnt exist in there.
I have tried to deintegrate the pods and reinstall, update them too.
Open the project using the workspace file.
Delete and clone the repo again to start fresh.
Most of the other solutions too, yet nothing works.
If any other information is needed I can try to provide it!
Thank you for reading!

Problem with Google Maps and Cocoapods and XCode

I am not a cocoapods expert so I'm a little stumped by this. One of my projects uses Google Maps and Google Places, and I did a "pod update", which led to "Module Not Found" errors for Google Maps. The build folder looked odd, so I created a new project, used the same podfile (except for target/project settings) and did a pod install.
In the image below, my big/real project is in the background and it is obvious that the GoogleMaps/Base group/folder is missing entirely, when compared to the foreground project.
Any suggestions on what could be going wrong or how to fix this? I'm currently reviewing how to uninstall/re-install pods.
TIA
It would be nice to know how/why things got wonky, but doing the following steps seems to have cleared out the issue by removing the pods from the project, then re-adding them:
pod deintegrate
pod install

cocoapods Framework file not found after installing github repo pod

So i'm trying to user this pod for my project:
https://github.com/PhamBaTho/BTNavigationDropdownMenu
However, after I install the podfile and try to build my app, I get tons of errors for the target but two of them stood out, however I cannot find a proper solution for this error:
Im opening the .xcworkspace file so I'm sure that's not the issue.
I also tried setting "Buid Active Architecture Only" to 'NO'
I tried using pods deintegrate as well and then re running pod install but that also didn't fix the error.
pls help, I've gone through so many solutions regarding these errors but none have this weird problem of a file from the framework missing.

Swift - Modules not loading or directories can't be found on new install

forgive my ignorance I am not too familiar with SWIFT but my developers sent me the package for one of our iOS apps. I wanted to make a small adjustment but everytime it's run it cannot find all the modules associated with Cocopods
When I originally received the files it came with a podfile and podfile.lock
I installed cocopods then in the directory I tried
pod install
When I try to compile it none of the modules can be found.
I tried removing the podfile and podfile.lock even starting from scratch doing a pod init and replacing the text.
I tried a
pod update and still no luck either. Any ideas what I need to be doing ?
So the answer of open xcworkspace instead of xcodeproj did the trick. Thanks

xCode error building for iOS : The sandbox is not in sync with podfile.lock

I'm building from Unity, with Google Play Game Services SDK and Firebase Analytics SDK.
So Unity creates the xcode project for me, even the podfile with the dependencies I'm needing.
I make my pod install, everything looks ok and generate everything it should. But when I open the .xcworkspace and build, I have the following error :
diff: /../Podfile.lock : No such file or Directory
diff: /Manifest.lock : No such file or Directory
error: The sandbox is not in sync with the podfile.lock. Run 'pod install' or update your CocoaPods installation
I'm sorry to post this question again but I've been looking for hours trying every solutions I can find, multiple times, mixing them together... with no luck until now :
First tried the obvious redoing pod install
Tried pod deintegrate and pod install
Tried to rebuild the iOS version, over the last one, on a clean directory...
Tried to remove all pods directories/files and running pod init editing the pod file and running pod install after a first install, directly after building the project with Unity,
Checked my PODS_ROOT that is set correctly to ${SRCROOT} : which is the pods directory into my project, I can find /../podfile.lock and /manifest.lock from this directory
Tried to update CocoaPods, checked I had the lastest version (1.1.1)
Looks like I tried so many other things since I spend hours on this with no luck.
Looks like I read too much about cocoapods and didn't pay enough attention to what was generated by Unity and Google Plugins.
It appears that google plugins, generate the podfile and install it themselves. There is no need of doing pod installs and so on. The misleading fact is that with a Unity generated project for iOS you actually want to open the .xcodeproj and not a .xcworkspace.

Resources